Skip to content

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

Closed

Description

@lightoze

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

Activity

  1. denis-anisimov commented on Feb 17, 2020

    @denis-anisimov
    Contributor

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

  2. lightoze commented on Feb 17, 2020

    @lightoze
    ContributorAuthor

    @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.

  3. denis-anisimov commented on Feb 17, 2020

    @denis-anisimov
    Contributor

    OK, thanks for clarification.

  4. lightoze commented on Nov 22, 2021

    @lightoze
    ContributorAuthor

    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.

  5. added 2 commits that reference this issue on Nov 23, 2021
    d29f8d7
    984d457
  6. Artur- commented on Nov 23, 2021

    @Artur-
    Member

    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?

  7. lightoze commented on Nov 23, 2021

    @lightoze
    ContributorAuthor

    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.

  8. added 7 commits that reference this issue on Nov 24, 2021
    8403d67
    f1c39ce
    bfbe39d
    897897e
    209e5b9
    26904bc
    24309a6
  9. added a commit that references this issue on Nov 26, 2021
    3f00a72
  10. vaadin-bot commented on Dec 30, 2021

    @vaadin-bot
    Collaborator

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

  11. added a commit that references this issue on Sep 23, 2022
    7c022f3
  12. added a commit that references this issue on Sep 23, 2022
    2c38219
  13. vaadin-bot commented on Oct 10, 2022

    @vaadin-bot
    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions