Skip to content

[Release] Fix version tag and commit not getting embedded correctly #4739

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

Merged
merged 2 commits into from
Sep 12, 2023

Conversation

maggie-lou
Copy link
Contributor

@maggie-lou maggie-lou commented Sep 8, 2023

The commit and version keep getting set to UNKNOWN in version.go, ruining our app version metric. There seems to be a bug where x_defs does not consistently embed the data during releases.

In this commit we try another approach where we use a genrule that explicitly sets stamp = 1 and directly reads from bazel-out/stable-status.txt (described here: bazelbuild/bazel#4942 (comment))

There's some additional context at the bottom of this thread: https://buildbuddy-corp.slack.com/archives/C01D5GHRJ59/p1694026279817119

@maggie-lou
Copy link
Contributor Author

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@maggie-lou maggie-lou marked this pull request as draft September 8, 2023 22:03
@maggie-lou maggie-lou marked this pull request as ready for review September 9, 2023 00:53
Copy link
Member

@bduffany bduffany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sanity check: if we do a dev push twice with --stamp, does the second app push become a NOP?

@maggie-lou
Copy link
Contributor Author

maggie-lou commented Sep 12, 2023

sanity check: if we do a dev push twice with --stamp, does the second app push become a NOP?

Unfortunately this doesn't fix the 'apps being double released problem'. If you do a dev push twice with the same target, the second one is a NOP. In our release flow we use two different targets though, and the apps are being re-pushed. More context here

@maggie-lou maggie-lou merged commit c1d0534 into master Sep 12, 2023
@maggie-lou maggie-lou deleted the fix_version branch September 12, 2023 19:45
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