Skip to content

Removing unique porch deployment repo type functionality + now dead plumbing - #1170

Open
Catalin-Stratulat-Ericsson wants to merge 4 commits into
kptdev:mainfrom
Nordix:patch-remove-deploy-repo-func
Open

Removing unique porch deployment repo type functionality + now dead plumbing#1170
Catalin-Stratulat-Ericsson wants to merge 4 commits into
kptdev:mainfrom
Nordix:patch-remove-deploy-repo-func

Conversation

@Catalin-Stratulat-Ericsson

@Catalin-Stratulat-Ericsson Catalin-Stratulat-Ericsson commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Removing unique deployment repo type functionality + plumbing


Description

  • What changed: deployment & non deployment porch.repository type objects will act identically
  • Why it’s needed: there is only 1 difference between those 2 repo types and that's just during clone and only modifies package-context.yaml kpt.dev.xxx resource back to template spec.
  • How it works: removed if deployment repo logic + any stale plumbing now resulting from said removal
    • [+] Removed TestCloneIntoDeploymentRepository() Test because its whole purpose was to check for the feature this PR removes

Related Issue(s)

  • Closes/Fixes #

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

Testing Instructions (Optional)


Additional Notes (Optional)

  • Known issues:
  • Further improvements: There will likely be a later PR to remove the deployment flag altogether from the repository resource + deprecation of it from the API but thats for later
  • Review notes:

AI Disclosure

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

Signed-off-by: Catalin-Stratulat-Ericsson <catalin.stratulat@ericsson.com>
@netlify

netlify Bot commented Sep 3, 2026

Copy link
Copy Markdown

Deploy Preview for kpt-porch ready!

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

@Catalin-Stratulat-Ericsson Catalin-Stratulat-Ericsson changed the title Removing unique deployment repo type functionality + plumbing Removing unique porch deployment repo type functionality + plumbing Sep 3, 2026
@Catalin-Stratulat-Ericsson Catalin-Stratulat-Ericsson changed the title Removing unique porch deployment repo type functionality + plumbing Removing unique porch deployment repo type functionality + now dead plumbing Sep 3, 2026
…tx generation

Signed-off-by: Catalin-Stratulat-Ericsson <catalin.stratulat@ericsson.com>
Signed-off-by: Catalin-Stratulat-Ericsson <catalin.stratulat@ericsson.com>
Signed-off-by: Catalin-Stratulat-Ericsson <catalin.stratulat@ericsson.com>

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.

🟢 Approval recommended

The refactor cleanly removes the deployment-repo special casing and updates all verified call sites/tests accordingly without leaving dangling references.

Pull request overview

This PR removes the remaining “deployment repository” special-case behavior so deployment and non-deployment porch.repository objects behave identically, and cleans up the now-dead supporting plumbing and tests.

Changes:

  • Removes deployment-only clone behavior (package-context generation) and associated task/mutation plumbing.
  • Simplifies the TaskHandler.ApplyTask API by removing repository/package-config parameters that are no longer used.
  • Deletes the e2e test and unit/golden tests that exclusively validated the removed deployment-repo behavior.
File summaries
File Description
test/e2e/api/rpkg_clone_test.go Removes the e2e test covering deployment-repo-only clone behavior and the now-unused import.
pkg/task/testdata/context/input/Kptfile Removes golden test input data for package-context generation.
pkg/task/testdata/context/input/bucket.yaml Removes golden test input data for package-context generation.
pkg/task/testdata/context/expected/package-context.yaml Removes golden expected output for package-context generation.
pkg/task/testdata/context/expected/Kptfile Removes golden expected output for package-context generation.
pkg/task/testdata/context/expected/bucket.yaml Removes golden expected output for package-context generation.
pkg/task/taskhandler.go Updates the TaskHandler interface to the simplified ApplyTask signature.
pkg/task/pkgctxt.go Deletes the package-context generator mutation implementation.
pkg/task/pkgctxt_test.go Deletes the unit test and golden update flow for the package-context generator.
pkg/task/generictaskhandler.go Updates task handling to use the simplified mutation mapping and ApplyTask signature.
pkg/task/generictaskhandler_test.go Updates tests to match the simplified ApplyTask/mutation mapping APIs.
pkg/task/clone.go Removes deployment-only package-context generation during clone.
pkg/repository/package.go Removes BuildPackageConfig and related context-config extraction helpers now made obsolete.
pkg/engine/engine.go Removes package-config construction and updates task application call site.
pkg/engine/engine_test.go Updates the task handler mock and expectations to match the new ApplyTask signature.
Review details
  • Files reviewed: 15/15 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@sonarqubecloud

sonarqubecloud Bot commented Sep 4, 2026

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.

🟢 Approval recommended

The refactor consistently removes the deployment-only clone behavior and updates all call sites/tests for the simplified task handler interface without leaving dangling references.

Review details
  • Files reviewed: 15/15 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

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.

2 participants