[Backport release-1.15] fix: ignore invalid resources when composing #5486
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.
Description of your changes
Fixes #5292.
Fixes #5114.
This PR fixes the stated issues by implementing a change in the resource application approach. Even in cases where one of the composed resources is invalid, we will proceed to apply other resources. This adjustment ensures that eventually consistent Compositions work as intended, while still emitting Warnings events and setting the XR's Sync Condition to false to signal the issue to consumers.
Sync and Ready conditions will adhere to the following logic:
While at it, we decided to revise the execution order of the XR status update for Pipeline Compositions, ensuring it occurs after the application of composed resources. This modification serves two key purposes: firstly, it ensures the process aligns with the execution order in the PTComposer. Secondly, it prevents an invalid XR status from obstructing the application of composed resources, thereby enabling eventually consistent compositions to subsequently yield a valid XR status.
I have:
make reviewable
to ensure this PR is ready for review.[ ] Linked a PR or a docs tracking issue to document this change.[ ] Addedbackport release-x.y
labels to auto-backport this PR.Need help with this checklist? See the cheat sheet.