You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support reproducible flow-build-info.json and stats.json #7556
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 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.
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.
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.
Activity
denis-anisimov commentedon Feb 17, 2020
As I understand you would like to have the same content of the
flow-build-info.jsonandstats.jsonfiles, right ?lightoze commentedon 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 commentedon Feb 17, 2020
OK, thanks for clarification.
lightoze commentedon Nov 22, 2021
I've got back to this issue, tested with Vaadin 21.0.6,
flow-build-info.jsonstill 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.jsonis the only file that differs between the builds.fix: Make flow-build-info.json deterministic
fix: Make flow-build-info.json deterministic
Artur- commentedon Nov 23, 2021
In Vaadin 22,
stats.jsonhas been reduced to almost nothing#12431 should make the
jsModuleandcssImportsparts deterministic. Is there any other part that keeps changing?lightoze commentedon Nov 23, 2021
Looks like it's only
jsModuleandcssImportsso #12431 should help. I rememberstats.jsonbeing non-deterministic in the past but now with V21 it seems stable, at least for the test project.fix: Make ClassFinder deterministic
fix: Make ClassFinder deterministic
fix: Make ClassFinder deterministic
fix: Make ClassFinder deterministic
fix: Make ClassFinder deterministic
fix: Make ClassFinder deterministic
fix: Make ClassFinder deterministic
fix: Make ClassFinder deterministic (#12431)
vaadin-bot commentedon Dec 30, 2021
This ticket/PR has been released with platform 23.0.0.alpha1 and is also targeting the upcoming stable 23.0.0 version.
fix: Make ClassFinder deterministic (#12431)
fix: Make ClassFinder deterministic (#12431) (#14627)
vaadin-bot commentedon Oct 10, 2022
This ticket/PR has been released with Vaadin 22.0.24.