[Backport v1.26] Add experiment signals to fleet remote config#2920
Conversation
* initial experiment signals * Review suggestions * [FA] Add cluster_name as tag (#2878) * Add cluster_name as tag * Add updater_type * add test logs * more logs * use installer config * Logging + race * More edge cases * Add package state pop * Fix lint * package state * Check expected state * no nsn for stop/promote * Tweak logging * Review suggestions + 2x promote fix --------- Co-authored-by: Paul <[email protected]> (cherry picked from commit 0dcbf67)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 79d6e044cc
ℹ️ 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".
| if rollbackTarget == "" { | ||
| return fmt.Errorf("no previous revision to roll back to") | ||
| ctrl.LoggerFrom(ctx).Info("No previous revision to roll back to, skipping spec restore") | ||
| return nil |
There was a problem hiding this comment.
Restore spec when rollback target is empty
When a stopped (or timeout) reconcile happens before the experiment revision exists, revList may contain only the baseline revision, so findRollbackTarget yields an empty name. This branch now returns success, and restorePreviousSpec still advances the phase, which can acknowledge rollback without actually restoring the pre-experiment spec. In that ordering, status reports rollback/timeout while the experiment config remains applied.
Useful? React with 👍 / 👎.
| nsn := d.experimentTarget | ||
| if nsn.Name == "" { | ||
| return fmt.Errorf("stop DatadogAgent experiment: no experiment target set") |
There was a problem hiding this comment.
Derive stop/promote target from persistent state
stopDatadogAgentExperiment relies on d.experimentTarget, which is only populated by a prior start signal and is not persisted across process restarts. After leader restart/failover during a running experiment, this check fails and stop/promote requests are rejected with no experiment target set, even though the DatadogAgent status still has an active experiment. This makes experiment control non-resumable after restart.
Useful? React with 👍 / 👎.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## v1.26 #2920 +/- ##
==========================================
+ Coverage 40.05% 40.52% +0.46%
==========================================
Files 319 320 +1
Lines 28052 28376 +324
==========================================
+ Hits 11237 11500 +263
- Misses 15993 16032 +39
- Partials 822 844 +22
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:
|
Backport 0dcbf67 from #2872.
What does this PR do?
Adds experiment signals: start, stop, and promote. This depends on #2838. The latest commit contains the relevant changes
Motivation
https://datadoghq.atlassian.net/browse/CONTP-1424
https://datadoghq.atlassian.net/browse/CONTP-1425
https://datadoghq.atlassian.net/browse/CONTP-1426
Additional Notes
Merge after #2838
Minimum Agent Versions
Are there minimum versions of the Datadog Agent and/or Cluster Agent required?
Describe your test plan
TBD
Checklist
bug,enhancement,refactoring,documentation,tooling, and/ordependenciesqa/skip-qalabel