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

fix(ctrl): Change reconciliation of int in error #4793

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

gansheer
Copy link
Contributor

@gansheer gansheer commented Oct 4, 2023

Description

When the integration is in Error with the Kit condition in error, then if the integration kit referenced is still in error then finish the reconciliation process without any change to the integration.

Fix the health trait to avoid panic errors.

Release Note

Change reconciliation of integration in error

@github-actions
Copy link
Contributor

github-actions bot commented Oct 4, 2023

🐫 Thank you for contributing!

Code Coverage Report ✔️ - Coverage unchanged.

@gansheer gansheer force-pushed the fix/4781_logtrace_integration_error branch from 605823a to c563d10 Compare October 5, 2023 08:02
@gansheer gansheer marked this pull request as ready for review October 5, 2023 08:02
@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2023

🐫 Thank you for contributing!

Code Coverage Report ✔️ - Coverage unchanged.

@gansheer
Copy link
Contributor Author

gansheer commented Oct 5, 2023

I am moving it back to draft to make a first PR with E2E test on existing behavior.

@gansheer gansheer marked this pull request as draft October 5, 2023 13:17
* When the integration is in Error with the Kit condition in error, then if the integration kit referenced is still in error then finish the reconciliation process without any change to the integration.
@gansheer gansheer force-pushed the fix/4781_logtrace_integration_error branch from c563d10 to 60fa5fb Compare October 12, 2023 09:23
@github-actions
Copy link
Contributor

🐫 Thank you for contributing!

Code Coverage Report ✔️ - Coverage unchanged.

@gansheer
Copy link
Contributor Author

So let's recap a little:

The solution proposed is to stop early on the process (before it get to the apply part) when the following conditions are ALL met:

  • Integration status contains a condition IntegrationConditionKitAvailable with status Error
  • Integration status phase is Error
  • IntegrationKit status phase is Error (the one declared by the Integration)

From the e2e test I gathered the following:

  • an Integration with invalid or unknown dependencies : any fix will generate a new Integration Kit => solution OK
  • an Integration with unknown component in route : the IntegrationKit is not generated until all component are known => solution OK
  • an Integration with route compilation error : the IntegrationKit was already generated successfully and any change in the route won't have any impact on the IntegrationKit => solution OK

I really don't see any use case where an IntegrationKit in Error will be able to recover without the creation of a new one. Is there such a process or something that could act directly on an IntegrationKit CR without acting from the Integration CR ?

@squakez @lburgazzoli

@lburgazzoli
Copy link
Contributor

So let's recap a little:

The solution proposed is to stop early on the process (before it get to the apply part) when the following conditions are ALL met:

* Integration status contains a condition `IntegrationConditionKitAvailable` with status `Error`

* Integration status phase is `Error`

* IntegrationKit  status phase is `Error` (the one declared by the Integration)

do we expose in some ways (conditions, phase) at what stage the reconciliation stops ?

Copy link
Contributor

@squakez squakez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, given that the test in #4815 are now passing.

@squakez
Copy link
Contributor

squakez commented Oct 17, 2023

@lburgazzoli given the new E2E test provided by @gansheer, I think we are safe to merge this PR. Basically we stop the latest reconciliation loop to apply traits when both the Integration and the Kit are in an error state. Hence, there is no reason to continue applying trait logic. Do you have any further concern?

@squakez squakez marked this pull request as ready for review October 17, 2023 05:53
@squakez squakez merged commit 77b0290 into apache:main Oct 17, 2023
16 checks passed
@gansheer
Copy link
Contributor Author

do we expose in some ways (conditions, phase) at what stage the reconciliation stops ?

None that I could tell for the Integration CR. As for the IntegrationKit CR its reconciliation after 5 failed builds and I suppose you could consider the status.failure field as an indication that the reconciliation is stopped.

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.

4 participants