Repository navigation
{Packaging} pytest version restricted - #10534
mansoor sarfraz (msarfraz) wants to merge 1 commit into
Conversation
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the pipeline pytest-constraint change.
No open issues 🎉
What changed in this PR
Restricts pytest versions in the shared Azure Pipelines development setup to avoid the documented incompatibility with pytest-forked.
Changes:
- Adds a
pytest<9.2constraint. - Exports
PIP_CONSTRAINTfor the setup script and makes it available to subsequent pipeline tasks.
| File | Description |
|---|---|
.azure-pipelines/templates/azdev_setup.yml |
Configures pip to use the shared constraints file across pipeline tasks. |
.azure-pipelines/constraints.txt |
Caps pytest below 9.2 and documents the compatibility reason. |
Review effort: Balanced
|
mansoor sarfraz (@msarfraz) Non-blocking: 2 unrelated failures, 0 PR-related/uncertain. Unchanged logicapp and isolated scan supersede "Uncertain" below. No source change requested. Rerun/escalate Credential Scan.
To addressTick each item as you address it.
Review detailsTest validation
Risk assessment1/100 · Low The Low rating reflects the detected change scope with no elevated security, reliability, customer, operational, dependency, sovereign-cloud, generated-output, or cross-component signal.
Ask the Agent Tick a box to queue an action. Requires write access to this repository.
|
🤖 PR Validation — ️✔️ All clear
Background
The Azure CLI Extensions unit tests are failing
Root Cause
The failures are caused by an incompatibility between pytest 9.2.0 and pytest-forked 1.7.5,
What breaks
The installation logs explain why this appeared suddenly: azdev allows pytest>=5.0.0, so fresh environments automatically installed 9.2.0. Pinning the azdev Git commit does not pin its transitive dependencies.
Immediate Solution
constrain pytest to 9.1.1 or pytest<9.2. Apply a CI dependency constraint such as pytest<9.2 during installation, and retain it across subsequent dependency-installation steps.