Skip to content

Do not use direct apireader client and instead make f.etcdSecretPresent as part of existing calls#3180

Merged
levan-m merged 1 commit into
levan-m/introspection-ddai-fix-podstartupfrom
tbavelier/review-3179
Jun 23, 2026
Merged

Do not use direct apireader client and instead make f.etcdSecretPresent as part of existing calls#3180
levan-m merged 1 commit into
levan-m/introspection-ddai-fix-podstartupfrom
tbavelier/review-3179

Conversation

@tbavelier

@tbavelier tbavelier commented Jun 19, 2026

Copy link
Copy Markdown
Member

What does this PR do?

A brief description of the change being made with this pull request.

Motivation

Review of #3179

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

Write there any instructions and details you may have to test your PR.

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)

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Jun 19, 2026

Copy link
Copy Markdown

Code Coverage  Pipelines

Fix all issues with BitsAI

🛑 Gate Violations

🎯 1 Code Coverage issue detected

A Patch coverage percentage gate may be blocking this PR.

Patch coverage: 50.00% (threshold: 80.00%)

⚠️ Warnings

🚦 2 Pipeline jobs failed

pull request linter | Check Milestone   View in Datadog   GitHub Actions

pull request linter | build   View in Datadog   GitHub Actions

ℹ️ Info

🎯 Code Coverage (details)
Patch Coverage: 50.00%
Overall Coverage: 44.65%

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 0286a7d | Docs | Datadog PR Page | Give us feedback!

@tbavelier tbavelier added qa/skip-qa enhancement New feature or request labels Jun 19, 2026

@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: 0286a7d906

ℹ️ 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".


f.etcdSecretPresent = true
return true
return f.etcdSecretPresent

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Restore etcd secret detection for profile agents

When DatadogAgentProfile is enabled, non-default profile DDAIs skip manageFeatureDependencies (controller_reconcile_v2.go lines 68-83) but still run reconcileV2Agent (line 106), so this field is never set for those feature instances. On OpenShift with control plane monitoring and a profile-selected node pool, the default DDAI can create/retain etcd-metric-client, but profile DaemonSets will see false here and omit the etcd cert volume/mount, preventing the etcd check from authenticating on those nodes.

Useful? React with 👍 / 👎.

@tbavelier tbavelier mentioned this pull request Jun 19, 2026
3 tasks
@codecov-commenter

codecov-commenter commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 3 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (levan-m/introspection-ddai-fix-podstartup@09b8ef8). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...dogagent/feature/controlplanemonitoring/feature.go 50.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@                             Coverage Diff                              @@
##             levan-m/introspection-ddai-fix-podstartup    #3180   +/-   ##
============================================================================
  Coverage                                             ?   44.40%           
============================================================================
  Files                                                ?      378           
  Lines                                                ?    30912           
  Branches                                             ?        0           
============================================================================
  Hits                                                 ?    13726           
  Misses                                               ?    16290           
  Partials                                             ?      896           
Flag Coverage Δ
unittests 44.40% <50.00%> (?)

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

Files with missing lines Coverage Δ
...dogagent/feature/controlplanemonitoring/feature.go 52.41% <50.00%> (ø)

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 09b8ef8...0286a7d. Read the comment docs.

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

@levan-m
levan-m merged commit 6dba535 into levan-m/introspection-ddai-fix-podstartup Jun 23, 2026
42 of 45 checks passed
@levan-m
levan-m deleted the tbavelier/review-3179 branch June 23, 2026 14:15
levan-m added a commit that referenced this pull request Jun 23, 2026
* Avoid agent getting stuck in container creating

* Do not use direct apireader client and instead make f.etcdSecretPresent as part of existing calls (#3180)

---------

Co-authored-by: Timothée Bavelier <[email protected]>
levan-m added a commit that referenced this pull request Jun 24, 2026
* Extend introspection and support DDAI code path

* handle edge cases when user unsets annotation

* pr review fixes

* skip adding default provider to ddai

* remove logging

* Copy OpenShift etcd metric secret (#3131)

* copy OpenShift etcd metric secret

* Add 5s timeout

* Keep existing secret if source read fails

* fix podstartup (#3179)

* Avoid agent getting stuck in container creating

* Do not use direct apireader client and instead make f.etcdSecretPresent as part of existing calls (#3180)

---------

Co-authored-by: Timothée Bavelier <[email protected]>

---------

Co-authored-by: Timothée Bavelier <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants