Skip to content

add slo corrections support - #3414

Open
khewonc wants to merge 1 commit into
mainfrom
khewonc/slo-corrections
Open

add slo corrections support#3414
khewonc wants to merge 1 commit into
mainfrom
khewonc/slo-corrections

Conversation

@khewonc

@khewonc khewonc commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

add slo corrections support

Motivation

https://datadoghq.atlassian.net/browse/CONTP-2020

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

  1. Deploy the operator with DD_GENERIC_RESOURCE_CONTROLLER_ENABLED=true and DD_API_KEY and DD_APP_KEY set
  2. Create a SLO: https://app.datadoghq.com/slo/create
  3. Create a SLO correction, substituting your SLO ID
apiVersion: datadoghq.com/v1alpha1
kind: DatadogGenericResource
  type: slo_correction
  jsonSpec: |-
    {
      "data": {
        "type": "correction",
        "attributes": {
          "category": "Scheduled Maintenance",
          "description": "test correction",
          "slo_id": "<YOUR_SLO_ID>",
          "start": $(date -u -d '+1 day' +%s 2>/dev/null || date -u -v+1d +%s),
          "end": $(date -u -d '+1 day +1 hour' +%s 2>/dev/null || date -u -v+1d -v+1H +%s),
          "timezone": "UTC"
        }
      }
    }
  1. Check the SLO correction status for SYNC STATUS: OK and for ID to be populated. Check your SLO in app for the SLO correction to be created under the Corrections tab
  2. Update the SLO correction manifest, e.g. change "category" to "Deployment", and check for DatadogGenericResource manifest has changed and Updated DatadogGenericResource logs. In app, the Correction Type should now be Deployment
  3. Delete the SLO correction. The SLO correction should disappear in app

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.31.0 milestone Sep 1, 2026
@khewonc
khewonc requested a review from a team September 1, 2026 14:18
@khewonc khewonc added the enhancement New feature or request label Sep 1, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 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-01T14:21:46.187060Z 195d415 PR opened
ℹ️ 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: 195d415ed5

ℹ️ 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 internal/controller/datadoggenericresource/slo_corrections.go
@datadog-prod-us1-4

datadog-prod-us1-4 Bot commented Sep 1, 2026

Copy link
Copy Markdown

Code Coverage

🛑 Gate Violations

🎯 1 Code Coverage issue detected

A Patch coverage percentage gate may be blocking this PR.

Patch coverage: 47.62% (threshold: 80.00%)

ℹ️ Info

🎯 Code Coverage (details)
Patch Coverage: 47.62%
Overall Coverage: 50.57% (-0.01%)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: f1a5042 | Docs | View more details | Give us feedback!

@khewonc
khewonc force-pushed the khewonc/slo-corrections branch from 195d415 to f1a5042 Compare September 1, 2026 15:05
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.

1 participant