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

Support reproducible flow-build-info.json and stats.json #7556

Closed
lightoze opened this issue Feb 12, 2020 · 8 comments · Fixed by #12431
Closed

Support reproducible flow-build-info.json and stats.json #7556

lightoze opened this issue Feb 12, 2020 · 8 comments · Fixed by #12431

Comments

@lightoze
Copy link
Contributor

Currently (v14) generated flow-build-info.json and stats.json entries are randomly reordered during build. In containerized environment it means that every build produces an unique image which creates problems both in development and CD workflows.

This should be also taken into account in relation to #6398

@denis-anisimov
Copy link
Contributor

As I understand you would like to have the same content of the flow-build-info.json and stats.json files, right ?

@lightoze
Copy link
Contributor Author

lightoze commented Feb 17, 2020

@denis-anisimov Right. It appears to me that the only difference I get now is content ordering.

As a more generic requirement, you could create a test where you build project twice and expect it to produce exact same artifact. Results may differ though depending on how much "from scratch" you are building each time - at the moment I am testing in dev environment where project is not cleaned between rebuilds.

@denis-anisimov
Copy link
Contributor

OK, thanks for clarification.

@lightoze
Copy link
Contributor Author

I've got back to this issue, tested with Vaadin 21.0.6, flow-build-info.json still seems to be randomly reordered after each build. When building to containers it forces a new set of layers to be created on each build, even when particular application in multi-module repository is unchanged.

For testing purposes I've created a test project which allows quickly deploying a test app into a Kubernetes cluster using Skaffold: https://github.com/lightoze/vaadin-build-demo. After byte to byte comparison of images produces by a clean build it is seen that flow-build-info.json is the only file that differs between the builds.

@Artur-
Copy link
Member

Artur- commented Nov 23, 2021

In Vaadin 22, stats.json has been reduced to almost nothing

#12431 should make the jsModule and cssImports parts deterministic. Is there any other part that keeps changing?

@lightoze
Copy link
Contributor Author

Looks like it's only jsModule and cssImports so #12431 should help. I remember stats.json being non-deterministic in the past but now with V21 it seems stable, at least for the test project.

Artur- added a commit that referenced this issue Nov 24, 2021
Artur- added a commit that referenced this issue Nov 24, 2021
Artur- added a commit that referenced this issue Nov 24, 2021
Artur- added a commit that referenced this issue Nov 24, 2021
Artur- added a commit that referenced this issue Nov 24, 2021
Artur- added a commit that referenced this issue Nov 24, 2021
Artur- added a commit that referenced this issue Nov 24, 2021
caalador pushed a commit that referenced this issue Nov 26, 2021
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with platform 23.0.0.alpha1 and is also targeting the upcoming stable 23.0.0 version.

@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 22.0.24.

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

Successfully merging a pull request may close this issue.

4 participants