Files
829ef49acf fix(ci): add bounded, idempotent retry to the SDK release branch push (#16705)
* fix(ci): retry sdk release branch push with bounded backoff

The release-sdk workflow pushed the SDK release branch with a single
bare git push. GitHub fails closed when it cannot decide in time
whether the push may create or update workflow files, which aborted
the stable release even when the push had actually landed.

Retry the push up to 3 times with 30s/60s backoff, reconciling with
the remote after each failure: an already-landed push is treated as
success, a diverged remote branch is a hard error, and the branch is
never force-pushed.

Fixes #16490

* fix(ci): reconcile release branch via ls-remote output, not fetch

A bare git fetch in the reconcile path ran unguarded under the
runner's bash -eo pipefail: a transient fetch failure after a
false-negative push would abort the step before the remaining
retries, reproducing the original failure shape. Read the remote tip
from a single ls-remote instead, with || true so a failed lookup
falls back to the plain retry path.

* fix(ci): match release branch by full ref in push reconciliation

git ls-remote --heads matches its pattern against ref tails on slash
boundaries, so a suffixed branch (e.g. backup/release/...) would add
a second line and make a landed push look diverged. Query the full
refs/heads/ ref so exactly one line can come back.

* fix(ci): harden SDK release push retry per round-1 review

- run persist_source under set -euo pipefail so the ls-remote || true guard
  is load-bearing and its rationale accurate
- correct the reconcile comment: the observed #16490 shape left nothing
  remotely, so the bounded re-push is the remedy and the reconcile guards a
  possible partial --follow-tags push
- annotate each absorbed push failure with a ::warning:: naming the attempt
- pin all four loop branches behaviorally in release-sdk-workflow.test.js
  with a stubbed git/sleep harness; flipping the reconcile comparison,
  deleting the divergence abort, or removing the warning turns a case red

Co-authored-by: Qwen-Coder <[email protected]>

---------

Co-authored-by: qwen-code-dev <[email protected]>
Co-authored-by: Qwen-Coder <[email protected]>
2026-11-09 13:42:23 +08:00
..