Skip to content

Conversation

@derhuerst
Copy link
Member

@derhuerst derhuerst commented Mar 24, 2023

This PR includes the changes of and depends on PR #4776; Please review & merge that one first.

Proposed Changes

  • upgrade to Yarn v3.4.1 (and the version plugin to v3.1.3 because the old version isn't compatible)
  • in the CI workflow spec, add -v3 to the cache keys, in order to prevent incompatible caches from being restored
  • since Yarn v3 seems to have changed the algorithm, update all checksums in yarn.lock 💥 (done via running just yarn)

Pull Request Check List

  • A reasonable set of unit tests is included
  • Console does not show new warnings/errors
  • Changes are documented or they are self explanatory
  • Code coverage does not decrease (unless measured incorrectly)

Review

  • Read and verify the code changes
  • Test the functionality by running the UI locally with all popular browsers available in your platform
  • Check that the implementation matches the design, when such one is defined in a Jira issue
  • Merge the pull request

(This is the upstream equivalent of embarkokc#22.)

@derhuerst derhuerst requested a review from vesameskanen March 24, 2023 12:59
@derhuerst derhuerst mentioned this pull request Mar 24, 2023
4 tasks
derhuerst added 28 commits June 23, 2023 10:22
- use 1.4 syntax to support `COPY --link` commands
- set NODE_ENV=production
- remove $WORK build arg
…ching

- If e.g. `test` has been added in a command/step, removing it in a
subsequent command/step does not have a positive effect on the image size.
Rather, we add it .dockerignore to stop adding it in the first place.
- node_modules/.cache & /tmp/Relay* are populated by Webpack plugins.
app/server.js reads .entrypoints.main.assets in order to generate an appropriate
manifest and `preload` tags, but it doesn't need the rest. This is why we turn
all stats off via `all: false` and then selectively turn `entrypoints` on.

Before, stats.json was 82mb, now it is ~9kb.
Even if a commit has changed `yarn.lock`, we can use an old `.yarn/cache` directory, so that we don't have to fetch 99% of all dependencies again.
This probably improves favicons-webpack-plugin's performance, as node_modules won't be resolved for resolving the path.
This speeds up the webpack build within the Docker image build significantly.
@vesameskanen
Copy link
Member

This PR got already merged into V3 as a part of #4838 .

@derhuerst derhuerst deleted the yarn-v3-upstream branch August 21, 2023 14:40
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.

4 participants