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(STONEINTG-1087): retry longer to fetch App from ITS, and stop processing if not found #993

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dheerajodha
Copy link
Member

  • There are some cases where the App and ITS are created almost at the same time.
  • This causes a problem when the App is not found while the controllers reconcile ITS.
  • To fix this, we increased the retry time from 10 ms to 10 seconds. This should give enough time to fetch the App.
  • And if we're still unable to find App, we stop reconciling, since there's no point in reconciling an ITS without any parent.

Maintainers will complete the following section

Copy link

openshift-ci bot commented Jan 20, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@codecov-commenter
Copy link

codecov-commenter commented Jan 20, 2025

Codecov Report

Attention: Patch coverage is 78.94737% with 4 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@403c750). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...nternal/controller/scenario/scenario_controller.go 78.94% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #993   +/-   ##
=======================================
  Coverage        ?   64.14%           
=======================================
  Files           ?       49           
  Lines           ?     6281           
  Branches        ?        0           
=======================================
  Hits            ?     4029           
  Misses          ?     1893           
  Partials        ?      359           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines 94 to 105
logger.Error(err, "Failed to get Application from the IntegrationTestScenario after retry", "application", scenario.Spec.Application)
return ctrl.Result{}, nil
Copy link
Member Author

Choose a reason for hiding this comment

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

Once we have retried long enough for the Application to exist in the cluster, and still couldn't find it, the operator will stop processing this ITS. But in that case, this ITS would be an orphan and dangle in the cluster. Do you think we should delete this ITS here?

Copy link
Collaborator

@dirgim dirgim Jan 21, 2025

Choose a reason for hiding this comment

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

Hm, not sure, maybe we can at least mark it as invalid, wdyt?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea, I'm thinking that ITS would still dangle, but then it would be easier to perform a manual cleanup eventually.

* There are some case where the App and ITS are created
  almost at the same time. This causes problem when the
  App is not found while the controllers reconcile ITS.
* To fix this, we increased the retry time from 10 ms
  to 10 seconds.
* This should give enough time to fetch the App.
* And if we're still unable to find App, we stop
  reconciling, since there's no point in reconciling
  an ITS without any parent.

Signed-off-by: Dheeraj<djodha@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants