[FA] feat: read group_version_kind from UPDATER_TASK.params#2958
[FA] feat: read group_version_kind from UPDATER_TASK.params#2958coignetp wants to merge 1 commit intopaul/fa-fixup-tasksfrom
Conversation
…f hardcoded default Add `group_version_kind` to `experimentParams` so the backend can specify the target GVK per task. `resolveOperation` now assigns GVK from task params before validation, falling back to `datadoghq.com/v2alpha1/DatadogAgent` for tasks that predate this field.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2c3eb6c89e
ℹ️ 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".
| gvk := req.Params.GroupVersionKind | ||
| if gvk.Kind == "" { | ||
| gvk = v2alpha1.GroupVersion.WithKind("DatadogAgent") | ||
| } | ||
| op.GroupVersionKind = gvk |
There was a problem hiding this comment.
Validate installer config GVK before overriding it
Overwriting op.GroupVersionKind from task params before validateOperation means the installer config’s own group_version_kind is no longer checked at all. If an INSTALLER_CONFIG operation is malformed or targets another kind, this path now rewrites it to DatadogAgent (or any task-provided kind) and proceeds, so a mismatched patch can be applied to the DatadogAgent instead of failing fast. This is a behavioral regression from the prior flow where invalid operation kinds in config were rejected.
Useful? React with 👍 / 👎.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## paul/fa-fixup-tasks #2958 +/- ##
=======================================================
- Coverage 41.35% 41.00% -0.36%
=======================================================
Files 327 324 -3
Lines 29310 28763 -547
=======================================================
- Hits 12121 11793 -328
+ Misses 16321 16115 -206
+ Partials 868 855 -13
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 7 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
🎯 Code Coverage (details) 🔗 Commit SHA: 2c3eb6c | Docs | Datadog PR Page | Give us feedback! |
Stacked on #2952.
Summary
group_version_kindfield toexperimentParams(parsed fromUPDATER_TASK.params)resolveOperationnow reads GVK from task params instead of hardcodingdatadoghq.com/v2alpha1/DatadogAgentTestStartDatadogAgentExperiment_NoDDAOperationto assert on task params GVK (since that's now the authoritative source)TestResolveOperation_GVKFromTaskParamsandTestResolveOperation_GVKFallbackTest plan
go test ./pkg/fleet/... -run TestResolveOperationgo test ./pkg/fleet/...🤖 Generated with Claude Code