Skip to content

Open datadog-agent pin PR when tagging an Agent release branch - #25116

Draft
iliakur wants to merge 4 commits into
masterfrom
ik/agent-release-branch-tag-opens-pr-with-pin
Draft

Open datadog-agent pin PR when tagging an Agent release branch#25116
iliakur wants to merge 4 commits into
masterfrom
ik/agent-release-branch-tag-opens-pr-with-pin

Conversation

@iliakur

@iliakur iliakur commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

ddev release branch tag now opens a PR on DataDog/datadog-agent after tagging a release branch. The PR pins INTEGRATIONS_CORE_VERSION in release.json to the integrations-core commit the tag points at.

  • The PR targets the matching Agent release branch (e.g. 7.84.x), never main.
  • No local checkout of datadog-agent is needed. The command uses the async GitHub client, adding four endpoint methods (get_ref, create_ref, get_content, create_or_update_file_contents) and their response models.
  • If the Agent release branch does not exist yet, the tag still pushes and the command warns instead of failing.
  • Re-running for an existing tag skips tagging and repeats the follow-up steps: the build_agent workflow dispatch and the pin PR. Use this to open the PR once the Agent branch is cut.

Motivation

Pinning integrations-core into the Agent's release.json was a manual step after tagging. Automating it removes a hand-off and a class of mistakes: wrong commit, wrong branch, or targeting main. The Agent release branch is cut separately and may not exist at tag time, so the idempotent re-run finishes the job later without re-tagging.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add qa/required if this PR needs QA validation, or qa/skip-qa if it does not. Exactly one of the two is required.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

`ddev release branch tag` now opens a PR on DataDog/datadog-agent that pins
INTEGRATIONS_CORE_VERSION in release.json to the integrations-core commit the
tag was placed on. The PR targets the matching Agent release branch (never
main) and is built through the async GitHub client, so no local checkout of
datadog-agent is required.

The command is idempotent: re-running for an existing tag skips tag creation
and re-runs the follow-up steps, which is the recovery path for when the Agent
release branch did not exist at tag time.

Adds get_ref, create_ref, get_content and create_or_update_file_contents to the
async GitHub client, with git-data/contents response models.
@iliakur iliakur added the qa/skip-qa Automatically skip this PR for the next QA label Sep 4, 2026
@dd-octo-sts dd-octo-sts Bot added the ddev label Sep 4, 2026
@datadog-official

datadog-official Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Pipelines  Tests  Code Coverage

⚠️ Warnings

⚠️ Your PR has warnings. Please review the issues below.

🚦 11 Pipeline jobs failed

PR All Windows | test / jda96080 / Datadog Checks Base on Windows — 🔧 Needs a code fix, caused by this PR

View more details · View in GitHub Actions

AssertionError in test_intermediate_certs_loaded: expected intermediate certs to match but received different values.

PR All | test / j44368ad (py3.13-15.0-C) / Postgres-py3.13-15.0-C — 🔄 Retry may pass, looks flaky

View more details · View in GitHub Actions

Failed to fetch Packages due to connection failure: Connection failed [IP: 100.54.148.250 80].

PR All | test / j4a8166b / PGBouncer — 🔄 Retry may pass, looks flaky

View more details · View in GitHub Actions

Job failed: execution took longer than 1h0m0s seconds due to timeout.

View all 11 failed jobs.

📋 Copy fix prompt
CI on my pull request is failing. Help me find and fix the root cause of each failing job below — they were flagged as caused by changes in this PR, so focus on the diff. For each job, explain the failure and propose a fix.

Before you start, set up the Datadog software-delivery tooling so you can
query the CI data yourself:

1. Check whether you already have the Datadog software-delivery MCP tools
   (e.g. a `search_datadog_ci_pipeline_events` tool) and the `unblock-pr` skill.
2. If either is missing, STOP and ask me for permission before installing
   anything. Do not install or run anything until I have said yes.
3. Only with my explicit approval, set up the Datadog software-delivery MCP
   server and skills by following:
     https://docs.datadoghq.com/getting_started/software_delivery_mcp_tools/
   then restart so the skill is picked up.
4. If I decline, skip all of the above and work from the context below alone.

Then run /unblock-pr — it will pull the CI data itself. The job context below is what we already know.

If /unblock-pr is not available — because I declined the setup above, or it did not install — work from the context below instead.

Datadog has already classified this failure as caused by changes in this PR.
Take that as given and work the fix:

1. Locate the change. Diff this branch against its base and find the change
   that produces this error. Explain the mechanism, don't just name a file:
     git fetch origin && git diff $(git merge-base origin/master HEAD)...HEAD
2. Reproduce it locally. Run the failing job's command or test before
   proposing anything.
3. Propose the smallest fix that addresses the root cause — not a workaround,
   not a broadened assertion, not a disabled or skipped test.
4. Re-run the same command to confirm, and say exactly what you ran.
5. If the failure turns out to be intermittent rather than deterministic, say
   so plainly instead of "fixing" it — that is a flaky test, and patching it
   hides the problem.

If the right move is to re-run the job rather than change code, use the job
link in the context below. For GitHub Actions: `gh run rerun <run-id> --failed`,
where the run ID is the number after `/runs/` in that URL (not the trailing
number, which is the job ID).

Branch: ik/agent-release-branch-tag-opens-pr-with-pin

PR All Windows | test / jda96080 / Datadog Checks Base on Windows
Commit: a43b966ab63cf494dac2939755cce624075b7b9e
Error (code / test):
AssertionError in test_intermediate_certs_loaded: expected intermediate certs to match but received different values.
CI job: https://github.com/DataDog/integrations-core/actions/runs/33861150549/job/100985651605

🧪 3 Tests failed in 1 job

PR All | run — ❄️ 3 known flaky tests · 🔄 may pass on retry

View more details · View in GitHub Actions

↳ ❄️ test_autodiscovery_perf_counters_ao from test_integration.py   View in Datadog

↳ ❄️ test_check_ao_primary_replica from test_metrics.py   View in Datadog

↳ ❄️ test_check_ao_secondary_replica from test_metrics.py   View in Datadog

1 Test performance regression detected

test_activity_metadata[metadata0-expected_metadata_payload0] from test_activity.py — 7m 5.31s (+6m 5.61s, +612%)   View in Datadog

ℹ️ Info

No other issues found (see more)

❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 96.18%
Overall Coverage: 88.87%

Useful? React with 👍 / 👎

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

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Sep 4, 2026

Copy link
Copy Markdown

evalya-impact-summary

evalya impact analysis
Impact analysis: 0 selected, 0 skipped (of 0 test tasks)
Publish tasks:   2 (always emitted)
Diff (10 files):
  ddev/changelog.d/25116.added
  ddev/src/ddev/cli/release/branch/tag.py
  ddev/src/ddev/utils/github_async/client.py
  ddev/src/ddev/utils/github_async/models/__init__.py
  ddev/src/ddev/utils/github_async/models/git.py
  ddev/tests/cli/release/branch/test_tag.py
  ddev/tests/utils/github_async/helpers.py
  ddev/tests/utils/github_async/payloads.py
  ddev/tests/utils/github_async/test_endpoints.py
  ddev/tests/utils/github_async/test_models.py

Debug a specific task: evalya plan impact --path <path> --task <task>

Learn more about CI impact filtering

Mirror get_ref, create_ref, get_content and create_or_update_file_contents on
FakeAsyncGitHubClient (with defaults and call-table entries), and drive the
datadog-agent bump PR tests through the fake_async_github fixture instead of a
raw MockTransport.
@dd-octo-sts

dd-octo-sts Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Validation Report

All 21 validations passed.

Show details
Validation Description Status
agent-reqs Verify check versions match the Agent requirements file
ci Validate CI configuration and code coverage settings
codeowners Validate every integration has a CODEOWNERS entry
config Validate default configuration files against spec.yaml
dep Verify dependency pins are consistent and Agent-compatible
http Validate integrations use the HTTP wrapper correctly
imports Validate check imports do not use deprecated modules
integration-style Validate check code style conventions
jmx-metrics Validate JMX metrics definition files and config
labeler Validate PR labeler config matches integration directories
legacy-signature Validate no integration uses the legacy Agent check signature
license-headers Validate Python files have proper license headers
licenses Validate third-party license attribution list
metadata Validate metadata.csv metric definitions
models Validate configuration data models match spec.yaml
openmetrics Validate OpenMetrics integrations disable the metric limit
package Validate Python package metadata and naming
qa-label Validate the pull request declares whether it needs QA for the next Agent release
readmes Validate README files have required sections
saved-views Validate saved view JSON file structure and fields
version Validate version consistency between package and changelog

View full run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ddev qa/skip-qa Automatically skip this PR for the next QA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant