Refactor experiment signals#2944
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 56971366d8
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
5697136 to
4dac8a7
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2944 +/- ##
==========================================
+ Coverage 40.90% 41.50% +0.60%
==========================================
Files 333 335 +2
Lines 28327 28714 +387
==========================================
+ Hits 11588 11919 +331
- Misses 15960 16001 +41
- Partials 779 794 +15
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
🛑 Gate Violations
ℹ️ Info🎯 Code Coverage (details) Useful? React with 👍 / 👎 This comment will be updated automatically if new data arrives.🔗 Commit SHA: f269455 | Docs | Datadog PR Page | Give us feedback! |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f0e5eb7b83
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
|
||
| // Process annotation-based signals first — they take priority over | ||
| // automatic timeout since they represent explicit human/RC intent. | ||
| pendingClearID, err := r.processExperimentSignal(ctx, instance, newStatus, revList) |
There was a problem hiding this comment.
Clear no-op experiment signals before returning
manageExperiment now processes annotation signals first, but when status.experiment is nil the function returns immediately and never reaches the annotation-clearing block. That leaves no-op signals (for example rollback/promote when no experiment is active) stuck on the resource, causing repeated reprocessing and making daemon phase waits fail to converge. Ensure processed signals are cleared even when there is no current experiment status.
Useful? React with 👍 / 👎.
* refactor * review fixes * Review suggestions * add cluster uid tag * Fix version check * Update default versions * separate goroutine for acks * Review suggestions * Simplify refactor * fix go.mod * skip checking experiment ID on promote signal * exclude fleet.datadoghq.com annotation from controller revision --------- (cherry picked from commit 3df38d6) Co-authored-by: khewonc <[email protected]> Co-authored-by: Paul Coignet <[email protected]> Co-authored-by: levan-m <[email protected]> Co-authored-by: Levan Machablishvili <[email protected]>
* refactor * review fixes * Review suggestions * add cluster uid tag * Fix version check * Update default versions * separate goroutine for acks * Review suggestions * Simplify refactor * fix go.mod * skip checking experiment ID on promote signal * exclude fleet.datadoghq.com annotation from controller revision --------- Co-authored-by: Paul Coignet <[email protected]> Co-authored-by: levan-m <[email protected]> Co-authored-by: Levan Machablishvili <[email protected]>
What does this PR do?
Refactor experiment signals for more robustness. Instead of having both daemon and controller write to DDA status, have only controller write to DDA status and daemon modify DDA annotations
Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
Minimum Agent Versions
Are there minimum versions of the Datadog Agent and/or Cluster Agent required?
Describe your test plan
Write there any instructions and details you may have to test your PR.
Checklist
bug,enhancement,refactoring,documentation,tooling, and/ordependenciesqa/skip-qalabel