-
Notifications
You must be signed in to change notification settings - Fork 172
Add ability to reuse workspace across parallel test processes to speed up e2e #4466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Unit Test Results0 tests 0 ✅ 0s ⏱️ Results for commit 836071e. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces the ability to reuse a workspace across parallel test processes to speed up end-to-end tests by implementing a file locking mechanism and additional logic in the test setup/teardown routines. Key changes include:
- Enhancements to e2e_tests/conftest.py to support parallel workspace setup and teardown with locking.
- Documentation updates and GitHub workflow modifications to expose and use the configurable E2E_TESTS_NUMBER_PROCESSES variable.
- Adjustments in the devcontainer action to include a fallback default for the case where the E2E test process count is not supplied.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| e2e_tests/conftest.py | Added functions for JSON file handling, workspace locking logic, and modifications to support parallel execution. |
| docs/tre-admins/setup-instructions/workflows.md | Documentation updated to include the new E2E_TESTS_NUMBER_PROCESSES environment variable. |
| .github/workflows/pr_comment_bot.yml | Workflow updated to parameterize the number of E2E test processes. |
| .github/workflows/deploy_tre.yml | Workflow updated to use the variable for E2E test processes. |
| .github/actions/devcontainer_run_command/action.yml | Action updated to provide a default value for E2E_TESTS_NUMBER_PROCESSES. |
…k manager assignemnt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enables parallel E2E test execution by reusing a single workspace across pytest worker processes, reducing setup time and improving test throughput.
- Introduces a file‐lock based fixture to share and reuse the base workspace among workers
- Adds
E2E_TESTS_NUMBER_PROCESSESsupport, updates CI/workflows, Makefile, and docs for parallel runs - Adds
assign_airlock_manager_rolehelper and refactors Airlock tests to use a shared base workspace
Reviewed Changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| e2e_tests/test_performance.py | Switched workspace auth to Automatic and updated service ID var |
| e2e_tests/test_airlock.py | Refactored Airlock tests to use new shared base workspace fixture |
| e2e_tests/resources/workspace.py | Added assign_airlock_manager_role for MS Graph role assignments |
| e2e_tests/resources/resource.py | Annotated post_resource return type |
| e2e_tests/pytest.ini | Updated pytest markers (removed extended_aad, added manual) |
| e2e_tests/helpers.py | Simplified token helpers and added get_msgraph_token |
| e2e_tests/conftest.py | New parallel‐workspace fixture with file locking logic |
| e2e_tests/config.py | Introduced MS Graph and Guacamole service config variables |
| e2e_tests/.env.sample | Sample env file cleared; needs restoration |
| docs/tre-developers/end-to-end-tests.md | Updated VS Code debug instructions for new .env and config paths |
| docs/tre-admins/setup-instructions/workflows.md | Documented E2E_TESTS_NUMBER_PROCESSES variable |
| devops/scripts/setup_local_debugging.sh | Conditional env cleanup for new variables |
| devops/scripts/get_access_token.sh | Removed password‐flow branch |
| config.sample.yaml | Added commented e2e_tests section |
| Makefile | Added airlock and workspace-services targets; load parallel .env |
| .github/workflows/pr_comment_bot.yml | Inject parallel process var from repository vars |
| .github/workflows/deploy_tre.yml | Updated e2e test selectors and parallel var usage |
| .github/actions/devcontainer_run_command/action.yml | Exposed E2E_TESTS_NUMBER_PROCESSES to devcontainer runs |
| .devcontainer/devcontainer.json | Cleaned up outdated E2E AAD debug configuration |
Comments suppressed due to low confidence (2)
e2e_tests/pytest.ini:5
- The 'airlock' pytest marker is missing in pytest.ini, so tests decorated with @pytest.mark.airlock will trigger unknown‐mark warnings. Please add 'airlock' to the markers list.
manual
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the E2E testing framework by enabling workspace reuse across parallel test processes, thereby accelerating end-to-end test execution. Key changes include updating authentication types in test resources, refactoring test workflows and fixtures (including file locking for shared workspaces), and adjusting related configuration, CI/CD, and documentation updates.
Reviewed Changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| e2e_tests/test_performance.py | Switches workspace auth type from "Manual" to "Automatic" |
| e2e_tests/test_airlock.py | Updates workspace path references and variable names for clarity |
| e2e_tests/resources/workspace.py | Introduces get_msgraph_token and role assignment via MS Graph API |
| e2e_tests/resources/resource.py | Adds return type annotations to post_resource for improved clarity |
| e2e_tests/pytest.ini & config files | Updates environment variable names to support parallel test execution |
| conftest.py | Refactors workspace setup with file locking and asynchronous cleanup |
| CI/CD & Makefile files | Adapts workflows and build targets to integrate parallel test parameters |
| Documentation files | Updates instructions and references for new E2E parallelization options |
|
/test-extended |
|
🤖 pr-bot 🤖 🏃 Running extended tests: https://github.com/microsoft/AzureTRE/actions/runs/15130362385 (with refid (in response to this comment from @marrobi) |
|
/test-extended |
|
🤖 pr-bot 🤖 🏃 Running extended tests: https://github.com/microsoft/AzureTRE/actions/runs/15132819569 (with refid (in response to this comment from @marrobi) |
|
/test-extended |
|
🤖 pr-bot 🤖 🏃 Running extended tests: https://github.com/microsoft/AzureTRE/actions/runs/15136238334 (with refid (in response to this comment from @marrobi) |
|
/test-extended |
|
🤖 pr-bot 🤖 🏃 Running extended tests: https://github.com/microsoft/AzureTRE/actions/runs/15139994904 (with refid (in response to this comment from @marrobi) |
|
/test-extended |
|
🤖 pr-bot 🤖 🏃 Running extended tests: https://github.com/microsoft/AzureTRE/actions/runs/15145080127 (with refid (in response to this comment from @marrobi) |
|
/test-extended |
|
🤖 pr-bot 🤖 🏃 Running extended tests: https://github.com/microsoft/AzureTRE/actions/runs/15156157858 (with refid (in response to this comment from @marrobi) |
Fixes #2868
Add ability to reuse workspace across parallel test processes to speed up e2e
Overview
This PR introduces the ability to reuse workspaces across parallel end-to-end (E2E) test processes, significantly improving the speed and efficiency of E2E test execution. The changes include updates to configuration, scripts, Makefile targets, and documentation to support parallelization and workspace reuse.
Key Changes
Parallel E2E Test Support:
E2E_TESTS_NUMBER_PROCESSESvariable to control the number of parallel pytest processes.Configuration and Environment Updates:
Makefile and Script Enhancements:
CI/CD Workflow Adjustments:
Documentation:
Cleanup and Refactoring: