Retry dependency fetches and fail fast in entrypoint [CI 6/9]#1597
Merged
Conversation
fetch-repos.sh cloned and checked out dependencies with no retry. A transient GitHub 5xx error or DNS blip sometimes would abort a CI build, especially when multiple machines are checking out the dependencies simulaneously. Add set -eo pipefail, an exponential-backoff retry around the network steps, and a fetch plus checkout of the pinned commit that fails loudly on a commit mismatch. A clone interrupted mid-fetch leaves a tree with no resolvable HEAD, so re-clone whenever HEAD is missing and drop any leftover before cloning rather than reusing a half-clone. run-docker.sh now treats a fetch-repos.sh failure as fatal rather than building on a partial deps tree. finn_entrypoint.sh gains set -e plus a trap that restores the qonnx pyproject.toml even if the editable install fails, so a partial deps tree is caught when the container starts rather than much later on in the tests. Signed-off-by: Marco Blackwell <mblackwe@amd.com>
Collaborator
|
Thanks @merkelmarrow! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is PR 6 of 9 of a series intended to make CI faster and more robust.
This patch hardens several observed failure modes in FINN CI. The idea is to fail early when the necessary dependencies could not be fetched, and retry on transient network errors that would otherwise break a long test pipeline. These transient errors are made more frequent when CI is sharded and several shards are fetching dependencies simultaneously (as they will be later in this PR series).
Changes
git fetch --tags --forcefollowed bygit checkout <pinned-commit>which is safer for detached-HEAD, necessary for stricterset -epolicy.wget -qO <file>so a retried download overwrites a partial file instead of writing "pynq-z1.zip.1" which theunzipwould ignore.set -epolicy on pip installs).Testing
Full functional Jenkins validation runs, no transient network-error build failures since deployed on live CI (20+ full runs).