Skip to content

Commit 885813a

Browse files
Remove secret for setting up E2E parallelism (#2872)
1 parent 81b4230 commit 885813a

File tree

8 files changed

+11
-15
lines changed

8 files changed

+11
-15
lines changed

.github/actions/devcontainer_run_command/action.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@ inputs:
106106
RESOURCE_PROCESSOR_NUMBER_PROCESSES_PER_INSTANCE:
107107
description: "The number of resource processor processes to create for parallel operations"
108108
required: false
109-
E2E_TESTS_NUMBER_PROCESSES:
110-
description: "Number of processes to run e2e tests"
111109

112110
runs:
113111
using: composite

.github/workflows/deploy_tre.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,3 @@ jobs:
5959
CORE_APP_SERVICE_PLAN_SKU: ${{ secrets.CORE_APP_SERVICE_PLAN_SKU }}
6060
WORKSPACE_APP_SERVICE_PLAN_SKU: ${{ secrets.WORKSPACE_APP_SERVICE_PLAN_SKU }}
6161
RESOURCE_PROCESSOR_NUMBER_PROCESSES_PER_INSTANCE: ${{ secrets.RESOURCE_PROCESSOR_NUMBER_PROCESSES_PER_INSTANCE }}
62-
E2E_TESTS_NUMBER_PROCESSES: ${{ secrets.E2E_TESTS_NUMBER_PROCESSES }}

.github/workflows/deploy_tre_branch.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,3 @@ jobs:
8686
CORE_APP_SERVICE_PLAN_SKU: ${{ secrets.CORE_APP_SERVICE_PLAN_SKU }}
8787
WORKSPACE_APP_SERVICE_PLAN_SKU: ${{ secrets.WORKSPACE_APP_SERVICE_PLAN_SKU }}
8888
RESOURCE_PROCESSOR_NUMBER_PROCESSES_PER_INSTANCE: ${{ secrets.RESOURCE_PROCESSOR_NUMBER_PROCESSES_PER_INSTANCE }}
89-
E2E_TESTS_NUMBER_PROCESSES: ${{ secrets.E2E_TESTS_NUMBER_PROCESSES }}

.github/workflows/deploy_tre_reusable.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,6 @@ on: # yamllint disable-line rule:truthy
109109
RESOURCE_PROCESSOR_NUMBER_PROCESSES_PER_INSTANCE:
110110
description: "Inputs"
111111
required: false
112-
E2E_TESTS_NUMBER_PROCESSES:
113-
description: ""
114-
required: false
115112

116113
# This will prevent multiple runs of this entire workflow.
117114
# We should NOT cancel in progress runs as that can destabilize the environment.
@@ -625,7 +622,6 @@ jobs:
625622
TRE_ID: "${{ secrets.TRE_ID }}"
626623
IS_API_SECURED: false
627624
WORKSPACE_APP_SERVICE_PLAN_SKU: ${{ secrets.WORKSPACE_APP_SERVICE_PLAN_SKU }}
628-
E2E_TESTS_NUMBER_PROCESSES: ${{ secrets.E2E_TESTS_NUMBER_PROCESSES }}
629625

630626
- name: Upload Test Results
631627
if: always()

Makefile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ IMAGE_NAME_PREFIX?="microsoft/azuretre"
77
FULL_CONTAINER_REGISTRY_NAME?="$${ACR_NAME}.azurecr.io"
88
FULL_IMAGE_NAME_PREFIX:=`echo "${FULL_CONTAINER_REGISTRY_NAME}/${IMAGE_NAME_PREFIX}" | tr A-Z a-z`
99
LINTER_REGEX_INCLUDE?=all # regular expression used to specify which files to include in local linting (defaults to "all")
10+
E2E_TESTS_NUMBER_PROCESSES_DEFAULT=4 # can be overridden in e2e_tests/.env
1011

1112
target_title = @echo -e "\n\e[34m»»» 🧩 \e[96m$(1)\e[0m..."
1213

@@ -313,9 +314,13 @@ test-e2e-custom:
313314
$(call target_title, "Running E2E tests with custom selector ${SELECTOR}") \
314315
&& . ${MAKEFILE_DIR}/devops/scripts/load_env.sh ${MAKEFILE_DIR}/e2e_tests/.env \
315316
&& cd e2e_tests \
316-
&& if [[ -n "$${E2E_TESTS_NUMBER_PROCESSES}" && "$${E2E_TESTS_NUMBER_PROCESSES}" -ne 1 ]]; then \
317-
python -m pytest -n "$${E2E_TESTS_NUMBER_PROCESSES}" -m "${SELECTOR}" --verify $${IS_API_SECURED:-true} --junit-xml "pytest_e2e_$${SELECTOR// /_}.xml"; else \
318-
python -m pytest -m "${SELECTOR}" --verify $${IS_API_SECURED:-true} --junit-xml "pytest_e2e_$${SELECTOR// /_}.xml"; fi
317+
&& \
318+
if [[ -n "$${E2E_TESTS_NUMBER_PROCESSES}" && "$${E2E_TESTS_NUMBER_PROCESSES}" -ne 1 ]]; then \
319+
python -m pytest -n "$${E2E_TESTS_NUMBER_PROCESSES}" -m "${SELECTOR}" --verify $${IS_API_SECURED:-true} --junit-xml "pytest_e2e_$${SELECTOR// /_}.xml"; \
320+
elif [[ "$${E2E_TESTS_NUMBER_PROCESSES}" -eq 1 ]]; then \
321+
python -m pytest -m "${SELECTOR}" --verify $${IS_API_SECURED:-true} --junit-xml "pytest_e2e_$${SELECTOR// /_}.xml"; \
322+
else \
323+
python -m pytest -n "${E2E_TESTS_NUMBER_PROCESSES_DEFAULT}" -m "${SELECTOR}" --verify $${IS_API_SECURED:-true} --junit-xml "pytest_e2e_$${SELECTOR// /_}.xml"; fi
319324

320325
setup-local-debugging:
321326
$(call target_title,"Setting up the ability to debug the API and Resource Processor") \

docs/tre-admins/environment-variables.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,3 @@
5757
| -------- | ----------- |
5858
| `AZURE_CREDENTIALS`| Credentials used to authorize CI/CD workflows to provision resources for the TRE workspaces and workspace services. This is basically your ARM client credentials in json format. Read more about how to create it and its format [here](./setup-instructions/workflows.md##create-a-service principal-for-provisioning-resources)|
5959
| `MS_TEAMS_WEBHOOK_URI` | URI for the Teams channel webhook |
60-
| `E2E_TESTS_NUMBER_PROCESSES` | (Optional) Number of processes to run End-to-end tests |

e2e_tests/.env.sample

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ WORKSPACE_APP_SERVICE_PLAN_SKU="P1v2"
2020
TEST_WORKSPACE_ID=<ID of pre-created workspace>
2121
TEST_AAD_WORKSPACE_ID=ID of pre-created AAD workspace>
2222

23-
# Uncomment this if you wish to run tests in parallel
24-
# E2E_TESTS_NUMBER_PROCESSES=4
23+
# Run tests sequentially. Change this value if you want to run tests in parallel locally
24+
E2E_TESTS_NUMBER_PROCESSES=1

e2e_tests/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ async def check_aad_auth_redirect(endpoint, verify) -> None:
8585
while (True):
8686
try:
8787
response = await client.get(url=endpoint, timeout=TIMEOUT)
88-
LOGGER.info(f"Endpoint Response: {response}")
88+
LOGGER.info(f"Endpoint Response: {endpoint} {response}")
8989

9090
if response.status_code in terminal_http_status:
9191
break

0 commit comments

Comments
 (0)