feat: rollout total duration tracking#4774
Conversation
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Published E2E Test Results 4 files 4 suites 4h 11m 30s ⏱️ For more details on these failures, see this check. Results for commit 2851889. ♻️ This comment has been updated with latest results. |
Published Unit Test Results2 553 tests 2 553 ✅ 3m 24s ⏱️ Results for commit 2851889. ♻️ This comment has been updated with latest results. |
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4774 +/- ##
==========================================
- Coverage 85.09% 85.03% -0.06%
==========================================
Files 166 166
Lines 19136 19315 +179
==========================================
+ Hits 16283 16424 +141
- Misses 2005 2024 +19
- Partials 848 867 +19
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
…-rollouts into total-rollout-time
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
| completionStatus = v1alpha1.CompletionStatusPromoted | ||
| } | ||
| durationStatus.CompleteRollout(now, completionStatus) | ||
| c.metricsServer.EmitRolloutDuration(durationStatus) |
There was a problem hiding this comment.
EmitRolloutDuration runs before the status patch in persistRolloutStatus / patchCondition. On conflict/retry, FinishedAt is still unset and the same completion is observed again.
There was a problem hiding this comment.
I am not sure there is a way around this. The 2 operations cannot be atomic. I prefer doing the status patch at the absolute end then emitting metrics.
In an ideal scenario, the controller would eventually RetryOnConflict on the status update, but that seems out of scope for this PR since it could have side effects.
Maybe what this code could do is return a callback function to do the metric(s) emission, and this callback is performed after the Patch? It does add a little complexity, but wouldn't affect the logic too much. Wdyt?
| prometheus.HistogramOpts{ | ||
| Name: "rollout_duration_seconds_progression", | ||
| Help: "Active progression time for a rollout (excluding manual pause time)", | ||
| Buckets: []float64{30, 60, 120, 300, 600, 900, 1800, 3600}, |
There was a problem hiding this comment.
Progression buckets stop at 3600s; total goes to 28800s. A long non-paused rollout still has useful total resolution but only hits +Inf for progression.
There was a problem hiding this comment.
I did set progression much lower since it does not contains the manually paused steps, which can be very long.
I feel that there are not much difference investigating rollouts that took more than 1h compared to rollouts that took more than 2h+ of active progression time.
Maybe in the future, we can track the active/automated paused time outside this metric or with a label.
| // CompletionStatusSuperseded indicates the rollout was superseded by a new rollout | ||
| CompletionStatusSuperseded CompletionStatus = "superseded" | ||
| // CompletionStatusRollbacked indicates the rollout was explicitly rolled back to a previous version | ||
| CompletionStatusRollbacked CompletionStatus = "rollbacked" |
There was a problem hiding this comment.
rollbacked / fast-rollbacked are non-standard English. Renaming after release breaks the metrics label API.
There was a problem hiding this comment.
What would be the proper terms for Rollout?
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
|



Requires #4785