jasondo OpenAI Codex commited on
Commit
73eae48
·
1 Parent(s): 82c7226

Retry Hugging Face sync pushes

Browse files

Co-authored-by: OpenAI Codex <codex@openai.com>

Files changed (2) hide show
  1. .github/workflows/sync_to_hf.yml +11 -1
  2. AGENTS.md +4 -2
.github/workflows/sync_to_hf.yml CHANGED
@@ -57,4 +57,14 @@ jobs:
57
  run: git lfs push huggingface --all
58
 
59
  - name: Force-sync main to Hugging Face
60
- run: git push --force huggingface HEAD:main
 
 
 
 
 
 
 
 
 
 
 
57
  run: git lfs push huggingface --all
58
 
59
  - name: Force-sync main to Hugging Face
60
+ run: |
61
+ for attempt in 1 2 3 4 5; do
62
+ if git push --force huggingface HEAD:main; then
63
+ exit 0
64
+ fi
65
+ delay=$((attempt * 20))
66
+ echo "Hugging Face push failed on attempt ${attempt}; retrying in ${delay}s..." >&2
67
+ sleep "$delay"
68
+ done
69
+ echo "Hugging Face push failed after 5 attempts." >&2
70
+ exit 1
AGENTS.md CHANGED
@@ -126,6 +126,9 @@ annotated technical cutaway animation.
126
  Space sync on pushes to `main`. The workflow targets `jasondo111/Snap2Sim`
127
  and requires GitHub secret `HF_TOKEN`.
128
  - User reported the GitHub Actions `HF_TOKEN` secret has been added.
 
 
 
129
  - Documented GitHub as the source of truth:
130
  `https://github.com/Bigstonks1/Snap2Sim`. Do not edit files directly on the
131
  Hugging Face Space; they will be overwritten by the sync workflow.
@@ -140,8 +143,7 @@ annotated technical cutaway animation.
140
  deterministic `generate_threejs` endpoint for scene rendering.
141
  - Keep the Hugging Face Space private until the user explicitly approves making
142
  it public for submission.
143
- - Commit and push the workflow to GitHub `main`, then verify the GitHub Actions
144
- sync run succeeds.
145
  - If Three.js model generation is too brittle, keep using the deterministic
146
  local scene generator for the demo while still using Nemotron for analysis.
147
  - Document final submission links and bonus claims.
 
126
  Space sync on pushes to `main`. The workflow targets `jasondo111/Snap2Sim`
127
  and requires GitHub secret `HF_TOKEN`.
128
  - User reported the GitHub Actions `HF_TOKEN` secret has been added.
129
+ - PR #1 was merged to `main`. The first GitHub-to-HF sync run reached the final
130
+ push step but failed with Hugging Face HTTP `429`; the workflow now retries
131
+ that final push with bounded backoff.
132
  - Documented GitHub as the source of truth:
133
  `https://github.com/Bigstonks1/Snap2Sim`. Do not edit files directly on the
134
  Hugging Face Space; they will be overwritten by the sync workflow.
 
143
  deterministic `generate_threejs` endpoint for scene rendering.
144
  - Keep the Hugging Face Space private until the user explicitly approves making
145
  it public for submission.
146
+ - Verify the next GitHub Actions sync run succeeds after the retry update.
 
147
  - If Three.js model generation is too brittle, keep using the deterministic
148
  local scene generator for the demo while still using Nemotron for analysis.
149
  - Document final submission links and bonus claims.