Skip to content

Skip easy-win branches whose PR was merged during the nightly update - #8650

Open
cbeauchesne wants to merge 1 commit into
mainfrom
cbeauchesne/nightly-skip-merged-pr
Open

cbeauchesne wants to merge 1 commit into
mainfrom
cbeauchesne/nightly-skip-merged-pr

Conversation

@cbeauchesne

Copy link
Copy Markdown
Collaborator

Motivation

The Test activation job of nightly run 44666257300 failed on easy-win/apm-idm/php:

commit-headless: error: update ref: PATCH .../git/refs/heads/easy-win/apm-idm/php: 422 Reference cannot be updated []

The job found PR #8582 open and with no human activity, so it updated it. #8582 had auto-merge enabled and was merged at 06:41:31Z. The force-push to its branch came at 06:41:34Z, and GitHub refused it.

A retry would not help. Once the PR is merged, a retry either fails again or recreates the branch from a main that doesn't include #8582 yet, which duplicates its activations.

Changes

If the push of an existing PR's update fails, process_activation_branch checks the PR state:

  • No longer OPEN (merged or closed): log it and skip the branch. The next nightly recreates the branch from an up-to-date main.
  • Still open, or the branch is new: raise as before.

Validation

  • The new tests in test_github_nightly.py cover the push failing on a merged, closed or open PR, and on a new PR. The merged, closed and open cases fail against the previous code.
  • TEST_THE_TEST: 1429 passed, 1 xfailed.

🤖 Generated with Claude Code

The nightly activation looks up the open PR of an easy-win branch, then
force-pushes its update. If auto-merge merges the PR in between, GitHub
refuses the push (422 Reference cannot be updated) and the whole job fails.

When the push fails on an existing PR that is no longer open, skip the
branch: the next nightly recreates it from an up-to-date main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

tests/test_the_test/test_github_nightly.py                              @DataDog/system-tests-reviewers
utils/ci/github/nightly.py                                              @DataDog/system-tests-core

@datadog-prod-us1-5

datadog-prod-us1-5 Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Pipelines

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

@cbeauchesne
cbeauchesne marked this pull request as ready for review November 23, 2026 20:21
@cbeauchesne
cbeauchesne requested review from a team as code owners November 23, 2026 20:21
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T20:22:29.787266Z 5781ab2 Draft marked ready
ℹ️ 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.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant