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

Trim date prefix from tag in GCB image build #350

Merged
merged 2 commits into from May 10, 2022

Conversation

rifelpet
Copy link
Member

@rifelpet rifelpet commented May 9, 2022

What type of PR is this?

Uncomment only one, leave it on its own line:

/kind api-change

/kind bug

/kind cleanup
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

What this PR does / why we need it:
The image pushing setup in test-infra defines _GIT_TAG with a vYYYYMMDD prefix to git describe.

This format isn't allowed by k8s.io/component-base panicking on startup.

By trimming the date prefix from the tag, image builds will only contain the git describe output, matching the binaries built from the Makefile

Which issue(s) this PR fixes:

Fixes #339

Special notes for your reviewer:

I copied this solution from another project's build process that also utilizes GCB and k8s.io/component-base:

https://github.com/kubernetes-sigs/scheduler-plugins/blob/1c90b0d319f33c7a33d9456ba412be0b6ffb61bc/Makefile#L31-L36

Does this PR introduce a user-facing change?:

NONE

The image pushing setup in test-infra defines _GIT_TAG with a vYYYYMMDD prefix to `git describe`.
This format isn't allowed by k8s.io/component-base panicing on startup.

By trimming the date prefix from the tag, image builds will only contain the `git describe` output, matching the binaries built from the Makefile
@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. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels May 9, 2022
@k8s-ci-robot
Copy link
Contributor

@rifelpet: This issue is currently awaiting triage.

If cloud-provider-aws contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label May 9, 2022
@rifelpet
Copy link
Member Author

rifelpet commented May 9, 2022

/cc @nckturner

Copy link
Member

@olemarkus olemarkus left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 9, 2022
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 9, 2022
@nckturner
Copy link
Contributor

/lgtm
/approve

Thanks @rifelpet

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 10, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nckturner, olemarkus, rifelpet

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

The pull request process is described 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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 10, 2022
@k8s-ci-robot k8s-ci-robot merged commit 09bd268 into kubernetes:master May 10, 2022
@hakman
Copy link
Member

hakman commented May 10, 2022

@nckturner Could you cherry-pick this to 1.23 and release both 1.23 and 1.24 with this fix? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. 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.

panic: version string "v20220409-v1.23.0" doesn't match expected regular expression
5 participants