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

Sanitize GIT TAG #16664

Merged
merged 1 commit into from
Jul 8, 2020
Merged

Sanitize GIT TAG #16664

merged 1 commit into from
Jul 8, 2020

Conversation

Jefftree
Copy link
Member

@Jefftree Jefftree commented Mar 6, 2020

This was previously discussed on slack. apiserver-network-proxy has a golang submodule that requires a git tag with a slash (/) character (https://github.com/kubernetes-sigs/apiserver-network-proxy/tags). This is invalid for docker's specification of a tag

A tag name must be valid ASCII and may contain lowercase and uppercase letters, digits, underscores, periods and dashes. A tag name may not start with a period or a dash and may contain a maximum of 128 characters.

This PR sanitizes the git tag to remove invalid characters before being used as a docker tag.

/cc @caesarxuchao
/assign @Katharine

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. area/images sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels Mar 6, 2020
t := time.Now().Format("20060102")
return fmt.Sprintf("v%s-%s", t, strings.TrimSpace(string(output))), nil
Copy link
Member Author

Choose a reason for hiding this comment

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

TrimSpace is unnecessary since the regexp will have already removed the spaces.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 5, 2020
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jul 5, 2020
@Jefftree
Copy link
Member Author

Jefftree commented Jul 7, 2020

ping @Katharine
/remove-lifecycle rotten

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Jul 7, 2020
Copy link
Member

@Katharine Katharine left a comment

Choose a reason for hiding this comment

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

Thanks! Sorry for the delay.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 7, 2020
@Katharine
Copy link
Member

Apparently I have lost approval on this, so you’ll need to get someone else. :(

@Jefftree
Copy link
Member Author

Jefftree commented Jul 7, 2020

Ahh sorry, didn't realize you don't work on this anymore. Thank you for the approval!

/assign @spiffxp

@spiffxp
Copy link
Member

spiffxp commented Jul 8, 2020

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Jefftree, Katharine, spiffxp

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 Jul 8, 2020
@k8s-ci-robot k8s-ci-robot merged commit 4b69e15 into kubernetes:master Jul 8, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.19 milestone Jul 8, 2020
@Jefftree Jefftree deleted the sanitize-tag branch December 7, 2021 17:19
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. area/images cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/testing Categorizes an issue or PR as relevant to SIG Testing. 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.

None yet

5 participants