-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Add devtest to azpysdk
#44284
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
base: main
Are you sure you want to change the base?
Add devtest to azpysdk
#44284
Conversation
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 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
devtestcheck that uninstalls GA versions of Azure SDK dependencies and reinstalls dev builds from an Azure DevOps feed before running tests - Refactors
_build_pytest_argsfromwhl.pyinto theCheckbase class for code reuse - Adds
uninstall_from_venvhelper 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, |
Copilot
AI
Dec 5, 2025
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.
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)
continueCo-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
#42601