Skip to content

Add multi-repo upgrade and dependency maintenance utility#4651

Merged
liamfallon merged 3 commits into
kptdev:mainfrom
Nordix:add-upgrade-tooling
Jul 23, 2026
Merged

Add multi-repo upgrade and dependency maintenance utility#4651
liamfallon merged 3 commits into
kptdev:mainfrom
Nordix:add-upgrade-tooling

Conversation

@aravindtga

Copy link
Copy Markdown
Contributor

Description

  • What changed: Adds scripts/go-upgrade/ - a modular bash utility for coordinating upgrades across 4 interdependent repositories (krm-functions-sdk, kpt, krm-functions-catalog, porch)
  • Why it's needed: Coordinated upgrades across the ecosystem (Go version, linter version, cross-repo dependency pins) require building each module standalone, resolving versions, and verifying compatibility - manual execution is error-prone and slow
  • How it works: Clones repos into a local workspace, performs the requested upgrades, verifies each module with go mod tidy / go fmt / go vet / go build (all with GOWORK=off), and optionally creates draft PRs via GitHub GraphQL API

Supported operations:

  • go-version - bump Go directive in all go.mod files
  • lint-version - bump GOLANGCI_LINT_VERSION in Makefiles
  • cross-deps - upgrade cross-repository dependencies to latest published versions
  • all - run all of the above in sequence
  • push - create branches, commit, push, and raise draft PRs

Type of Change

  • New feature
  • Documentation

Checklist

  • Code follows project style guidelines
  • Self-reviewed changes
  • Tests added/updated
  • Documentation added/updated
  • All tests and gating checks pass

AI Disclosure

  • I have used AI in the creation of this PR.

Kiro CLI used to design, implement, and validate the utility including library structure, safety fixes, and GraphQL API integration.

@netlify

netlify Bot commented Jul 20, 2026

Copy link
Copy Markdown

Deploy Preview for kptdocs ready!

Name Link
🔨 Latest commit 4ee92e6
🔍 Latest deploy log https://app.netlify.com/projects/kptdocs/deploys/6a60a44ad3db880007c17c65
😎 Deploy Preview https://deploy-preview-4651--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.

Pull request overview

Adds a new scripts/go-upgrade/ bash utility intended to coordinate Go/linter/cross-repo dependency upgrades across the kptdev ecosystem repositories, including optional branch pushing and draft PR creation via GitHub GraphQL.

Changes:

  • Introduces upgrade.sh entrypoint with subcommands for Go version bumps, lint version bumps, cross-repo dep updates, doc generation, and pushing PRs.
  • Adds modular library scripts (lib/*.sh) for workspace management, verification, version updates, dependency resolution, and PR creation.
  • Documents usage and configuration in scripts/go-upgrade/README.md, plus adds config.env defaults.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
scripts/go-upgrade/upgrade.sh Adds main CLI entrypoint, arg parsing, orchestration, and push flow wiring.
scripts/go-upgrade/README.md Documents intended usage, options, and workflow for the utility.
scripts/go-upgrade/config.env Provides default configuration for repos, versions, workspace, and exclusions.
scripts/go-upgrade/lib/common.sh Adds shared helpers (logging, failure tracking, repo parsing, dependency checks).
scripts/go-upgrade/lib/workspace.sh Implements clone/reuse workspace behavior, clean-state enforcement, module discovery.
scripts/go-upgrade/lib/verify.sh Implements per-module verification pipeline (tidy/fmt/vet/build + Hugo handling).
scripts/go-upgrade/lib/versions.sh Implements go-version, lint-version, and generate-docs subcommands.
scripts/go-upgrade/lib/deps.sh Implements cross-repo dependency detection and upgrade logic.
scripts/go-upgrade/lib/push.sh Implements branch/commit/push and GraphQL draft PR creation via gh.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/go-upgrade/upgrade.sh
Comment thread scripts/go-upgrade/upgrade.sh Outdated
Comment thread scripts/go-upgrade/lib/common.sh
Comment thread scripts/go-upgrade/lib/deps.sh
Comment thread scripts/go-upgrade/lib/verify.sh
@aravindtga
aravindtga marked this pull request as ready for review July 20, 2026 11:49
@aravindtga
aravindtga requested review from a team July 20, 2026 11:49
@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. area/devops documentation Improvements or additions to documentation enhancement New feature or request go Pull requests that update Go code labels Jul 20, 2026
@aravindtga
aravindtga force-pushed the add-upgrade-tooling branch from 1f034e5 to f9dc8c7 Compare July 20, 2026 14:42
Signed-off-by: Aravindhan Ayyanathan <aravindhan.a@est.tech>
Signed-off-by: Aravindhan Ayyanathan <aravindhan.a@est.tech>
Signed-off-by: Aravindhan Ayyanathan <aravindhan.a@est.tech>
@aravindtga
aravindtga force-pushed the add-upgrade-tooling branch from 60e065d to 4ee92e6 Compare July 22, 2026 11:06

@mozesl-nokia mozesl-nokia 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.

I can think of one small addition that would be nice: If FORK_OWNER is "kptdev" the script should prevent any upstream modifications (so pushing a branch). On top of that would be adding a -f to override that.

@dosubot dosubot Bot added the lgtm label Jul 23, 2026
@aravindtga

Copy link
Copy Markdown
Contributor Author

I can think of one small addition that would be nice: If FORK_OWNER is "kptdev" the script should prevent any upstream modifications (so pushing a branch). On top of that would be adding a -f to override that.

Good suggestion. I'll address that in a separate PR.

@liamfallon
liamfallon merged commit 1650734 into kptdev:main Jul 23, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/devops documentation Improvements or additions to documentation enhancement New feature or request go Pull requests that update Go code lgtm size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants