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

Revert "make: update VERSION_TAG to a globally-consistent build-input identifier" #880

Conversation

ViktorTigerstrom
Copy link
Contributor

This PR reverts commit 66d2bd1bdade3cacf1df263799bf4569a97af3ec. Unfortunately, this commit leads to a -dirty suffix being added to built releases, on multiple environments. The reason for that is that as the make release build process rebuilds the app build folder, which temporarily removes the .gitkeep file in that folder. As the VERSION_TAG then gets based on a build that lacks the .gitkeep file, the build process adds the -dirty suffix to the version.

To reviewers:
I'm pushing this as a draft PR for now, as I'd like to get a approach ACK that we'd like to do revert the commit.

Alternatively to reverting, the only other approach I could figure that actually worked to consistently produce a release build without the -dirty suffix, is to simply remove the execution of app-build in the make release command. We'd then need to make it a prerequisite to execute the make app-build command prior to the make release command during the release process. As that's not very bullet proof and easy to forget, I wouldn't personally opt for doing so. As our actual releases does come with a -dirty suffix for the commit when running litd --version, I could also see the argument for actually doing releases in that way.
This alternative approach could potentially also make it easier to achieve actual consistent reproducible releases across different environments as well.

… identifier"

This reverts commit 66d2bd1.
Unfortunately, this commit leads to a "-dirty" suffix being added to
built releases, on multiple environments. The reason for that is that as
the "make release" build process rebuilds the app build folder, which
temporarily removes the .gitkeep file in that folder. As the VERSION_TAG
then gets based on a build that lacks the .gitkeep file, the build
process adds the "-dirty" suffix to the version.
@ellemouton ellemouton added the no-changelog This PR is does not require a release notes entry label Oct 23, 2024
@guggero
Copy link
Member

guggero commented Oct 23, 2024

Working on an alternative approach.

@dstadulis
Copy link

Is hastening the call to git describe, before the build process modifies the repository, a solution?

Seems that the build-input identifier should be determined ASAP

@ViktorTigerstrom
Copy link
Contributor Author

ViktorTigerstrom commented Oct 23, 2024

Is hastening the call to git describe, before the build process modifies the repository, a solution?

Seems that the build-input identifier should be determined ASAP

I unfortunately tried many variants of that by including various sleep statements during the release process, but nothing I tried seemed to work consistently. The most consistent version I found working was to sleep 40 seconds prior to executing the release script, and then pass the git describe output instead of the VERSION_TAG to the release script. That worked like 50% of the time, so not an ideal solution from neither a code or consistency point of view 😅!

@guggero
Copy link
Member

guggero commented Oct 23, 2024

Replaced by #881.

@guggero guggero closed this Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog This PR is does not require a release notes entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants