Skip to content

Move build_agent.yaml PR creation from ddev CLI to a workflow_dispatch GitHub Action#22799

Draft
Kyle-Neale wants to merge 2 commits intomasterfrom
kyle.neale/build-agent-pr-creation
Draft

Move build_agent.yaml PR creation from ddev CLI to a workflow_dispatch GitHub Action#22799
Kyle-Neale wants to merge 2 commits intomasterfrom
kyle.neale/build-agent-pr-creation

Conversation

@Kyle-Neale
Copy link
Contributor

What does this PR do?

Moves ownership of the .gitlab/build_agent.yaml update from the ddev CLI to a GitHub Actions workflow.

Previously, ddev release branch tag would detect when build_agent.yaml still pointed to main, attempt to update it in-place, commit, and push directly to the protected release branch.

This PR replaces that approach with:

  1. A new update-build-agent-yaml.yml workflow (workflow_dispatch) that checks out the release branch, verifies the agent branch exists in datadog-agent, updates build_agent.yaml, and opens a bot PR targeting the release branch— consistent with how other automated PRs in this repo are created.
  2. A simplified pre-flight check in tag.py that reads build_agent.yaml and aborts with an actionable message if it still points to main, including the exact gh workflow run command to trigger the update.

Motivation

The CLI approach tried to push directly to a protected branch. The GitHub Actions approach uses a bot token (via actions/create-github-app-token) to open a PR, which is the established pattern in this repo (update-dependencies.yml,
update-agent-changelog.yml, etc.).

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.
  • 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

@codecov
Copy link

codecov bot commented Mar 4, 2026

Codecov Report

❌ Patch coverage is 86.95652% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.53%. Comparing base (391b541) to head (3717e0d).
⚠️ Report is 19 commits behind head on master.

Additional details and impacted files
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant