Skip to content

fix(CONTP-2001): stop asserting the Operator image tag in baseline tests (datadog chart) - #2907

Open
nlchung wants to merge 9 commits into
nicole.chung/contp-2001from
nlchung/contp-2001-pt2
Open

fix(CONTP-2001): stop asserting the Operator image tag in baseline tests (datadog chart)#2907
nlchung wants to merge 9 commits into
nicole.chung/contp-2001from
nlchung/contp-2001-pt2

Conversation

@nlchung

@nlchung nlchung commented Sep 8, 2026

Copy link
Copy Markdown

What this PR does / why we need it:

Same problem as #2897, but in the datadog chart's baseline test — which embeds datadog-operator as a subchart, so it wasn't covered by that fix. Test_baseline_inputs compares every rendered resource untyped (raw map[string]interface{}), and the Operator's own version (image tag, plus the app.kubernetes.io/version label sourced from Chart.AppVersion) shows up on multiple resource kinds the subchart renders — not just the Deployment — so every Operator release broke this baseline too, for no real reason.

  • Strip the image tag and app.kubernetes.io/version label before comparing actual vs. baseline, via stripOperatorReleaseVersion in verifyUntypedResources, reusing the existing utils.ImageRepository helper from fix(CONTP-2001): stop asserting the Operator image tag in baseline tests (operator chart) #2897.
  • Scope the label strip to any resource labeled app.kubernetes.io/name: operator (Deployment, ServiceAccount, ClusterRole, etc.), not just the Deployment — the untyped comparison walks every kind the subchart renders, so a Deployment-only strip (as in fix(CONTP-2001): stop asserting the Operator image tag in baseline tests (operator chart) #2897's typed test) leaves the other kinds still asserting on a version that changes every release.
  • Remove the now-unneeded make update-test-baselines-datadog-agent step from phase_datadog in scripts/release-operator.sh — the release worker no longer needs to regenerate these baselines on every Operator bump.

Verified: bumped the embedded datadog-operator subchart's appVersion to a throwaway value locally and confirmed Test_baseline_inputs passes with no baseline changes needed across all 51 scenarios; separately confirmed a real structural change (unrelated to version) still fails the same test, so the fix only suppresses version noise, not genuine drift.

Which issue this PR fixes

CONTP-2001

Special notes for your reviewer:

Stacked on #2897 — no chart behavior changes, this only touches test assertions and the release script. This PR targets nicole.chung/contp-2001 (not main), so #2897 needs to merge first; this PR's base will then need to be retargeted to main before it can merge.

Checklist

  • All commits are signed and show as "Verified" on GitHub (see: signing commits)
  • For datadog or datadog-operator chart or value changes, update the test baselines (run: make update-test-baselines)

@nlchung nlchung changed the title [CONTP-2001] Extending PR #2897 to apply fix for phase_datadog fix(CONTP-2001): stop asserting the Operator image tag in baseline tests (datadog chart) Sep 8, 2026
@nlchung
nlchung force-pushed the nlchung/contp-2001-pt2 branch from bce273b to 8a87e24 Compare September 8, 2026 14:24
@nlchung
nlchung changed the base branch from main to nicole.chung/contp-2001 September 8, 2026 14:26
@datadog-datadog-prod-us1-2

This comment has been minimized.

@nlchung
nlchung force-pushed the nlchung/contp-2001-pt2 branch from efc4eb0 to f8a46fb Compare September 9, 2026 14:30
@nlchung nlchung self-assigned this Sep 9, 2026
@nlchung nlchung added the datadog/no-version-bump Skip version bump for datadog chart label Sep 9, 2026
@nlchung
nlchung marked this pull request as ready for review September 9, 2026 14:34
@nlchung
nlchung requested review from a team as code owners September 9, 2026 14:34
@nlchung
nlchung requested review from raymondeah and removed request for a team September 9, 2026 14:34
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-09T14:37:55.468120Z f8a46fb Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: f8a46fbb7e

ℹ️ 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 test/datadog/baseline_test.go
@nlchung
nlchung force-pushed the nlchung/contp-2001-pt2 branch 3 times, most recently from b9d80f2 to 2bb368c Compare September 9, 2026 18:13
@DataDog DataDog deleted a comment from datadog-official Bot Sep 9, 2026
@nlchung
nlchung force-pushed the nlchung/contp-2001-pt2 branch 3 times, most recently from 774e6e8 to 39135cf Compare September 10, 2026 12:42
@nlchung
nlchung force-pushed the nlchung/contp-2001-pt2 branch from 39135cf to 8c1854c Compare September 10, 2026 13:32
@nlchung
nlchung requested a review from a team as a code owner September 10, 2026 14:39
@nlchung
nlchung force-pushed the nlchung/contp-2001-pt2 branch from adc98b1 to 37402f9 Compare September 10, 2026 14:46
@gh-worker-ownership-write-b05516
gh-worker-ownership-write-b05516 Bot removed the request for review from a team September 10, 2026 14:46
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

datadog/no-version-bump Skip version bump for datadog chart tools/ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants