Skip to content

Fix the GitVersion reported by Kueue to only contain tag #5370

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mbobrovskyi
Copy link
Contributor

@mbobrovskyi mbobrovskyi commented May 27, 2025

What type of PR is this?

/kind bug

What this PR does / why we need it:

Fix the GitVersion reported by Kueue to only contain tag

Which issue(s) this PR fixes:

Fixes #5368

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 27, 2025
Copy link

netlify bot commented May 27, 2025

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit c9967c7
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-sigs-kueue/deploys/68356b1edf746600081e39b1

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mbobrovskyi
Once this PR has been reviewed and has the lgtm label, please assign tenzen-y for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot requested review from mimowo and PBundyra May 27, 2025 07:24
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label May 27, 2025
@mbobrovskyi
Copy link
Contributor Author

/cc @mimowo @tenzen-y

@k8s-ci-robot k8s-ci-robot requested a review from tenzen-y May 27, 2025 07:24
@mbobrovskyi mbobrovskyi force-pushed the fix/GitVersion-reported-by-kueue-to-only-contain-tag branch from c39ec64 to 9067866 Compare May 27, 2025 07:25
@mimowo
Copy link
Contributor

mimowo commented May 27, 2025

/hold
To avoid premature merging, I think we should do testing for a couple of scenarios.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 27, 2025
@mbobrovskyi mbobrovskyi force-pushed the fix/GitVersion-reported-by-kueue-to-only-contain-tag branch from 9067866 to c9967c7 Compare May 27, 2025 07:34
@mbobrovskyi
Copy link
Contributor Author

To avoid premature merging, I think we should do testing for a couple of scenarios.

Do you have an idea of which scenarios we should test? The only one I can think of is when GIT_TAG isn't set.

@@ -14,7 +14,6 @@ steps:
- kueueviz-image-push
env:
- IMAGE_REGISTRY=us-central1-docker.pkg.dev/k8s-staging-images/kueue
- GIT_TAG=$_GIT_TAG
Copy link
Contributor Author

Choose a reason for hiding this comment

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

After removing GIT_TAG here, the internal Makefile value from git describe --tags --dirty --always will be used instead, so it should still work fine. However, the issue is that we'll lose the v20250526 date prefix from the image tag.

$_GIT_TAG includes the date prefix (e.g., v20250526-v0.12.0), while the Git version alone would be just v0.12.0. To stay consistent with the current approach, perhaps instead of using GIT_TAG, we could introduce a separate variable like IMAGE_TAG or GIT_TAG_EXTENDED that includes the date prefix.

But if it's acceptable to use only the v0.12.0 image tag, then I think it should work fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/bug Categorizes issue or PR as related to a bug. release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix the GitVersion reported by Kueue to only contain tag
3 participants