Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release-1.15] fix: ignore invalid resources when composing #5486

Merged
merged 5 commits into from Mar 27, 2024

Conversation

bobh66
Copy link
Contributor

@bobh66 bobh66 commented Mar 15, 2024

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:

for both Resources and Pipeline compositions: if any of the composed resources fails to apply, the XR's Sync condition is set to false.
only for Resources compositions, in the above scenario, also the XR's Ready condition is set to false.

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:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added or updated unit tests.
  • Added or updated e2e tests.
  • [ ] Linked a PR or a docs tracking issue to document this change.
  • [ ] Added backport release-x.y labels to auto-backport this PR.

Need help with this checklist? See the cheat sheet.

Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com>
(cherry picked from commit f816713)
Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com>
(cherry picked from commit 320a2be)
Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com>
(cherry picked from commit 4b641f8)
Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com>
(cherry picked from commit 4cfc571)
Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com>
(cherry picked from commit 2aaf7cf)
@phisco
Copy link
Contributor

phisco commented Mar 25, 2024

@bobh66, do you need any help here?

@bobh66
Copy link
Contributor Author

bobh66 commented Mar 26, 2024

@phisco I'm trying to understand why the e2e usages test is failing but none of the others are? I don't see anything specific to usages in this change?

@phisco
Copy link
Contributor

phisco commented Mar 26, 2024

Usage e2e is a bit flaky, we have to dig into it further. Rerun and everything passed now. If it's ready for review I'll make sure to check it out further tomorrow 🙏

@bobh66 bobh66 marked this pull request as ready for review March 26, 2024 20:18
@bobh66 bobh66 requested review from negz and a team as code owners March 26, 2024 20:18
@bobh66 bobh66 requested a review from turkenh March 26, 2024 20:18
@phisco phisco merged commit 225713f into release-1.15 Mar 27, 2024
17 checks passed
@negz negz deleted the backport-5365-to-release-1.15 branch May 10, 2024 01:24
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.

None yet

3 participants