Skip to content

New "lock-step" release workflow - #4869

Draft
mozesl-nokia wants to merge 7 commits into
kptdev:mainfrom
nokia:new-release-workflow
Draft

mozesl-nokia wants to merge 7 commits into
kptdev:mainfrom
nokia:new-release-workflow

Conversation

@mozesl-nokia

@mozesl-nokia mozesl-nokia commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #4827

This PR introduces the workflow for creating the multi-module release. Also added testing for the scripts, including a pretty basic testing "framework".

Requirements for it to work:

  • Create a GitHub environment named release that has a token called RELEASE_TOKEN able to push to main1 and only ever reads from main.
    • This was a security concern flagged by the AI.
    • Workflow runs should require multiple maintainer approvals.
    • This will apply to dry-runs too.

Deferred improvements:

  • Add logic so that fixing half-way done releases is easier.

The next release must be v1.2.0, as that is the lowest available for all the current modules. The workflow should break for anything lower. I would suggest doing a v1.2.0-pre.1 (dry-run, then real) as a test as well to make sure everything works correctly.

AI disclosure:
The PR is heavily AI-authored, specifically Claude Sonnet 5.5 through Cursor.

Footnotes

  1. The current implementation reuses the kptdev-ci-bot's token instead ↩

Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
Assisted-by: Cursor:claude-sonnet-5.5
Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
Assisted-by: Cursor:claude-sonnet-5.5
Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
Assisted-by: Cursor:claude-sonnet-5.5
Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
Assisted-by: Cursor:claude-sonnet-5.5
Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
@mozesl-nokia
mozesl-nokia requested review from a team November 12, 2026 14:46
Copilot AI balanced review requested due to automatic review settings November 12, 2026 14:47
@netlify

netlify Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for kptdocs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 205346f
🔍 Latest deploy log https://app.netlify.com/projects/kptdocs/deploys/6af6df61ff3baf0e965fcc95
😎 Deploy Preview https://deploy-preview-4869--kptdocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The workflow can execute code from a non-main input branch with the privileged RELEASE_TOKEN because environment restrictions check the dispatch ref rather than the branch being checked out.

3 open issues
What changed in this PR

Introduces a manual, lock-step release process for kpt’s API, root library, and CLI modules, addressing #4827 by coordinating their versions and publishing one GitHub release.

Changes:

  • Consolidates release workflows with validation, dependency bumps, atomic pushes, dry runs, and provenance.
  • Adds release scripts and tests for version ordering, tagging, notes, and asset staging.
  • Updates GoReleaser configuration and maintainer documentation.
File Description
scripts/​multimodule-release/​release.sh Dispatches release subcommands.
scripts/​multimodule-release/​lib/​validate.sh Validates versions against remote module tags.
scripts/​multimodule-release/​lib/​testing.sh Provides assertions and isolated repository fixtures.
scripts/​multimodule-release/​lib/​test-validate.sh Tests version and branch validation.
scripts/​multimodule-release/​lib/​test-tag.sh Tests dependency bumps, tags, and atomic pushes.
scripts/​multimodule-release/​lib/​test-semver.sh Tests semantic version validation and ordering.
scripts/​multimodule-release/​lib/​test-notes.sh Tests combined and module-scoped release notes.
scripts/​multimodule-release/​lib/​test-assets.sh Tests release asset staging and naming.
scripts/​multimodule-release/​lib/​tag.sh Creates dependency commits, module tags, and atomic pushes.
scripts/​multimodule-release/​lib/​semver.sh Implements semantic version comparisons.
scripts/​multimodule-release/​lib/​notes.sh Combines repository-wide and module-scoped notes.
scripts/​multimodule-release/​lib/​common.sh Defines shared constants and helpers.
scripts/​multimodule-release/​lib/​assets.sh Stages GoReleaser artifacts for upload.
release/​tag/​goreleaser.yaml Delegates publishing and changelog generation to the workflow.
release/​README.md Documents coordinated releases, prerequisites, and recovery.
Makefile Adds shell-script tests to standard checks.
make/​checks.mk Clarifies the root-module check target’s comment.
CONTRIBUTING.md Replaces separate release instructions with the unified workflow.
AGENTS.md Updates the documented release workflow.
.github/​workflows/​release.yml Orchestrates the complete multimodule release.
.github/​workflows/​release-cli.yml Removes the separate CLI release workflow.
.github/​workflows/​release-api.yml Removes the separate API release workflow.
.github/​workflows/​go.yml Runs shell-script tests in CI.
.github/​actions/​check-go-mod-replace/​action.yml Adds optional rejection of module pseudo-versions.

Review effort: Balanced

Comment thread .github/workflows/release.yml Resolved
Comment thread .github/workflows/release.yml Resolved
Comment thread .github/workflows/release.yml Resolved
Assisted-by: Cursor:claude-sonnet-5.5
Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
Assisted-by: Cursor:claude-sonnet-5.5
Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Active release-blocking issues remain: the workflow uses inconsistent required credentials, rejects the current checkout’s intentional replacements before testing, and lacks the mandated minimum-version check.

2 open issues
1 previously missed issue

In code that hasn't changed since last review

Medium severity Enforce the v1.2.0 minimum release line

scripts/​multimodule-release/​lib/​validate.sh:44

The validation only compares the requested version with the highest existing tags, so a version such as v1.1.2 would pass when the current tags are below that version. The PR requirements say the first lock-step release must be on the v1.2.0 release line (while allowing a v1.2.0 prerelease); add an explicit floor check and a regression test so the workflow cannot publish an earlier line.

3 resolved since last review

Review effort: Lite

Comment on lines +87 to +91
- name: Check for replace directives and kpt pseudo-versions (root module)
uses: ./.github/actions/check-go-mod-replace
with:
working-directory: .
tagged-only-modules: '["github.com/kptdev/kpt"]'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is not quite correct, but it highlighted a severe logical issue in the workflow. I'll put this back in draft for now...

Comment thread .github/workflows/release.yml Resolved
@mozesl-nokia
mozesl-nokia marked this pull request as draft November 13, 2026 10:43

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/devops area/release kpt release issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal: Lock the kpt module versions together with automated releases

2 participants