Skip to content

Resolve nightly core failure#41655

Merged
scbedd merged 5 commits into
mainfrom
debug-core-failure
Jun 19, 2025
Merged

Resolve nightly core failure#41655
scbedd merged 5 commits into
mainfrom
debug-core-failure

Conversation

@scbedd

@scbedd scbedd commented Jun 19, 2025

Copy link
Copy Markdown
Member

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

the version of azure-core that was expected wasn't in the prebuilt wheel dir

And it would crop up in one of two ways:

  1. We fail to find the 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.
  2. We fail to find the 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 for azure-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.

@scbedd scbedd self-assigned this Jun 19, 2025
Copilot AI review requested due to automatic review settings June 19, 2025 00:34
@scbedd scbedd requested a review from laiapat as a code owner June 19, 2025 00:34
@scbedd scbedd moved this from 🤔 Triage to 🔬 Dev in PR in Azure SDK EngSys 🚀🌒🧑‍🚀 Jun 19, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 like tests/ and venv/ are never traversed.
    EXCLUDE = {

Comment thread tools/azure-sdk-tools/ci_tools/versioning/version_shared.py
Comment thread tools/azure-sdk-tools/ci_tools/versioning/version_set_dev.py Outdated
Comment thread tools/azure-sdk-tools/ci_tools/scenario/generation.py
Comment thread tools/azure-sdk-tools/ci_tools/parsing/parse_functions.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@scbedd

scbedd commented Jun 19, 2025

Copy link
Copy Markdown
Member Author

The failures from ai packages are not caused by this PR. Just going to bypass and merge.

@scbedd scbedd merged commit bebf8d2 into main Jun 19, 2025
22 of 26 checks passed
@scbedd scbedd deleted the debug-core-failure branch June 19, 2025 17:49
@kurtzeborn kurtzeborn moved this from 🔬 Dev in PR to 🎊 Closed in Azure SDK EngSys 🚀🌒🧑‍🚀 Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

4 participants