-
Notifications
You must be signed in to change notification settings - Fork 3k
Resolve nightly core
failure
#41655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolve nightly core
failure
#41655
Conversation
…rministically picking up a tests/**/_version.py file and THAT was why we were crashing 'randomly'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_py
would benefit from dedicated tests to ensure excluded folders liketests/
andvenv/
are never traversed.
EXCLUDE = {
Co-authored-by: Copilot <[email protected]>
The failures from |
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-core
wheel 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-core
wheel 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.walk
to traverse the package directory to find the_version.py
file 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.