o-nikolas opened a new pull request, #51:
URL: https://github.com/apache/airflow-site-archive/pull/51

   "Sync S3 to GitHub" runs for one to two hours, then force-pushes its commit 
on top of the commit it checked out. If anything lands on the branch in the 
meantime:
   
   - On `main`, the ruleset rejects the push with GH013 and the run is lost 
([42691645069](https://github.com/apache/airflow-site-archive/actions/runs/42691645069)
 after #49, 
[41340752844](https://github.com/apache/airflow-site-archive/actions/runs/41340752844)
 after another sync).
   - On `staging`, which has no ruleset, the other commits are silently dropped.
   - With nothing to commit, the step still force-pushes the old checkout and 
rewinds the branch.
   
   The commit steps now skip the push when there's nothing to commit. Otherwise 
they fetch the branch tip with `--depth=1`, rebase the sync commit onto it and 
push without `--force`, retrying up to three times. A conflicting change fails 
the step without pushing. `staging` picks this up after the next "Reset staging 
to main".
   
   Open question: if `staging` is reset while a staging sync runs, this replays 
the sync commit onto the reset branch, or fails on a conflict. Would you rather 
the step refuse to push whenever `staging` no longer contains the checked-out 
commit?
   
   Tested locally against a bare repo checked out the way `actions/checkout` 
does here, with a hook that mimics the ruleset. Scenarios: branch moved or not, 
nothing to commit, a conflict, a race between fetch and push, and a staging 
reset. The old steps reproduce both failures. zizmor and the pre-commit hooks 
pass.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Kiro (Claude Opus 5.5)
   
   Generated-by: Kiro (Claude Opus 5.5)


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