Skip to content

[datadog-operator] Update Github Workflow for Milestone#2837

Draft
gabedos wants to merge 3 commits intomainfrom
gabedos/update-github-workflows
Draft

[datadog-operator] Update Github Workflow for Milestone#2837
gabedos wants to merge 3 commits intomainfrom
gabedos/update-github-workflows

Conversation

@gabedos
Copy link
Copy Markdown
Contributor

@gabedos gabedos commented Mar 26, 2026

What does this PR do?

Update the Github Workflows surrounding PR Milestones.

  • Decouples the qa/skip-qa label from the Milestone. Targeting a particular release should be independent of whether or not QA is required. By default, QA remains automatically required and only familiar Operator users will add the label to skip QA.

  • Every PR will have a milestone associated to it determine on the base branch that it merged onto to. (Merge onto main gets latest Milestone, Merge onto rc branch gets the rc milestone). This mirrors the datadog-agent milestone workflow which adds a milestone post merge.

Describe your test plan

The add-milestone action was mostly copied from the Agent. The main difference is how we're querying for the milestone itself. The Agent stores the active milestone explicitly within a file in the code base. Theoretically we could do the same by looking at config/manager/kustomization.yaml for the newTag field. However, @claude decided to instead directly query the open milestones within the repo and pick the latest when merging onto main. Testing the commands locally seem good:

Getting the Milestone when merging onto main:

gh api repos/datadog/datadog-operator/milestones --jq '[.[] | select(.state == "open")] | sort_by(.number) | last | .title'

Getting the Milestone when not merging onto main:

 bash -c '                                                                                                                                                            
  BASE_BRANCH="v1.25"                                                                                                                                                  
  if [[ "$BASE_BRANCH" =~ ^v([0-9]+)\.([0-9]+)$ ]]; then                                                                                                               
    echo "Full match: ${BASH_REMATCH[0]}"
    echo "Major: ${BASH_REMATCH[1]}"                                                                                                                                   
    echo "Minor: ${BASH_REMATCH[2]}"                                                                                                                                   
    echo "Milestone: v${BASH_REMATCH[1]}.${BASH_REMATCH[2]}.0"                                                                                                         
  fi'

Checklist

  • PR has at least one valid label: bug, enhancement, refactoring, documentation, tooling, and/or dependencies
  • All commits are signed (see: signing commits)

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 38.94%. Comparing base (a1206ff) to head (eb0c76c).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2837   +/-   ##
=======================================
  Coverage   38.94%   38.94%           
=======================================
  Files         313      313           
  Lines       27139    27139           
=======================================
  Hits        10570    10570           
  Misses      15780    15780           
  Partials      789      789           
Flag Coverage Δ
unittests 38.94% <ø> (ø)

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


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 a1206ff...eb0c76c. Read the comment docs.

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

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.

2 participants