Skip to content

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

Merged
merged 5 commits into from
Jun 19, 2025
Merged

Resolve nightly core failure #41655

merged 5 commits into from
Jun 19, 2025

Conversation

scbedd
Copy link
Member

@scbedd scbedd commented Jun 19, 2025

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 Copilot AI review requested due to automatic review settings June 19, 2025 00:34
@scbedd scbedd requested a review from mccoyp 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
Copy link
Contributor

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

@scbedd
Copy link
Member Author

scbedd commented Jun 19, 2025

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.

2 participants