Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR updates Azure Python deployment packaging to avoid editable installs (which fail under Oryx) by generating a requirements.txt that installs the app from a pre-built wheel in dist/, and adds package-name detection to support that flow.
Changes:
- Switched Azure
requirements.txtgeneration from-e .editable installs to wheel-based installs using--find-links dist. - Added
DetectPackageNamehelper to infer distribution name from a wheel filename orpyproject.toml. - Updated logging to reflect the new wheel install approach.
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. Scanned FilesNone |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (2)
src/Tests/Microsoft.Agents.A365.DevTools.Cli.Tests/Services/PythonBuilderTests.cs:28
- These test names still say
CreatesEditableRequirementsTxt, but the assertions now validate wheel-based installation (and explicitly assertNotContain(\"-e .\")). Renaming the tests to reflect the new behavior (e.g.,CreatesWheelRequirementsTxt/CreatesAzureRequirementsTxt_ForWheelInstall) will reduce confusion and keep intent aligned with the implementation.
public async Task BuildAsync_WithPyprojectToml_CreatesEditableRequirementsTxt()
src/Tests/Microsoft.Agents.A365.DevTools.Cli.Tests/Services/PythonBuilderTests.cs:60
- These test names still say
CreatesEditableRequirementsTxt, but the assertions now validate wheel-based installation (and explicitly assertNotContain(\"-e .\")). Renaming the tests to reflect the new behavior (e.g.,CreatesWheelRequirementsTxt/CreatesAzureRequirementsTxt_ForWheelInstall) will reduce confusion and keep intent aligned with the implementation.
public async Task BuildAsync_WithSetupPy_CreatesEditableRequirementsTxt()
Editable installs were failing for Python builds on Azure. This PR resolves that issue, tested with Python Claude sample agent.
This pull request updates the Python packaging logic for Azure deployments to address issues with editable installs and to improve package name detection. Instead of using editable installs (which fail on Azure), the process now installs from a pre-built wheel, and a new helper method is introduced to reliably detect the package name from the wheel or
pyproject.toml.Azure Python packaging improvements:
-e .) to installing from a pre-built wheel in thedist/directory, as editable installs fail on Azure due to build location mismatches. The generatedrequirements.txtnow references the wheel and the detected package name instead of using-e ..DetectPackageNameto extract the package name from the wheel filename or, as a fallback, frompyproject.toml. If neither is found, it defaults to".". This ensures the correct package is installed during deployment.