Skip to content

Set subpackage mutations to always be non-deployment - #1131

Merged
efiacor merged 6 commits into
kptdev:mainfrom
Nordix:remove-deploy-flag
Jul 23, 2026
Merged

Set subpackage mutations to always be non-deployment#1131
efiacor merged 6 commits into
kptdev:mainfrom
Nordix:remove-deploy-flag

Conversation

@liamfallon

@liamfallon liamfallon commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Set subpackage mutations to always be non-deployment, only package mutations can be deployment mutations


Description

  • What changed: The deployment flag is always set to false on subpackage clone and upgrade mutaitons
  • Why it’s needed: Subpackage task mutations for clone and upgrade should never be deployment mutations because subpackage mutations never lead to a depplyable package revision and don't need a separate package-context.yaml. The main package containing the subpackages has the package-context-yaml resources for the entire package and that is what is deployed.
  • How it works: The deploy flag is always false

Fixes: kptdev/kpt#4650

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
liamfallon requested review from a team July 23, 2026 07:00
@liamfallon liamfallon added the bug Something isn't working label Jul 23, 2026
@netlify

netlify Bot commented Jul 23, 2026

Copy link
Copy Markdown

Deploy Preview for kpt-porch ready!

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

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jul 23, 2026
@github-actions
github-actions Bot requested a review from Copilot July 23, 2026 07:00
@liamfallon liamfallon changed the title Set subpackage mutations to always be non-deployment, only Set subpackage mutations to always be non-deployment, only pacakge mutations can be deployment mutations mutations can be deployment mutations Set subpackage mutations to always be non-deployment Jul 23, 2026

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

This PR updates the subpackage task execution path so subpackage mutations are never treated as “deployment” mutations, preventing deployment context generation (e.g., package-context.yaml) from being triggered during subpackage clone/upgrade flows.

Changes:

  • Hard-codes the isDeployment flag to false when mapping the subpackage task (obj.Spec.Tasks[1]) into a mutation.
  • Ensures subpackage clone no longer generates deployment context based on repository deployability settings.

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

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.

perfect. thanks so much for taking this up. to be honest i have no idea why we would ever recreate files that dont exist in the upstream on a clone and no clue why we would do so on deployment repos but not regular ones...

@dosubot dosubot Bot added the lgtm #ededed label Jul 23, 2026
@liamfallon
liamfallon force-pushed the remove-deploy-flag branch from 80a2e7b to 02bc047 Compare July 23, 2026 08:22
Signed-off-by: liamfallon <liam.fallon@est.tech>
Signed-off-by: liamfallon <liam.fallon@est.tech>
@sonarqubecloud

Copy link
Copy Markdown

@liamfallon
liamfallon requested a review from a team July 23, 2026 09:39
@efiacor
efiacor merged commit 9640dd7 into kptdev:main Jul 23, 2026
30 of 32 checks passed
@efiacor
efiacor deleted the remove-deploy-flag branch July 23, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm #ededed size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: package-context.yaml always uses hardcoded name kptfile.kpt.dev, causing GVKNN collision in parent packages with subpackages

6 participants