Automate the multi-module release with release-all.sh - #6183
Conversation
|
This PR has multiple commits, and the default merge method is: merge. DetailsInstructions 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-sigs/prow repository. |
|
Skipping CI for Draft Pull Request. |
End-to-end test (with
|
|
/ok-to-test |
046563e to
5c4c3bd
Compare
| --kustomize-bump patch|minor \ | ||
| [--branch release-vX.Y.Z] \ | ||
| [--base master] \ | ||
| [--remote upstream|origin] \ |
There was a problem hiding this comment.
--remote controls the shell script’s branch checks, pushes, gh repo, PR creation, and workflow lookup, but it is not passed to gorepomod release. gorepomod independently prefers upstream over origin.
With both remotes configured, --remote origin can therefore push release tags to upstream while pushing the final branch and creating the PR against origin. The fork E2E had to remove upstream to avoid this exact behavior.
Please remove the unsupported --remote origin path.
| --module-bump patch|minor \ | ||
| --kustomize-bump patch|minor \ | ||
| [--branch release-vX.Y.Z] \ | ||
| [--base master] \ |
There was a problem hiding this comment.
The public --base option is not honored by gorepomod. The shell script checks out and creates the final PR against the selected base, but gorepomod still creates the release branch from /master and merges /master.
Please remove --base and explicitly support only master.
| The recommended release path is to automate the process from `Release kyaml` through `Return the repo to development mode` with [`release-all.sh`](./release-all.sh). | ||
|
|
||
| ```bash | ||
| releasing/release-all.sh \ |
There was a problem hiding this comment.
This script pushes the release branch and module tags incrementally, but a later failure leaves those remote resources behind and the next run immediately fails because the release branch already exists.
Is it possible to add a way to resume or rollback if scripts fail until complete through?
| After establishing the version, the command looks for a branch named | ||
|
|
||
| > _release-{module}/-v{major}.{minor}_ | ||
| > _release-v{major}.{minor}.{patch}_ |
There was a problem hiding this comment.
Nit: --release-branch is used preferentially here, it may be a good to update the description.
| if err := gr.CheckoutReleaseBranch(mgr.remoteName, relBranch); err != nil { | ||
| return err | ||
| } | ||
| if err := gr.MergeFromRemoteMain(mgr.remoteName); err != nil { |
There was a problem hiding this comment.
Since MergeFromRemoteMain() is executed here, wouldn't the contents of the master branch get merged in with every release of each module?
saitejabandaru-in
left a comment
There was a problem hiding this comment.
LGTM! This is a fantastic improvement to the release process. Consolidating the releases onto a single release branch and pushing the tags from there is much more streamlined than the previous iterative PR-per-module approach. The release-all.sh script looks very robust.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: saitejabandaru-in, tsuzu The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Refs #5866
Summary
releasing/release-all.shto run the full kyaml → cmd/config → api → kustomize release sequence in one invocation, matching the one-command flow requested in Release automation #5866 (koba1t's follow-up). A release no longer requires 4 sequential PRs for the intermediate pin updates; the whole cycle lives on a singlerelease-vX.Y.Zbranch and lands as one "Release vX.Y.Z" PR at the end.gorepomod releaseto require an explicit--release-branch, and share one branch across all four module releases (release-v{major}.{minor}.{patch}) instead of the previous per-modulerelease-{module}-{minor}naming.releasing/README.mdto lead with the scripted flow; the manual step-by-step runbook is preserved under a<details>fallback for major releases or ad-hoc use.gorepomod releasenow requires the--release-branch <branch>flag. Manual invocations inreleasing/README.mdare updated accordingly.Out of scope of this PR
The umbrella issue #5866 has more steps than this PR covers. Left manual / for follow-up:
releasing/README.mdhack/update-kustomize.shin kubernetes/kubernetesrelease-all.shsupportspatch|minoronly; use the manual flowQuestion for reviewers
The release workflow leaves 4 GitHub Releases (kyaml, cmd/config, api, kustomize) in draft state, and the postflight message tells the release engineer to review and undraft them. Would you rather:
release-all.shalso undraft the 4 releases automatically once each workflow completes?Special notes for reviewers
This PR was written in part with the assistance of generative AI.