Repository navigation
Retry the ArtifactTool release lookup and fall back to cached tooling - #1535
Draft
Bryan Chen (bryanchen-d) wants to merge 2 commits into
Draft
Bryan Chen (bryanchen-d) wants to merge 2 commits into
Bryan Chen (bryanchen-d) wants to merge 2 commits into
Conversation
Transient failures fetching the latest ArtifactTool release fail universal package downloads even when a usable ArtifactTool is already cached. Retry the lookup twice with short backoff, then fall back to the newest cached release when no version override is set. Refs Azure#1534. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Please make sure the code is following contribution guidelines in CONTRIBUTING.md
What
az artifacts universal download/publishlook up the latest Universal Packages tooling (ArtifactTool) release before every run. That lookup is a single request with no retry, so one transient error (for exampleRead timed out) fails the whole command withFailed to update Universal Packages tooling, even when a working ArtifactTool is already cached on disk.This change, scoped to
artifacttool_updater.py:AZURE_DEVOPS_EXTENSION_ARTIFACTTOOL_OVERRIDE_VERSIONis set, falls back to the newest cachedArtifactTool_*release (compared numerically by version) that contains theartifacttoolbinary, and logs a warning.CLIErrorwhen nothing usable is cached, or when a specific version was requested.The
--retriesoption suggested in #1534 is left for a follow-up.Tests
New
azext_devops/tests/latest/common/test_artifacttool_updater.py(unittest +mock.patch, temp tool root,time.sleeppatched):0.2.576over0.2.99), skipping dirs without the binaryCLIErrorpython -m unittest azext_devops.tests.latest.common.test_artifacttool_updater: 5 passed.flake8 --max-line-length 120is clean on both files.