fix: replacing the default e2e workspace and fixing e2e tests#8808
fix: replacing the default e2e workspace and fixing e2e tests#8808necusjz merged 1 commit intoAzure:mainfrom
Conversation
️✔️Azure CLI Extensions Breaking Change Test
|
|
Hi @kikomiss, |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
There was a problem hiding this comment.
Pull Request Overview
This PR fixes issues with the default e2e workspace settings and updates e2e test behavior. Key changes include updating default workspace and storage names, modifying workspace creation commands to include the "--auto-accept" flag, and adjusting assertions in job submission tests while cleaning up outdated recording files.
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/quantum/tests.live/Run.ps1 | Updated SAS token redaction regex to remove the trailing capture group. |
| src/quantum/azext_quantum/tests/latest/utils.py | Revised default subscription, workspace, and storage values. |
| src/quantum/azext_quantum/tests/latest/test_quantum_workspace.py | Added "--auto-accept" flag in workspace creation commands and introduced a fixed sleep interval. |
| src/quantum/azext_quantum/tests/latest/test_quantum_targets.py | Added the "--auto-accept" flag in workspace creation commands. |
| src/quantum/azext_quantum/tests/latest/test_quantum_jobs.py | Updated job submission tests and assertions to reflect redacted URIs. |
| Various recordings files | Removed outdated error recording files to align with current test behavior. |
| src/quantum/azext_quantum/tests/latest/recordings/* | Updated recorded response values (dates, user-agent, etc.) to reflect new test environments. |
Comments suppressed due to low confidence (1)
src/quantum/tests.live/Run.ps1:24
- The updated regex no longer preserves the trailing delimiter (e.g., '&' or end-of-line) that was captured before. Please verify that this change does not unintentionally alter the URL structure when additional query parameters exist.
(Get-Content $PathToRecording) -replace 'sig=[\w%]+','sig=REDACTED' | Set-Content $PathToRecording
| self.check("name", test_workspace_temp) | ||
| ]) | ||
|
|
||
| time.sleep(10) # Wait for the workspace to be created before fetching quotas |
There was a problem hiding this comment.
Using a fixed sleep interval may lead to flakiness in tests; consider replacing it with a polling mechanism that waits until the workspace is confirmed to be ready.
| time.sleep(10) # Wait for the workspace to be created before fetching quotas | |
| # Poll until the workspace is ready or timeout occurs | |
| timeout = 60 # Maximum wait time in seconds | |
| interval = 5 # Polling interval in seconds | |
| elapsed_time = 0 | |
| while elapsed_time < timeout: | |
| workspace_status = self.cmd(f'az quantum workspace show -g {test_resource_group} -w {test_workspace_temp} -o json').get_output_in_json() | |
| if workspace_status.get("properties", {}).get("provisioningState") == "Succeeded": | |
| break | |
| time.sleep(interval) | |
| elapsed_time += interval | |
| else: | |
| raise TimeoutError(f"Workspace '{test_workspace_temp}' did not become ready within {timeout} seconds.") |
|
Hi @kikomiss Release SuggestionsModule: quantum
Notes
|
Only fixes for unit and E2E tests. No extension release required.
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
az quantum
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)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.