Skip to content

Update cssbundling-rails to resolve redundant Yarn install#10412

Merged
aduth merged 2 commits intomainfrom
aduth-cssbundling-rails-yarn-install
Apr 11, 2024
Merged

Update cssbundling-rails to resolve redundant Yarn install#10412
aduth merged 2 commits intomainfrom
aduth-cssbundling-rails-yarn-install

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented Apr 11, 2024

🛠 Summary of changes

Updates cssbundling-rails gem dependency to the latest version, from 1.0.0 to 1.4.0.

This resolves an issue where yarn install would be called redundantly during deployments and in continuous integration during the assets:precompile task. We intend to skip Yarn install during this task in both continuous integration (source) and deploys (source) since it is done as part of a previous step (source, source). However, both jsbundling-rails and cssbundling-rails both include a built-in yarn install, and while the environment variable was enough to prevent the install in jsbundling-rails, it was not supported as of the version of cssbundling-rails we had installed previously. This was identified via troubleshooting at rails/jsbundling-rails#150 (comment), and is supported as of cssbundling-rails@1.3.0.

📜 Testing Plan

  1. Run SKIP_YARN_INSTALL=true rails assets:precompile
  2. Verify that the first command you see is yarn run and not yarn install

aduth added 2 commits April 11, 2024 13:33
changelog: Internal, Build Tooling, Update cssbundling-rails to resolve redundant Yarn install
@aduth
Copy link
Contributor Author

aduth commented Apr 11, 2024

Also verified in GitLab builds for this pull request:

Before:

...
$ bundle exec rake assets:precompile
yarn install v1.22.19
...

After:

$ bundle exec rake assets:precompile
yarn run v1.22.19
...

@aduth aduth merged commit d5ee6e0 into main Apr 11, 2024
@aduth aduth deleted the aduth-cssbundling-rails-yarn-install branch April 11, 2024 18:35
@mitchellhenke mitchellhenke mentioned this pull request Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants