GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Retry failed benchmark result pushes by savannahostrowski · Pull Request #488 · python/bench_runner Conversation
Member
Another cherry-pick from my fork, with a few adjustments for upstream :) A few months back, I encountered failed result pushes when running benchmarks across multiple machines, causing jobs to fail after the benchmarks had completed. This PR adds up to five push attempts, rebasing before each attempt and waiting briefly between retries.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
maurycy
approved these changes
|
| ### Moving more code to Python |
push, not touching pull.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if: ${{ steps.commit.outputs.committed == 'true' }} | ||
| shell: bash | ||
| run: | | ||
| branch="$GITHUB_REF_NAME" | ||
| for attempt in 1 2 3 4 5; do | ||
| echo "Push attempt $attempt to origin/$branch" | ||
| git pull --rebase origin "$branch" | ||
| if git push origin "HEAD:$branch"; then | ||
| exit 0 | ||
| fi | ||
| if [ "$attempt" -lt 5 ]; then | ||
| sleep $(( RANDOM % 30 + 10 )) | ||
| fi | ||
| done | ||
| echo "Push failed after 5 attempts" >&2 |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The code is duplicate. What do you think about a YAML template like &push_step?
There are also composite actions but I don't understand them fully:
https://docs.github.com/en/actions/tutorials/create-actions/create-a-composite-action
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.