Skip to content

Conversation

@JennyPng
Copy link
Member

@JennyPng JennyPng commented Dec 5, 2025

@JennyPng JennyPng marked this pull request as ready for review December 5, 2025 23:06
Copilot AI review requested due to automatic review settings December 5, 2025 23:06
Copy link
Contributor

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 adds a new devtest command to the azpysdk tool that tests packages against dev build versions of their Azure SDK dependencies from a DevOps feed. The implementation follows the established patterns in the codebase for Check subclasses, with the _build_pytest_args method refactored into the base Check class to be shared between whl and devtest.

Key Changes

  • Adds new devtest check that uninstalls GA versions of Azure SDK dependencies and reinstalls dev builds from an Azure DevOps feed before running tests
  • Refactors _build_pytest_args from whl.py into the Check base class for code reuse
  • Adds uninstall_from_venv helper function to support package uninstallation in virtual environments

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
eng/tools/azure-sdk-tools/azpysdk/devtest.py New check implementation with helper functions for discovering, uninstalling, and reinstalling Azure SDK packages with dev builds
eng/tools/azure-sdk-tools/azpysdk/Check.py Adds _build_pytest_args method to base class for shared pytest argument building logic
eng/tools/azure-sdk-tools/ci_tools/functions.py Adds uninstall_from_venv function to support uninstalling packages from virtual environments
eng/tools/azure-sdk-tools/azpysdk/whl.py Removes _build_pytest_args method (moved to base class)
eng/tools/azure-sdk-tools/azpysdk/main.py Registers the new devtest command
doc/tool_usage_guide.md Documents the new devtest command

work_dir=staging_directory,
force_create=False,
package_type="sdist",
pre_download_disabled=False,
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The install_dev_reqs call should be wrapped in a try-except block to handle potential failures gracefully, similar to how it's done in whl.py (lines 68-73). If dependency installation fails for one package, the check should log the error, add a failure code to results, continue to the next package, and not abort the entire run.

Example:

try:
    self.install_dev_reqs(executable, args, package_dir)
except Exception as exc:
    logger.error(f"Failed to install dev requirements for {package_name}: {exc}")
    results.append(1)
    continue

Copilot uses AI. Check for mistakes.
JennyPng and others added 3 commits December 5, 2025 15:24
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant