Skip to content

Add end to end tests for subpackage support on the Porch v1alpha1 API#1013

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

Add end to end tests for subpackage support on the Porch v1alpha1 API#1013
liamfallon wants to merge 40 commits into
kptdev:mainfrom
Nordix:subpackage-impl-e2e

Conversation

@liamfallon
Copy link
Copy Markdown
Contributor

@liamfallon liamfallon commented May 28, 2026

Add end to end tests for subpackage support on the Porch v1alpha1 API


Important

The CI on this PR will not pass until #1009 is merged

Description

  • What changed: End to end subpackage tests added
  • Why it’s needed: There were no end to end test up to now
  • How it works: The endto end success and failure cases for subpackage clone and upgrade are tested

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

AI Disclosure

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

liamfallon added 30 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>
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>
Copilot AI review requested due to automatic review settings May 28, 2026 12:19
@netlify
Copy link
Copy Markdown

netlify Bot commented May 28, 2026

Deploy Preview for kpt-porch ready!

Name Link
🔨 Latest commit 671ec08
🔍 Latest deploy log https://app.netlify.com/projects/kpt-porch/deploys/6a184c78c7073900088eb093
😎 Deploy Preview https://deploy-preview-1013--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 liamfallon changed the title Subpackage impl e2e Add end to end tests for subpackage support on the Porch v1alpha1 API May 28, 2026
@liamfallon liamfallon self-assigned this May 28, 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

This PR adds end-to-end coverage for v1alpha1 subpackage clone/upgrade behavior and introduces supporting implementation changes in the task handler and upgrade mutation to make subpackage operations work end-to-end.

Changes:

  • Add new e2e scenarios covering subpackage clone/upgrade success and failure cases (including nested paths).
  • Add subpackage-aware handling in the generic task handler (injecting/upgrading subpackage resources into the parent package).
  • Add subpackage-aware filtering in the upgrade mutation and add unit tests for subpackage dir validation/helpers.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
test/e2e/api/rpkg_subpkg_test.go New e2e tests exercising subpackage clone/upgrade success and failure scenarios.
pkg/task/upgrade.go Filters local resources to a subpackage subtree when SubpackageDir is set.
pkg/task/upgrade_test.go Adds unit tests for upgrade behavior when SubpackageDir is present/missing.
pkg/task/generictaskhandler.go Applies subpackage clone/upgrade tasks by merging subpackage resources into the parent revision.
pkg/task/generictaskhandler_test.go Adds tests for subpackage task application and resource insertion/upgrade behavior.
api/porch/v1alpha1/util.go Adds SubpackageDir validation and changes GetSubpackageDir signature/behavior.
api/porch/v1alpha1/util_test.go Adds tests for SubpackageDir validation and GetSubpackageDir.

Comment thread api/porch/v1alpha1/util.go
Comment thread api/porch/v1alpha1/util.go Outdated
Comment thread api/porch/v1alpha1/util.go Outdated
Comment thread pkg/task/generictaskhandler.go Outdated
Comment thread test/e2e/api/rpkg_subpkg_test.go
Comment thread test/e2e/api/rpkg_subpkg_test.go
Comment thread test/e2e/api/rpkg_subpkg_test.go
Comment thread test/e2e/api/rpkg_subpkg_test.go
Comment thread test/e2e/api/rpkg_subpkg_test.go
Comment thread test/e2e/api/rpkg_subpkg_test.go
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 13:46
@liamfallon liamfallon force-pushed the subpackage-impl-e2e branch from 9a73502 to 05106cf Compare May 28, 2026 13:46
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 7 out of 7 changed files in this pull request and generated 5 comments.

Comment thread pkg/task/generictaskhandler.go
Comment thread test/e2e/api/rpkg_subpkg_test.go
Comment thread test/e2e/api/rpkg_subpkg_test.go Outdated
Comment thread test/e2e/api/rpkg_subpkg_test.go Outdated
Comment thread pkg/task/generictaskhandler.go
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Write end to end tests for the v1alpha1 implementation of subpackage clone and upgrade support

2 participants