Skip to content

Use allowlist for dap validation#3130

Merged
khewonc merged 4 commits into
mainfrom
khewonc/dap-allowlist
Jun 17, 2026
Merged

Use allowlist for dap validation#3130
khewonc merged 4 commits into
mainfrom
khewonc/dap-allowlist

Conversation

@khewonc

@khewonc khewonc commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

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?

  • Agent: vX.Y.Z
  • Cluster Agent: vX.Y.Z

Describe your test plan

With DAP enabled in the operator, create a DAP that configures a config field that's not in the allowlist:

    config:
      override:
        nodeAgent:
          nodeSelector:
            disktype: ssd

You should see the the error component node selector override is not supported in the DAP status:

status:
  conditions:
    - type: Valid
      status: "False"
      reason: Invalid
      message: "profile spec is invalid: component node selector override is not supported"
    - type: Applied
      status: Unknown

Checklist

  • PR has at least one valid label: bug, enhancement, refactoring, documentation, tooling, and/or dependencies
  • PR has a milestone or the qa/skip-qa label
  • All commits are signed (see: signing commits)

@khewonc khewonc added this to the v1.29.0 milestone Jun 11, 2026
@khewonc khewonc added the enhancement New feature or request label Jun 11, 2026
@khewonc
khewonc requested a review from a team June 11, 2026 21:48

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread api/datadoghq/v1alpha1/datadogagentprofile_validation.go
@codecov-commenter

codecov-commenter commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.72340% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 44.03%. Comparing base (250343a) to head (0230c6e).

Files with missing lines Patch % Lines
...tadoghq/v1alpha1/datadogagentprofile_validation.go 78.72% 6 Missing and 4 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3130      +/-   ##
==========================================
+ Coverage   43.96%   44.03%   +0.07%     
==========================================
  Files         377      377              
  Lines       30774    30713      -61     
==========================================
- Hits        13530    13525       -5     
+ Misses      16327    16300      -27     
+ Partials      917      888      -29     
Flag Coverage Δ
unittests 44.03% <78.72%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...tadoghq/v1alpha1/datadogagentprofile_validation.go 83.50% <78.72%> (+29.07%) ⬆️

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 250343a...0230c6e. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@datadog-datadog-prod-us1-2

This comment has been minimized.

@tbavelier tbavelier left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall, simply needs to fix the test now that APM is allowed


func TestValidateDatadogAgentProfileFeaturesAllowlist(t *testing.T) {
allowedFeatureFields := map[string]struct{}{
"GPU": {},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"GPU": {},
"GPU": {},
"APM": {},

This test fails while it should pass: it's because it expects APM to be rejected while it should not anymore as part of this PR on top of 3073 (this also shows our CI is not running tests on /api)

Image

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#3140 so CI should reveal now it fails (merged main in your branch)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@khewonc
khewonc merged commit 2e6ac4d into main Jun 17, 2026
29 of 38 checks passed
@khewonc
khewonc deleted the khewonc/dap-allowlist branch June 17, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants