Skip to content

Replace Mode field of DPA with addition to Strategy field#2787

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit intomainfrom
triviajon/ipvpa/remove-mode-field
Mar 20, 2026
Merged

Replace Mode field of DPA with addition to Strategy field#2787
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit intomainfrom
triviajon/ipvpa/remove-mode-field

Conversation

@triviajon
Copy link
Contributor

@triviajon triviajon commented Mar 20, 2026

What does this PR do?

Removal of Mode field in the DatadogPodAutoscaler CRD. It's functionality is replaced with an extension of the Strategy field with a new enum value DatadogPodAutoscalerTriggerRolloutUpdateStrategy.

Motivation

Cleanup of Mode field.

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)

@triviajon triviajon added this to the v1.25.0 milestone Mar 20, 2026
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 38.90%. Comparing base (3a7029c) to head (b7aaa1a).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2787      +/-   ##
==========================================
+ Coverage   38.80%   38.90%   +0.10%     
==========================================
  Files         309      309              
  Lines       26847    26925      +78     
==========================================
+ Hits        10417    10475      +58     
- Misses      15650    15669      +19     
- Partials      780      781       +1     
Flag Coverage Δ
unittests 38.90% <ø> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

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

@triviajon triviajon marked this pull request as ready for review March 20, 2026 13:13
@triviajon triviajon requested a review from a team March 20, 2026 13:13
@triviajon triviajon requested a review from a team as a code owner March 20, 2026 13:13
@tbavelier tbavelier modified the milestones: v1.25.0, v1.26.0 Mar 20, 2026
Copy link

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

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: b7aaa1a622

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

Comment on lines 44 to 45
// Strategy defines the mode of the update policy.
Strategy DatadogPodAutoscalerUpdateStrategy `json:"strategy,omitempty"`

Choose a reason for hiding this comment

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

P1 Badge Preserve update.mode during the storage-version transition

Removing Mode from the shared DatadogPodAutoscalerUpdatePolicy breaks upgrade compatibility for existing DPAs that rely on update.mode: TriggerRollout. v1alpha2 is still the storage version (config/crd/bases/v1/datadoghq.com_datadogpodautoscalers.yaml:1874-1875), and there is no conversion or migration path here, so previously stored objects will now deserialize without that field. In the common case where users left strategy unset and only set mode: TriggerRollout, the upgraded object comes back as the default strategy instead of rollout mode, silently changing vertical update behavior after the operator/CRD upgrade.

Useful? React with 👍 / 👎.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No one should be using this field so it should be safe to remove

Comment on lines 1018 to +1021
enum:
- Auto
- Disabled
- TriggerRollout

Choose a reason for hiding this comment

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

P2 Badge Regenerate the bundle CRD before exposing TriggerRollout

This changes the source CRD enum, but the shipped OLM bundle still advertises update.strategy as only Auto|Disabled in bundle/manifests/datadoghq.com_datadogpodautoscalers.yaml:231-236 and :1018-1023. In bundle/OLM installs, strategy: TriggerRollout will therefore still be rejected or pruned even though the base CRD now documents it, so the new API shape is only partially released unless the bundle artifacts are regenerated in the same PR.

Useful? React with 👍 / 👎.

@triviajon triviajon requested a review from vboulineau March 20, 2026 13:21
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.

4 participants