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

Open
wants to merge 3 commits 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 80.00000% 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 80.00% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #993   +/-   ##
=======================================
  Coverage        ?   63.86%           
=======================================
  Files           ?       49           
  Lines           ?     6269           
  Branches        ?        0           
=======================================
  Hits            ?     4004           
  Misses          ?     1908           
  Partials        ?      357           

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

@dheerajodha dheerajodha force-pushed the STONEINTG-1087 branch 2 times, most recently from cac7550 to e2af425 Compare January 27, 2025 08:59
* 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<[email protected]>
* Now that we're checking for nil App within the
  scenario_controller.go file,
* AND calling ContinueProcessing() in case of nil App,
* AND marking the Scenario as Invalid in that case,
* We don't need to check and do the same thing on
  scenario_adapter.go file as well, hence removing
  this code.

Signed-off-by: Dheeraj<[email protected]>
* We should add Application to the logger,
  within the controller.go file rather than
  adapter.go file

Signed-off-by: Dheeraj<[email protected]>
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