Skip to content

Bounded retry on force-with-lease rejection in commit_and_push_translations_branch #63

Description

@timon0305

Problem

commit_and_push_translations_branch (.github/workflows/assets/lib.sh) pushes translation branches with git push --force-with-lease. When the lease is rejected because the remote branch advanced concurrently, it fails fast with a phase_err ("force-with-lease push rejected ... re-run after fetch or resolve manually"). A transient concurrent advance during the daily scheduled run therefore fails the whole run, even though fetching and re-attempting would succeed.

Acceptance Criteria

  • On a rejected force-with-lease, retry up to 3 attempts, running git fetch for the branch between attempts so the local ref reflects the advanced remote before re-attempting.
  • After the final attempt still fails, surface the existing rejection error unchanged (fail closed).
  • The existing fail-fast bats test is updated to cover the new behavior: the push succeeds after a transient rejection, and still fails after the retries are exhausted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions