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

[WIP] gcb: Add hack to rewrite version markers #1640

Closed
wants to merge 1 commit into from

Conversation

justaugustus
Copy link
Member

@justaugustus justaugustus commented Oct 14, 2020

What type of PR is this?

/kind feature

What this PR does / why we need it:

Reported in kubernetes/kubernetes#95536 / https://kubernetes.slack.com/archives/C2C40FMNF/p1602638351297900, our stable version markers are currently pointing to v1.20 pre-release versions, instead of v1.19.2.

This is an emergency script (with many of the values hardcoded) to overwrite the production version markers.

Which issue(s) this PR fixes:

Special notes for your reviewer:

This is the hastily-written bash version of one of the potential "emergency commands" I was referencing in #1494.
I can take a crack at converting this to go when I have some time.

Does this PR introduce a user-facing change?

gcb: Add hack to rewrite version markers

Signed-off-by: Stephen Augustus <saugustus@vmware.com>
@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/blocked-paths Indicates that a PR should not merge because it touches files in blocked paths. labels Oct 14, 2020
@k8s-ci-robot
Copy link
Contributor

@justaugustus: Adding label: do-not-merge/blocked-paths because PR changes a protected file.

Reasons for blocking this PR:

[Changes to certain release tools can affect our ability to test, build, and release Kubernetes. This PR must be explicitly approved by SIG Release repo admins.]

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 do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 14, 2020
@k8s-ci-robot k8s-ci-robot added area/release-eng Issues or PRs related to the Release Engineering subproject sig/release Categorizes an issue or PR as relevant to SIG Release. labels Oct 14, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justaugustus

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 Oct 14, 2020
@justaugustus
Copy link
Member Author

GCB command invocation:

$ time gcloud builds submit --no-source --project=kubernetes-release-test --config=gcb/fix/cloudbuild.yaml --substitutions=_TOOL_ORG=justaugustus,_TOOL_REPO=release,_TOOL_BRANCH=fix-marker
Created [https://cloudbuild.googleapis.com/v1/projects/kubernetes-release-test/builds/a1bac1b8-91a1-41ce-85d7-b46ee79f56c6].
Logs are available at [https://console.cloud.google.com/cloud-build/builds/a1bac1b8-91a1-41ce-85d7-b46ee79f56c6?project=648026197307].

Fix run is here: https://console.cloud.google.com/cloud-build/builds/a1bac1b8-91a1-41ce-85d7-b46ee79f56c6?project=kubernetes-release-test

Log snips from GCB run (for those that don't have access):

Writing v1.19.2 to fix_version.txt...
Updating stable to v1.19.2...
Copying file://fix_version.txt [Content-Type=text/plain]...
/ [0 files][    0.0 B/    8.0 B]                                                
Operation completed over 1 objects/8.0 B.                                        
Updating stable-1 to v1.19.2...
Copying file://fix_version.txt [Content-Type=text/plain]...
/ [0 files][    0.0 B/    8.0 B]                                                
Operation completed over 1 objects/8.0 B.                                        
Removing stable-1.20 marker...
Removing gs://kubernetes-release/release/stable-1.20.txt...
/ [1 objects]                                                                   
Operation completed over 1 objects.                                              

Local check of version markers:

$ for marker in stable stable-1 stable-1.20; do gsutil cat "gs://kubernetes-release/release/$marker.txt"; done
v1.19.2
v1.19.2
CommandException: No URLs matched: gs://kubernetes-release/release/stable-1.20.txt

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Oct 14, 2020
@justaugustus justaugustus added kind/feature Categorizes issue or PR as related to a new feature. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. labels Oct 14, 2020
@k8s-ci-robot k8s-ci-robot removed needs-priority needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Oct 14, 2020
@justaugustus justaugustus added this to the v1.20 milestone Oct 14, 2020
@justaugustus
Copy link
Member Author

@kubernetes/release-engineering -- Does anyone want to take this and convert it into a krel fix marker command?
ref: #1494

@hasheddan
Copy link
Contributor

@justaugustus I can take that :)

@justaugustus
Copy link
Member Author

Thanks Dan!

@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 Feb 1, 2021
@justaugustus
Copy link
Member Author

Closing as this was just for an emergency fix.
Dan to pick up in #1494.

/close

@k8s-ci-robot
Copy link
Contributor

@justaugustus: Closed this PR.

In response to this:

Closing as this was just for an emergency fix.
Dan to pick up in #1494.

/close

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.

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/release-eng Issues or PRs related to the Release Engineering subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/blocked-paths Indicates that a PR should not merge because it touches files in blocked paths. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/release Categorizes an issue or PR as relevant to SIG Release. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants