shahar1 opened a new pull request, #69018:
URL: https://github.com/apache/airflow/pull/69018

   The scheduled `breeze ci upgrade` job (`.github/workflows/...` → "Scheduled 
CI upgrade check") force-pushes a stable branch `ci-upgrade-<branch>` and then 
looks for an existing PR before creating one. The lookup passed the 
`owner:branch` head label (e.g. `apache:ci-upgrade-main`) to `gh pr list 
--head`, but that flag filters by the **bare branch name only** and explicitly 
does not support `<owner>:<branch>` syntax. So the existing PR was never found, 
the code fell through to `gh pr create`, and GitHub rejected the duplicate — 
failing the run:
   
   ```
   pull request create failed: GraphQL: A pull request already exists for 
apache:ci-upgrade-main.
   ```
   
   (see [run 
28223885557](https://github.com/apache/airflow/actions/runs/28223885557/job/83611163873))
   
   Fix:
   - Use the bare branch name for the `gh pr list` and `gh pr ready` lookups. 
Only `gh pr create --head` needs the cross-fork `owner:branch` label.
   - Treat an `already exists` creation error as success (the branch has 
already been force-pushed, so the existing PR is up to date) — guards against a 
list/create race.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 4.8)
   
   Generated-by: Claude Code (Opus 4.8) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to