Use allowlist for dap validation#3130
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5a79a7ad3b
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| var datadogAgentProfileFeatureAllowlist = map[string]struct{}{ | ||
| "gpu": {}, | ||
| "apm": {}, |
There was a problem hiding this comment.
Remove APM from the profile feature allowlist
When a DatadogAgentProfile sets spec.config.features.apm, this allowlist entry makes validation return nil even though DAP feature validation was previously limited to GPU and the new reflection test still expects APM to be rejected. I checked go test ./api/datadoghq/v1alpha1 -run TestValidateDatadogAgentProfileFeaturesAllowlist, and it fails on the APM subtest because this line accepts an unsupported profile feature; unsupported APM profile settings can now be reconciled instead of being rejected.
Useful? React with 👍 / 👎.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3130 +/- ##
=======================================
Coverage 43.35% 43.35%
=======================================
Files 354 354
Lines 30080 30080
=======================================
Hits 13042 13042
Misses 16165 16165
Partials 873 873
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
|
What does this PR do?
Use allowlist for dap validation
Motivation
New features are not denied automatically
https://datadoghq.atlassian.net/browse/CONTP-1451
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
With DAP enabled in the operator, create a DAP that configures a config field that's not in the allowlist:
You should see the the error
component node selector override is not supportedin the DAP status:Checklist
bug,enhancement,refactoring,documentation,tooling, and/ordependenciesqa/skip-qalabel