-
Notifications
You must be signed in to change notification settings - Fork 6.3k
feat: Add observedAt field in application health status to indicate status freshness #21120
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: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
❗ Preview Environment undeploy from Bunnyshell failedSee: Environment Details | Pipeline Logs Available commands (reply to this comment):
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #21120 +/- ##
==========================================
+ Coverage 55.20% 55.22% +0.02%
==========================================
Files 324 324
Lines 55596 55619 +23
==========================================
+ Hits 30689 30713 +24
Misses 22285 22285
+ Partials 2622 2621 -1 ☔ View full report in Codecov by Sentry. |
@svghadi will this feature help with this request argoproj/notifications-engine#99 ? I'm wondering if trigger.on-health-degraded: |
- description: Application has degraded
oncePer: app.status.operationState.syncResult.revision
send:
- app-health-degraded
when: app.status.health.status == 'Degraded' and time.Now().Sub(time.Parse(app.status.health.observedAt)).Minutes() >= 5 Edit: reading the previous PR #18660, looks like |
} | ||
|
||
// We are interested only in refreshing the status, not performing a resource-level comparison. | ||
ctrl.requestAppRefresh(newApp.QualifiedName(), ComparisonWithNothing.Pointer(), nil) |
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.
Hm, I have concerns about triggering a refresh every 30 seconds for each app, this may add up.
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.
I think this has to be reworked to update on each regular refresh and/or refresh triggered by webhook or something else, but it shouldn't trigger new refreshes due to perf reasons. We may need another field refreshedAt if not present.
Related #16972 (comment)
This is a follow PR for #18660 to add
observeAt
field in application health status to indicate status freshness. The change was initial part of #18660 however was split up to unblock the other feature as this has some performance concerns(#18660 (comment)).@blakepettersson will provide some performance data. For more context refer #18660 (comment) .
Changes:
.status.health.observedAt
field that is periodically updated (every 30s) to reflect the freshness of the observed state.observedAt
field every 30s. It enqueues events into theappRefreshQueue
with a comparison option that ensures only the status is refreshed without performing a resource-level comparison.The screen grab below shows that
observedAt
is updated every 30s without affecting thelastTransitionTime
field.Screen.Recording.2024-09-12.at.6.53.06.PM.mov
Checklist: