Skip to content

Add multi-repo upgrade and dependency maintenance utility#1116

Closed
aravindtga wants to merge 3 commits into
kptdev:mainfrom
Nordix:add-upgrade-tooling
Closed

Add multi-repo upgrade and dependency maintenance utility#1116
aravindtga wants to merge 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.

Signed-off-by: Aravindhan Ayyanathan <aravindhan.a@est.tech>
@netlify

netlify Bot commented Jul 13, 2026

Copy link
Copy Markdown

Deploy Preview for kpt-porch ready!

Name Link
🔨 Latest commit 924991a
🔍 Latest deploy log https://app.netlify.com/projects/kpt-porch/deploys/6a590bb7311da200083aebd8
😎 Deploy Preview https://deploy-preview-1116--kpt-porch.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-based utility to coordinate Go version, golangci-lint version, and cross-repo dependency upgrades across the kptdev ecosystem repositories, with optional branch/commit/push + draft PR creation.

Changes:

  • Introduces upgrade.sh entrypoint with subcommands (go-version, lint-version, cross-deps, all, push) and workspace orchestration.
  • Adds modular library scripts for workspace management, module verification, version bumping, cross-deps resolution, and PR pushing via GitHub GraphQL (through gh).
  • Adds documentation and default configuration (README.md, config.env) for targets, repo list, and exclusions.

Reviewed changes

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

Show a summary per file
File Description
scripts/go-upgrade/upgrade.sh Main CLI entrypoint: arg parsing, orchestration, and push gating.
scripts/go-upgrade/README.md Usage, configuration, workflow, and design documentation for the utility.
scripts/go-upgrade/config.env Default targets, repo list, Makefile locations, and exclusion settings.
scripts/go-upgrade/lib/common.sh Logging, helpers, exclusion logic, and dependency/tooling preflight checks.
scripts/go-upgrade/lib/workspace.sh Workspace cloning, clean-state enforcement, and module discovery.
scripts/go-upgrade/lib/verify.sh Module verification pipeline (tidy/fmt/vet/build) with failure recording.
scripts/go-upgrade/lib/versions.sh Implements go-version and lint-version upgrade logic.
scripts/go-upgrade/lib/deps.sh Implements cross-deps module ownership mapping and dependency upgrades.
scripts/go-upgrade/lib/push.sh Implements branch/commit/push and draft PR creation via gh api graphql.

Comment thread scripts/go-upgrade/lib/versions.sh Outdated
Comment thread scripts/go-upgrade/lib/versions.sh Outdated
Comment thread scripts/go-upgrade/lib/versions.sh Outdated
Comment thread scripts/go-upgrade/lib/workspace.sh
Comment thread scripts/go-upgrade/lib/common.sh
Comment thread scripts/go-upgrade/lib/deps.sh
@aravindtga
aravindtga marked this pull request as ready for review July 14, 2026 13:00
@aravindtga
aravindtga requested review from a team July 14, 2026 13:00
@aravindtga
aravindtga requested a review from kispaljr as a code owner July 14, 2026 13:00
@dosubot dosubot Bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Jul 14, 2026
@github-actions
github-actions Bot requested a review from Copilot July 14, 2026 13:01

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

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

Comment thread scripts/go-upgrade/upgrade.sh Outdated
Comment thread scripts/go-upgrade/upgrade.sh Outdated
Comment thread scripts/go-upgrade/upgrade.sh
Comment thread scripts/go-upgrade/lib/workspace.sh
Comment thread scripts/go-upgrade/lib/verify.sh
Signed-off-by: Aravindhan Ayyanathan <aravindhan.a@est.tech>
@aravindtga
aravindtga force-pushed the add-upgrade-tooling branch from d5b1e87 to de28a9d Compare July 14, 2026 13:29
Signed-off-by: Aravindhan Ayyanathan <aravindhan.a@est.tech>
@sonarqubecloud

Copy link
Copy Markdown

@aravindtga

Copy link
Copy Markdown
Contributor Author

Moved this PR to Kpt repository kptdev/kpt#4651

@aravindtga aravindtga closed this Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants