Yicong-Huang opened a new pull request, #4620:
URL: https://github.com/apache/texera/pull/4620

   ### What changes were proposed in this PR?
   
   The `Discover direct backport targets` step in `direct-backport-push.yml` 
previously relied solely on `GET /commits/{sha}/pulls`. That endpoint is backed 
by an async association index that lags for tens of seconds after a squash 
merge — see [run 25233602734 attempt 
1](https://github.com/apache/texera/actions/runs/25233602734) for #4600, which 
logged `No merged pull request is associated with ...` and skipped 
`push-backports` even though the PR carried a `release/*` label.
   
   Resolve the PR in two stages, in order:
   
   1. **Parse the squash-merge commit message.** `.asf.yaml` forces squash 
merges with `PR_TITLE_AND_DESC`, so the first line of every merge commit on 
`main` ends with `(#NNNN)`. Regex-extracting that number and fetching the PR 
directly via `/pulls/{N}` bypasses the association index entirely. We also 
verify `pr.merged === true` before trusting the result.
   2. **Fall back to `/commits/{sha}/pulls` with retries.** If the message does 
not match (manual or unconventional commits), retry the original API call up to 
5 times with exponential backoff (`0s, 2s, 4s, 8s, 16s` — ~30s worst case).
   
   ### Any related issues, documentation, discussions?
   
   Closes #4617
   
   ### How was this PR tested?
   
   YAML parses locally (`python3 -c "import yaml; yaml.safe_load(...)"`). The 
fix runs the same final code path as before — only the resolution method 
changes — so existing `push-backports` behavior is unchanged once a PR is 
found. Will be exercised the next time a PR with `release/*` labels merges to 
`main`.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Opus 4.7)


-- 
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