Repository navigation
{AKS} Pin compatible pytest for live-test runners - #10556
Merged
JaysonTaiMicrosoft merged 2 commits intoNov 5, 2026
Merged
JaysonTaiMicrosoft merged 2 commits into
JaysonTaiMicrosoft merged 2 commits into
Conversation
Keep pytest 9.1.1 paired with pytest-forked 1.6.0 so report serialization does not turn passing live tests into subprocess crashes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Hi FumingZhang, |
Collaborator
|
Please fix CI issues |
Update only the six vault-resource URI query versions to match azure-mgmt-keyvault 14.1.0. Preserve request/response payloads and verify the full extension scenario in local playback. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the test-harness compatibility and recording updates.
No open issues 🎉
What changed in this PR
This PR fixes pytest compatibility in the shared AKS live/unit test harness, complementing the ordinary CI constraint in #10534 without changing az aks command behavior.
Changes:
- Pins
pytest==9.1.1alongside the existing plugins to prevent forked test-report serialization failures. - Documents the pytest/pytest-forked compatibility requirement.
- Updates the app-routing test recording’s Key Vault API version to address the playback mismatch noted in #10472.
| File | Description |
|---|---|
src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_approuting_enable_with_keyvault_secrets_provider_addon_and_keyvault_id.yaml |
Updates recorded Key Vault request URLs to API version 2026-05-15. |
src/aks-preview/azcli_aks_live_test/scripts/setup_venv.sh |
Pins pytest to 9.1.1, preserving existing plugin pins. |
src/aks-preview/azcli_aks_live_test/README.md |
Explains the runner dependency pins and serialization incompatibility. |
Review effort: Balanced
JaysonTaiMicrosoft
approved these changes
Nov 5, 2026
3 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 PR Validation — ️✔️ All clear
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
AKS live/unit test harness for the ACS module and
aks-preview; noaz akscommand behavior changes.Description
Fresh live-test environments can install pytest 9.2.0 through azdev's unconstrained dependency, while
installTestPackagesexplicitly installspytest-forked==1.6.0. Pytest 9.2 reports contain a structuredNodeIdobject that this plugin cannot encode withmarshal.dumps. Even a passing test is consequently reported asCRASHED with signal 0withValueError: unmarshallable object.Pin
pytest==9.1.1alongside the existing plugin versions in the shared environment setup script. This installation runs after CLI/extension setup, so it restores the compatible version before tests execute. Keep forked isolation, test selection, exit-code handling, and the other dependency pins unchanged. Document why the two versions must stay compatible.Related: #10472. This complements #10534, which constrains ordinary CI setup but does not cover this AKS live-test harness. No extension release/version or generated index changes are needed.
Validation
Validated on Linux with Python 3.12.3, retaining
pytest-xdist==3.8.0,pytest-json-report==1.5.0,pytest-rerunfailures==11.0,pytest-cov==4.0.0, andpytest-forked==1.6.0.bash -n src/aks-preview/azcli_aks_live_test/scripts/setup_venv.shpassed.installTestPackagesfunction in an isolated virtual environment initially containing pytest 9.2.0. Confirmed it installs pytest 9.1.1 and retains forked 1.6.0.python -m pip checkpassed.python -m pytest -n 1 --forked --json-report.The negative probes are intentional and their expected outcomes were asserted. They are not extension test failures. No Azure live tests were queued or Azure resources created; the KMS scenario still needs a live rerun after this harness fix is available.
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired) — Not applicable: only a Bash dependency installation and harness documentation changed.python scripts/ci/test_index.py -qlocally? (pip install azdevrequired) — Not run: extension packages and index are unchanged.For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.