-
Notifications
You must be signed in to change notification settings - Fork 119
Refactor status collector architecture with structured errors #2016
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2016 +/- ##
==========================================
- Coverage 48.12% 48.09% -0.03%
==========================================
Files 233 235 +2
Lines 29229 29281 +52
==========================================
+ Hits 14066 14083 +17
- Misses 14131 14168 +37
+ Partials 1032 1030 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Daniele Martinoli <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general I think this is a very nice refactor, one question about concurrent access inline
Signed-off-by: Daniele Martinoli <[email protected]>
- Removed the `Idle` phase from `SyncPhase` and updated related logic to ensure only `Syncing`, `Complete`, and `Failed` phases are used. - Enhanced the `ShouldSync` method to avoid syncing when the requeue timeout did not elapse. - Avoid updating sync status at all if sync is not needed (it would cause a new reconciliation) Signed-off-by: Daniele Martinoli <[email protected]>
@jhrozek @yrobla I reviewed the initial implementation again to:
The above changes prevent continuous reconciliation loops in case of failures, properly store incremental attempt counter in the sync status and respect the scheduled retries. Hopefully, the E2E tests will confirm that everything is fine |
Signed-off-by: Daniele Martinoli <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome work @dmartinol
Fixes #2004
Collector
interface withSyncStatusCollector
andAPIStatusCollector
to pass only the needed one to the processing methodsError
type to transport condition and phase information to the root, instead of a generic errorThis change is needed to solve #1749 for error paths: some more changes may needed to fix the e2e tests.