Repository navigation
Conversation
The restore-only mode requires ALL composed resources to have backup data in the store, but resources like Usage don't have external names since they're not cloud resources. When a v2 composition adds Usage resources that weren't in the v1 backup, the restore step fails because it can't find a backup entry for those new resources. Skip non-managed resource kinds (e.g., Usage) during restore-only validation instead of fatally erroring.
ytsarev
reviewed
Feb 28, 2026
| // These are internal orchestration resources (e.g., Usage) that should be skipped | ||
| // during restore-only validation since they never appear in backup data. | ||
| var nonManagedKinds = map[string]bool{ | ||
| "Usage": true, |
Member
There was a problem hiding this comment.
is it enough to use kind only, not full gvk?
Collaborator
Author
There was a problem hiding this comment.
yes, works fine like this
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.
Summary
restore-onlymode requires all composed resources to have backup data, but non-managed resources likeUsagedon't have external names — they're internal Crossplane orchestration resourcesUsageresources that weren't in the v1 backup, the restore step fatally errors because it can't find a backup entryisNonManagedResource()check that skips known non-managed kinds (e.g.,Usage) during restore-only validation instead of failingTest plan
RequireRestoreSkipsNonManagedResourcestest: validates a composition with both aBucket(has backup data) and aUsage(no backup data) succeeds in restore-only modego buildsucceeds