Resolve nightly core failure#41655
Merged
Merged
Conversation
…rministically picking up a tests/**/_version.py file and THAT was why we were crashing 'randomly'
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a nondeterministic traversal issue that caused incorrect _version.py files to be picked up during nightly builds by excluding certain directories, and adds error handling and logging improvements.
- Adds an exit path with logging if no version file is found
- Reorders and enriches output in the dev-version script
- Excludes test/build directories from the version-file search
- Refactors package generation ordering to avoid surprises
- Reformats long tuples in setup parsing for readability
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| tools/azure-sdk-tools/ci_tools/versioning/version_shared.py | Exit early if no version file is found; added error log |
| tools/azure-sdk-tools/ci_tools/versioning/version_set_dev.py | Adjusted print order; added “Processing” message |
| tools/azure-sdk-tools/ci_tools/scenario/generation.py | Moved ParsedSetup.from_path ahead of discovery |
| tools/azure-sdk-tools/ci_tools/parsing/parse_functions.py | Reformatted tuple signatures; added trailing commas for consistency |
Comments suppressed due to low confidence (1)
tools/azure-sdk-tools/ci_tools/parsing/parse_functions.py:436
- The new directory-exclusion logic in
get_version_pywould benefit from dedicated tests to ensure excluded folders liketests/andvenv/are never traversed.
EXCLUDE = {
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
laiapat
approved these changes
Jun 19, 2025
Member
Author
|
The failures from |
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.
Ok, so the failure this PR is fixing is one introduced by my previous PR #41629
Here is an example of the failure
You can see that it's something along the lines of
And it would crop up in one of two ways:
azure-corewheel because we didn't update to expect the dev version of the package, so when we look for the GA version in the artifact directory where only nightly alpha exist, we can't find it.azure-corewheel because we DO expect to find the dev version of the package, but something went wrong during generation and we didn't produce the dev version in the build phase.This is because we use
os.walkto traverse the package directory to find the_version.pyfile forazure-core. The issue was, we just looked at all folders beneath the package, and it is nondeterministic by default for speed.The issues were cropping up because the setting of the dev version was targeting the wrong _version.py. This one to be precise.
This PR updates the traversal looking for the package version to exclude a few directories that I know will only be related to build/test, so we can ignore them.