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

fix_3811: send semver version in api/stattus/buildinfo for cloud deployments #4110

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Aki0x137
Copy link

What this PR does:

  • After every merge to main, a github action will update the VESRION file in root of project with latest tag.
  • Added a rule in Makefile for the same.
  • image-tag tool is updated to validate and use the semver version, if present. Otherwise default to current behavior.

Which issue(s) this PR fixes:
Fixes #3811

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@CLAassistant
Copy link

CLAassistant commented Sep 22, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@joe-elliott joe-elliott left a comment

Choose a reason for hiding this comment

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

Thanks for looking into this!

I think it's close but I'm afraid it will break the way we've named our docker images. I've pinged a few team members who I think will have more a immediate understanding of how this works.

run: |
if [ -n "$(git status --porcelain VERSION)" ]; then
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
Copy link
Member

Choose a reason for hiding this comment

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

@ie-pham do you think this will work with our latest security changes to GHA?

i'll admit i'm not sure where the creds are that allow this to work?

VERSION=$(cat "${REPO_ROOT}/VERSION" )
if is_valid_semver "$VERSION"; then
echo "$VERSION"
exit 0
Copy link
Member

Choose a reason for hiding this comment

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

So I believe that changing this script will update the version as expected b/c of this line:

https://github.com/grafana/tempo/blob/main/Makefile#L50

However I think it will also change the output of the script as used here:

https://github.com/grafana/tempo/blob/main/.drone/drone.yml#L12

which I'm pretty sure is how our docker images are tagged:

https://hub.docker.com/r/grafana/tempo/tags

@zalegrala do you know off the top of your head if this is how it works?

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.

Add semver version to api/status/buildinfo endpoint
3 participants