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

fix: make build deterministic #1750

Closed
wants to merge 1 commit into from

Conversation

uifox
Copy link
Contributor

@uifox uifox commented Jul 16, 2024

To easily verify this change you can take latest vike and modify dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/crawlPlusFiles.js as I did in the PR.

@brillout
Copy link
Member

Why?

@uifox
Copy link
Contributor Author

uifox commented Jul 16, 2024

Why?

fast-glob does not guarantee the same order of file paths and this is causing a different hash in the filename of entry-client-routing.${hash}.js. We run the build several times per pods and even though we build from the same source, we get different hashes. This can result in situations where a browser receives a page that references a client routing file with a hash that does not exist on the pod that will serve the request and the app is broken.

We need deterministic builds and sorting the paths fixes our issue.

@brillout brillout changed the title refactor: sort fastGlob paths fix: make build deterministic Jul 16, 2024
@brillout brillout closed this in 648cd01 Jul 16, 2024
@brillout
Copy link
Member

Pre-released as 0.4.180-commit-648cd01.

Btw. would your company be up for sponsoring (#1350)? It has a huge impact for the project.

@uifox
Copy link
Contributor Author

uifox commented Jul 17, 2024

@brillout I truely believe vike deserves sponsorship. Unfortunately I am not the decision maker in this regard but I advocated your case toward management a few times already and I got positive feedback, so I hope in the near future it will take place. Thanks a lot for your strong commitment to vike. And keep up with the great work.

@brillout
Copy link
Member

Thank you, it's much appreciated 👍

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