Skip to content

Independent Subpackage Clone and Upgrade: v1alpha1 server implementation#1009

Open
liamfallon wants to merge 35 commits into
kptdev:mainfrom
Nordix:subpackage-impl
Open

Independent Subpackage Clone and Upgrade: v1alpha1 server implementation#1009
liamfallon wants to merge 35 commits into
kptdev:mainfrom
Nordix:subpackage-impl

Conversation

@liamfallon
Copy link
Copy Markdown
Contributor

Independent Subpackage Clone and Upgrade: v1alpha1 server implementation


Description

  • What changed: Support for cloning and upgrading independent subpackages is added.
  • Why it’s needed: Independent subpackages could not be cloned or upgraded before
  • How it works: Allows clone and upgrade of independent subpackages

Related Issue(s)


Type of Change

  • Bug fix
  • New feature
  • Enhancement
  • Refactor
  • Documentation
  • Tests
  • Other: ________

Checklist

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

Additional Notes (Optional)

  • Known issues:
  • Further improvements:
  • Review notes:

AI Disclosure

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

I have used Amazon Q to generate utility funcitons in teh code and to generate most of the tests.

Copilot AI review requested due to automatic review settings May 26, 2026 14:00
@liamfallon liamfallon self-assigned this May 26, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds support for cloning and upgrading independent subpackages by introducing subpackage-dir validation, applying subpackage tasks pre-mutation, and updating upgrade behavior to operate on subpackage-scoped resources.

Changes:

  • Add SubpackageDir validation helper (IsValidSubpackageDir) and enforce it during PR mutations.
  • Apply a dedicated “subpackage task” flow that clones/upgrades subpackage resources into a parent package’s resources.
  • Extend upgrade logic to scope local resources to a subpackage when SubpackageDir is provided, plus substantial new tests.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 12 comments.

File Description
pkg/task/upgrade.go Scopes local resources to a subpackage before performing upgrade.
pkg/task/generictaskhandler.go Validates subpackage dir, applies subpackage task, and implements resource insert/upgrade helpers.
api/porch/v1alpha1/util.go Adds IsValidSubpackageDir for SubpackageDir validation.
pkg/task/generictaskhandler_test.go Adds test coverage for subpackage clone/upgrade task behavior and edge cases.

Comment thread pkg/task/generictaskhandler.go Outdated
Comment thread pkg/task/generictaskhandler.go Outdated
Comment thread pkg/task/generictaskhandler.go Outdated
Comment thread pkg/task/generictaskhandler.go Outdated
Comment thread pkg/task/generictaskhandler.go Outdated
Comment thread api/porch/v1alpha1/util.go Outdated
Comment thread api/porch/v1alpha1/util.go Outdated
Comment thread pkg/task/upgrade.go Outdated
Comment thread pkg/task/generictaskhandler_test.go Outdated
Comment thread pkg/task/generictaskhandler_test.go Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 5 out of 5 changed files in this pull request and generated 8 comments.

Comment thread api/porch/v1alpha1/util.go
Comment thread pkg/task/generictaskhandler.go Outdated
Comment thread pkg/task/generictaskhandler.go Outdated
Comment thread pkg/task/generictaskhandler.go
Comment thread pkg/task/generictaskhandler.go Outdated
Comment thread pkg/task/generictaskhandler.go Outdated
Comment thread pkg/task/generictaskhandler.go Outdated
Comment thread pkg/task/upgrade_test.go
@netlify
Copy link
Copy Markdown

netlify Bot commented May 28, 2026

Deploy Preview for kpt-porch ready!

Name Link
🔨 Latest commit 4cda4db
🔍 Latest deploy log https://app.netlify.com/projects/kpt-porch/deploys/6a1846f36313ea0008ae51f3
😎 Deploy Preview https://deploy-preview-1009--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.

liamfallon added 20 commits May 28, 2026 08:22
Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
liamfallon added 12 commits May 28, 2026 08:22
Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
Copilot AI review requested due to automatic review settings May 28, 2026 07:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 5 out of 5 changed files in this pull request and generated no new comments.

Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
Copilot AI review requested due to automatic review settings May 28, 2026 13:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 6 out of 6 changed files in this pull request and generated 1 comment.

Comment thread api/porch/v1alpha1/util.go Outdated
Signed-off-by: liamfallon <liam.fallon@est.tech>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement subpackage support in the Porch server for the v1alpha1 API

2 participants