Repository navigation
[durabletask] Add recorded cross-region failover tests - #10529
Bernd Verst (berndverst) wants to merge 2 commits into
Conversation
Enable default playback of the eastasia/southeastasia failover lifecycle, verify replica role changes, and cover generated-LRO cleanup handling. Include only test code, the successful sanitized recording, and related documentation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the test-only update enabling recorded failover playback.
No open issues 🎉
What changed in this PR
This test-only follow-up enables offline playback of the Durable Task cross-region failover lifecycle, without changing extension runtime code or dependencies.
Changes:
- Switch the scenario from live-only to recorded playback using East Asia and Southeast Asia, with replication-role checks after graceful and forced failover.
- Use generated long-running-operation polling for cleanup and add cleanup-helper regression tests.
- Update documentation with the recorded scenario’s coverage, regions, and re-recording command.
| File | Description |
|---|---|
src/durabletask/README.md |
Documents recorded failover coverage and re-recording instructions. |
src/durabletask/azext_durabletask/tests/latest/test_recording_processors.py |
Adds cleanup tests for polling, missing configurations, and unexpected errors. |
src/durabletask/azext_durabletask/tests/latest/test_durabletask_scenario.py |
Enables recorded failover playback, checks role transitions, and updates cleanup. |
Review effort: Balanced
|
Hi Bernd Verst (@berndverst), |
|
Please fix CI issues |
Use pytest below 9.2 after azdev setup. Pytest 9.2 adds a NodeId report field that pytest-forked 1.7.5 cannot marshal, causing every Linux forked test to exit with status 3. Verified all 69 durabletask tests with CI-style Linux fork isolation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Yong Zhang (@yonzhan) Fixed the CI runner failure in The Python 3.10–3.14 jobs all used pytest 9.2.0 with pytest-forked 1.7.5. Pytest 9.2 adds a The shared CI setup now installs Verification: all 69 durabletask tests passed under Linux with |
|
/azp run |
|
Commenter does not have sufficient privileges for PR 10529 in repo Azure/azure-cli-extensions |
|
Yong Zhang (@yonzhan) The fix is pushed and the Linux forked suite passes. I requested |
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
🤖 PR Validation — ️✔️ All clear
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
az durabletask scheduler failover-instanceTest-only follow-up to #10482.
eastasiaprimary and asoutheastasiapartner, both Dedicated capacity 1.No extension runtime code, dependencies, version, or extension-index changes are included. Failed diagnostic captures are excluded from this follow-up.
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install azdevrequired)The existing extension version is unchanged because this PR only adds test coverage and recordings.
For new extensions:
N/A: this is an existing extension.
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.Validation
Commands were run locally using the Azure CLI development virtual environment:
python -m azdev test --discover --no-exitfirst azext_durabletask -a --tb=short -q- passed: 69 tests, no skips.python scripts\ci\test_index.py -q- passed: 9 tests run, including 2 checks skipped outside CI.python -m azdev style durabletask --pep8 --pylint- passed: pylint and flake8.python -m azdev linter durabletask --min-severity medium- passed.python -m azdev scan --confidence-level MEDIUM -d src\durabletask -r --include '*.py' '*.yaml' '*.md' '*.rst' '*.json' '*.cfg' --continue-on-failure- passed: no secrets detected.The live recording also passed using
python -m azdev test --series --live test_durabletask_failover_lifecycle_live -a --tb=short --show-capture=nobefore the test was renamed totest_durabletask_failover_lifecycle_recordedfor normal playback. The successful scenario's temporary resource groups were deleted. A separate account-identifier audit of the recording passed; no real subscription, tenant, caller, or credential details are included.