Repository navigation
Conversation
- PR controller: request render via annotation for drafts with no source operation (e.g. migrated from v1alpha1); the source trigger never fires for them, so metadata edits were synced to the Kptfile but never rendered - e2e: add zero-data-loss suite for v1alpha1 Draft/Proposed migration (content, packageMetadata, readinessGates, conditions, object metadata, upstreamLock, deployment, clone/edit/nested/DeletionProposed fixtures, repeat syncs, publish/approve via v1alpha2, rollback) - e2e: move draft migration specs to migration_drafts_test.go - Pending spec documents that ownerReferences/finalizers are not carried onto v1alpha2 CRDs Signed-off-by: Fiachra Corcoran <fiachra.corcoran@est.tech>
efiacor
requested review from
kispaljr,
liamfallon and
mozesl-nokia
as code owners
November 24, 2026 14:10
✅ Deploy Preview for kpt-porch ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The sync helper patches an annotation instead of spec.sync.runOnceAt, allowing preservation checks to pass on stale Ready status without running or awaiting the requested syncs.
1 open issue
What changed in this PR
This PR fixes rendering after metadata edits on migrated v1alpha1 drafts, which lack the source operation normally used to trigger rendering in v1alpha2.
Changes:
- Requests rendering through an annotation when no source render is pending.
- Adds unit coverage for source-backed and source-less packages.
- Moves draft migration tests into a dedicated file and adds content-preservation coverage across migration, metadata edits, lifecycle changes, and rollback.
| File | Description |
|---|---|
test/e2e/crd/migration_test.go |
Adds repository options and relocates draft migration specs. |
test/e2e/crd/migration_drafts_test.go |
Houses draft migration tests and adds data-preservation scenarios. |
controllers/packagerevisions/pkg/controllers/packagerevision/metadata.go |
Requests rendering for packages without a pending source operation. |
controllers/packagerevisions/pkg/controllers/packagerevision/metadata_test.go |
Tests render requests for migrated drafts and preserves source-trigger expectations. |
Review effort: Balanced
Signed-off-by: Fiachra Corcoran <fiachra.corcoran@est.tech>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




fix(v1alpha2): render migrated drafts after metadata edits
Description
migration_drafts_test.go.spec.source,status.creationSourceor subpackage op, so the source trigger never fires for them. That left the pipeline un-run and noRenderedcondition.triggerRenderIfNeededsets the annotation when the package is already rendered, or when no source render is pending. New v1alpha2 packages are unchanged.Related Issue(s)
Type of Change
Checklist
Testing Instructions (Optional)
go test ./controllers/packagerevisions/pkg/...make run-in-kind-v1alpha2(ormake reload-controllers)E2E=1 go test -v ./test/e2e/crd -ginkgo.v -ginkgo.label-filter=drafts(expect 18 passed)Additional Notes (Optional)
ownerReferences(e.g. PackageVariant) and user finalizers are not carried onto v1alpha2 CRDs. The v1alpha1 row keeps them, so rollback is fine. This is tracked as a pending spec.push-drafts-to-git=true.false, migrated DB-only drafts have no PRRStore content.AI Disclosure
If so, please describe how: