Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yarn build bundle.js is randomly different between runs #1582

Closed
emteknetnz opened this issue Sep 15, 2023 · 4 comments
Closed

yarn build bundle.js is randomly different between runs #1582

emteknetnz opened this issue Sep 15, 2023 · 4 comments

Comments

@emteknetnz
Copy link
Member

emteknetnz commented Sep 15, 2023

The order of client/dist/js/bundle.js is sometimes randomly changes in 1.13 between subsequent runs on yarn build between despite no changes in the client/src

This was noticed during this PR

I'm believe this only affects CMS 4 which uses webpack 3. I was unable to replicate on CMS 5 using webpack 5 using the code code changes in GridField.js that the linked PR above has

I did try adding && rm -rf client/dist/* to the yarn build command in package.json for CMS 4, just CMS 5 has, though it did not fix the issue

Doing a text-compare of the first 1,000 lines of bundle.js adding line breaks of every semicolon:

image_720

image

PRs

@GuySartorelli
Copy link
Member

Is this a duplicate of silverstripe/gha-run-tests#11?

@emteknetnz
Copy link
Member Author

emteknetnz commented Sep 15, 2023

I don't know, we didn't isolate the cause of the issue on the one you linked. The symptom looks the same (modified bundle.js file) thought the cause may be different

@emteknetnz
Copy link
Member Author

emteknetnz commented Sep 15, 2023

Re-ran github actions build a copy of time post merging the PR that outputs the sha1sum, it changes between runs on github actions as well so it's not isolated to local environments

github actions run A
4fe821cac444d5fd2d17f09740730fc1dbc4c2c4 client/dist/js/bundle.js

github actions run B (haven't changed code, just clicked re-run button)
a76c9557b1fb415eb4439a20d3376ce4273a7a9b client/dist/js/bundle.js

@emteknetnz
Copy link
Member Author

Look to have resolved by running yarn upgrade webpack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants