Skip to content

[CONS-8186] Implement DD_SLO_FORCE_SYNC_PERIOD for DatadogSLO#2811

Open
mrdoggopat wants to merge 4 commits intomainfrom
mrmcpat-datadogslo-forceresyncperiod
Open

[CONS-8186] Implement DD_SLO_FORCE_SYNC_PERIOD for DatadogSLO#2811
mrdoggopat wants to merge 4 commits intomainfrom
mrmcpat-datadogslo-forceresyncperiod

Conversation

@mrdoggopat
Copy link
Copy Markdown
Contributor

@mrdoggopat mrdoggopat commented Mar 24, 2026

What does this PR do?

This PR adds an option for users to configure the DatadogSLO force sync period. This option is available for DatadogMonitor and DatadogDashboard so it would be nice to have this for DatadogSLO.

Motivation

CONS-8186. Mainly to control the re-sync period to avoid potential rate limit issues.

Describe your test plan

  1. Enable the SLO controller and run operator in debug logging level
  2. Add the env var set to "2"
  3. Apply an example SLO from examples/datadogslo/
  4. Get the lastForceSynctime k get datadogslo <datadog slo name> -o yaml | yq .status.lastForceSyncTime ensure it's less than 2mins old
  5. Review logs to ensure the debug one is picked up:
    {"level":"DEBUG","ts":"2026-03-24T14:31:51.776Z","logger":"controllers.DatadogSLO","msg":"Setting SLO force sync period","datadogslo":{"name":"example-slo-monitor3","namespace":"default"},"minutes":2}
  6. Make a change in the SLO in the UI and ensure it's reverted less than 2mins after
  7. Remove the env var, restart the operator and wait for 2 mins (after lease happened) and ensure lastForceSyncTime is not updated (because it's been less than 60 mins default since the last update)

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)

@mrdoggopat mrdoggopat requested a review from a team March 24, 2026 14:40
@mrdoggopat mrdoggopat added the enhancement New feature or request label Mar 24, 2026
@mrdoggopat mrdoggopat requested a review from a team as a code owner March 24, 2026 14:40
@mrdoggopat mrdoggopat changed the title CONS-8186 - Implement DD_SLO_FORCE_SYNC_PERIOD for DatadogSLO [CONS-8186] Implement DD_SLO_FORCE_SYNC_PERIOD for DatadogSLO Mar 24, 2026
Copy link
Copy Markdown

@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: 22a31dce60

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

@urseberry urseberry self-assigned this Mar 24, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 25, 2026

Codecov Report

❌ Patch coverage is 11.11111% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 38.92%. Comparing base (ae90bec) to head (25b386c).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
internal/controller/datadogslo/controller.go 11.11% 6 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2811      +/-   ##
==========================================
+ Coverage   38.77%   38.92%   +0.14%     
==========================================
  Files         311      311              
  Lines       27029    27200     +171     
==========================================
+ Hits        10481    10588     +107     
- Misses      15766    15822      +56     
- Partials      782      790       +8     
Flag Coverage Δ
unittests 38.92% <11.11%> (+0.14%) ⬆️

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

Files with missing lines Coverage Δ
internal/controller/datadogslo/controller.go 59.88% <11.11%> (-2.32%) ⬇️

... and 4 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 5c29d8d...25b386c. 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 added this to the v1.26.0 milestone Mar 30, 2026
@mrdoggopat
Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351
Copy link
Copy Markdown

gh-worker-devflow-routing-ef8351 bot commented Mar 30, 2026

View all feedbacks in Devflow UI.

2026-03-30 16:37:33 UTC ℹ️ Start processing command /merge


2026-03-30 16:37:38 UTC ❌ MergeQueue

You are not allowed to use the merge queue towards main. User is not part of the authorized users or teams.
The authorized teams (including their child teams) are: agent-all, injection-platform, container-app, container-ecosystems, container-platform, container-helm-chart-maintainers, container-integrations, container-t2, Documentation, Vector.
The authorized users are: clamoriniere, hkaj.

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