Open TonyWildish-BH opened 7 months ago
Further info: the full run is at https://github.com/Barts-Life-Science/AzureTRE/actions/runs/8376242751/job/22936389036, the tail of the logfile with the error and stack trace is:
2024-03-21T17:29:22.6641263Z
2024-03-21T17:29:22.6641382Z
2024-03-21T17:29:22.6641858Z ==================================== ERRORS ====================================
2024-03-21T17:29:22.6643386Z ________________ ERROR at setup of test_airlock_review_vm_flow _________________
2024-03-21T17:29:22.6644329Z
2024-03-21T17:29:22.6645006Z event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False>
2024-03-21T17:29:22.6646979Z request = <SubRequest 'setup_test_workspace' for <Function test_airlock_review_vm_flow>>
2024-03-21T17:29:22.6648470Z kwargs = ***'verify': False***
2024-03-21T17:29:22.6649575Z func = <function setup_test_workspace at 0x7f0dcfdbe940>
2024-03-21T17:29:22.6651211Z setup = <function _wrap_asyncgen_fixture.<locals>._asyncgen_fixture_wrapper.<locals>.setup at 0x7f0dcf15f670>
2024-03-21T17:29:22.6653916Z finalizer = <function _wrap_asyncgen_fixture.<locals>._asyncgen_fixture_wrapper.<locals>.finalizer at 0x7f0dcf15f700>
2024-03-21T17:29:22.6654659Z
2024-03-21T17:29:22.6654815Z @functools.wraps(fixture)
2024-03-21T17:29:22.6655238Z def _asyncgen_fixture_wrapper(
2024-03-21T17:29:22.6655869Z event_loop: asyncio.AbstractEventLoop, request: SubRequest, **kwargs: Any
2024-03-21T17:29:22.6656470Z ):
2024-03-21T17:29:22.6656802Z func = _perhaps_rebind_fixture_func(
2024-03-21T17:29:22.6657342Z fixture, request.instance, fixturedef.unittest
2024-03-21T17:29:22.6657820Z )
2024-03-21T17:29:22.6658257Z gen_obj = func(**_add_kwargs(func, kwargs, event_loop, request))
2024-03-21T17:29:22.6658781Z
2024-03-21T17:29:22.6659350Z async def setup():
2024-03-21T17:29:22.6659762Z res = await gen_obj.__anext__()
2024-03-21T17:29:22.6660204Z return res
2024-03-21T17:29:22.6660524Z
2024-03-21T17:29:22.6660893Z def finalizer() -> None:
2024-03-21T17:29:22.6661325Z """Yield again, to finalize."""
2024-03-21T17:29:22.6661738Z
2024-03-21T17:29:22.6662108Z async def async_finalizer() -> None:
2024-03-21T17:29:22.6662546Z try:
2024-03-21T17:29:22.6662905Z await gen_obj.__anext__()
2024-03-21T17:29:22.6663372Z except StopAsyncIteration:
2024-03-21T17:29:22.6663797Z pass
2024-03-21T17:29:22.6664134Z else:
2024-03-21T17:29:22.6664604Z msg = "Async generator fixture didn't stop."
2024-03-21T17:29:22.6665119Z msg += "Yield only once."
2024-03-21T17:29:22.6665561Z raise ValueError(msg)
2024-03-21T17:29:22.6665953Z
2024-03-21T17:29:22.6666325Z event_loop.run_until_complete(async_finalizer())
2024-03-21T17:29:22.6666785Z
2024-03-21T17:29:22.6667135Z > result = event_loop.run_until_complete(setup())
2024-03-21T17:29:22.6667483Z
2024-03-21T17:29:22.6667856Z /usr/local/lib/python3.8/site-packages/pytest_asyncio/plugin.py:304:
2024-03-21T17:29:22.6668561Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2024-03-21T17:29:22.6669281Z /usr/local/lib/python3.8/asyncio/base_events.py:616: in run_until_complete
2024-03-21T17:29:22.6669878Z return future.result()
2024-03-21T17:29:22.6670713Z /usr/local/lib/python3.8/site-packages/pytest_asyncio/plugin.py:286: in setup
2024-03-21T17:29:22.6671331Z res = await gen_obj.__anext__()
2024-03-21T17:29:22.6671769Z conftest.py:120: in setup_test_workspace
2024-03-21T17:29:22.6672358Z workspace_path, workspace_id = await create_or_get_test_workspace(
2024-03-21T17:29:22.6673188Z conftest.py:72: in create_or_get_test_workspace
2024-03-21T17:29:22.6674092Z workspace_path, workspace_id = await post_resource(payload, resource_strings.API_WORKSPACES, access_token=admin_token, verify=verify)
2024-03-21T17:29:22.6674941Z resources/resource.py:39: in post_resource
2024-03-21T17:29:22.6675677Z assert_status(response, [status.HTTP_202_ACCEPTED], "The resource couldn't be sent")
2024-03-21T17:29:22.6676421Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2024-03-21T17:29:22.6676814Z
2024-03-21T17:29:22.6677078Z response = <Response [400 Bad Request]>, expected_status = [202]
2024-03-21T17:29:22.6677711Z message_prefix = "The resource couldn't be sent"
2024-03-21T17:29:22.6678048Z
2024-03-21T17:29:22.6678573Z def assert_status(response: Response, expected_status: List[int] = [200], message_prefix: str = "Unexpected HTTP Status"):
2024-03-21T17:29:22.6679432Z > assert response.status_code in expected_status, \
2024-03-21T17:29:22.6680338Z f"***message_prefix***. Expected: ***expected_status***. Actual: ***response.status_code***. Response text: ***response.text***"
2024-03-21T17:29:22.6681637Z E AssertionError: The resource couldn't be sent. Expected: [202]. Actual: 400. Response text: The App is missing role WorkspaceOwner
2024-03-21T17:29:22.6682328Z
2024-03-21T17:29:22.6682473Z helpers.py:126: AssertionError
2024-03-21T17:29:22.6683042Z ------------------------------ Captured log setup ------------------------------
2024-03-21T17:29:22.6683828Z INFO e2e_tests.conftest:conftest.py:50 Creating workspace tre-workspace-base
2024-03-21T17:29:22.6684923Z INFO httpx:_client.py:1729 HTTP Request: POST https://***.uksouth.cloudapp.azure.com/api/workspaces "HTTP/1.1 400 Bad Request"
2024-03-21T17:29:22.6685890Z _____________________ ERROR at setup of test_airlock_flow ______________________
2024-03-21T17:29:22.6686302Z
2024-03-21T17:29:22.6686618Z event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False>
2024-03-21T17:29:22.6687654Z request = <SubRequest 'setup_test_workspace' for <Function test_airlock_review_vm_flow>>
2024-03-21T17:29:22.6688343Z kwargs = ***'verify': False***
2024-03-21T17:29:22.6688823Z func = <function setup_test_workspace at 0x7f0dcfdbe940>
2024-03-21T17:29:22.6689630Z setup = <function _wrap_asyncgen_fixture.<locals>._asyncgen_fixture_wrapper.<locals>.setup at 0x7f0dcf15f670>
2024-03-21T17:29:22.6690690Z finalizer = <function _wrap_asyncgen_fixture.<locals>._asyncgen_fixture_wrapper.<locals>.finalizer at 0x7f0dcf15f700>
2024-03-21T17:29:22.6691290Z
2024-03-21T17:29:22.6691435Z @functools.wraps(fixture)
2024-03-21T17:29:22.6691836Z def _asyncgen_fixture_wrapper(
2024-03-21T17:29:22.6692434Z event_loop: asyncio.AbstractEventLoop, request: SubRequest, **kwargs: Any
2024-03-21T17:29:22.6693003Z ):
2024-03-21T17:29:22.6693335Z func = _perhaps_rebind_fixture_func(
2024-03-21T17:29:22.6693863Z fixture, request.instance, fixturedef.unittest
2024-03-21T17:29:22.6694330Z )
2024-03-21T17:29:22.6694773Z gen_obj = func(**_add_kwargs(func, kwargs, event_loop, request))
2024-03-21T17:29:22.6695295Z
2024-03-21T17:29:22.6695586Z async def setup():
2024-03-21T17:29:22.6695977Z res = await gen_obj.__anext__()
2024-03-21T17:29:22.6696407Z return res
2024-03-21T17:29:22.6696729Z
2024-03-21T17:29:22.6697061Z def finalizer() -> None:
2024-03-21T17:29:22.6697490Z """Yield again, to finalize."""
2024-03-21T17:29:22.6697904Z
2024-03-21T17:29:22.6698275Z async def async_finalizer() -> None:
2024-03-21T17:29:22.6698873Z try:
2024-03-21T17:29:22.6699237Z await gen_obj.__anext__()
2024-03-21T17:29:22.6699710Z except StopAsyncIteration:
2024-03-21T17:29:22.6700142Z pass
2024-03-21T17:29:22.6700487Z else:
2024-03-21T17:29:22.6700956Z msg = "Async generator fixture didn't stop."
2024-03-21T17:29:22.6701468Z msg += "Yield only once."
2024-03-21T17:29:22.6701928Z raise ValueError(msg)
2024-03-21T17:29:22.6702329Z
2024-03-21T17:29:22.6702702Z event_loop.run_until_complete(async_finalizer())
2024-03-21T17:29:22.6703159Z
2024-03-21T17:29:22.6703522Z > result = event_loop.run_until_complete(setup())
2024-03-21T17:29:22.6703870Z
2024-03-21T17:29:22.6704240Z /usr/local/lib/python3.8/site-packages/pytest_asyncio/plugin.py:304:
2024-03-21T17:29:22.6704940Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2024-03-21T17:29:22.6705657Z /usr/local/lib/python3.8/asyncio/base_events.py:616: in run_until_complete
2024-03-21T17:29:22.6716785Z return future.result()
2024-03-21T17:29:22.6717837Z /usr/local/lib/python3.8/site-packages/pytest_asyncio/plugin.py:286: in setup
2024-03-21T17:29:22.6718680Z res = await gen_obj.__anext__()
2024-03-21T17:29:22.6719381Z conftest.py:120: in setup_test_workspace
2024-03-21T17:29:22.6720231Z workspace_path, workspace_id = await create_or_get_test_workspace(
2024-03-21T17:29:22.6720856Z conftest.py:72: in create_or_get_test_workspace
2024-03-21T17:29:22.6721765Z workspace_path, workspace_id = await post_resource(payload, resource_strings.API_WORKSPACES, access_token=admin_token, verify=verify)
2024-03-21T17:29:22.6722618Z resources/resource.py:39: in post_resource
2024-03-21T17:29:22.6723370Z assert_status(response, [status.HTTP_202_ACCEPTED], "The resource couldn't be sent")
2024-03-21T17:29:22.6724112Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2024-03-21T17:29:22.6724517Z
2024-03-21T17:29:22.6724784Z response = <Response [400 Bad Request]>, expected_status = [202]
2024-03-21T17:29:22.6725421Z message_prefix = "The resource couldn't be sent"
2024-03-21T17:29:22.6725760Z
2024-03-21T17:29:22.6726286Z def assert_status(response: Response, expected_status: List[int] = [200], message_prefix: str = "Unexpected HTTP Status"):
2024-03-21T17:29:22.6727361Z > assert response.status_code in expected_status, \
2024-03-21T17:29:22.6728268Z f"***message_prefix***. Expected: ***expected_status***. Actual: ***response.status_code***. Response text: ***response.text***"
2024-03-21T17:29:22.6729578Z E AssertionError: The resource couldn't be sent. Expected: [202]. Actual: 400. Response text: The App is missing role WorkspaceOwner
2024-03-21T17:29:22.6730262Z
2024-03-21T17:29:22.6730411Z helpers.py:126: AssertionError
2024-03-21T17:29:22.6731017Z _____ ERROR at setup of test_create_guacamole_service_into_base_workspace ______
2024-03-21T17:29:22.6731494Z
2024-03-21T17:29:22.6731814Z event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False>
2024-03-21T17:29:22.6732685Z request = <SubRequest 'setup_test_workspace' for <Function test_airlock_review_vm_flow>>
2024-03-21T17:29:22.6733353Z kwargs = ***'verify': False***
2024-03-21T17:29:22.6733836Z func = <function setup_test_workspace at 0x7f0dcfdbe940>
2024-03-21T17:29:22.6734653Z setup = <function _wrap_asyncgen_fixture.<locals>._asyncgen_fixture_wrapper.<locals>.setup at 0x7f0dcf15f670>
2024-03-21T17:29:22.6735708Z finalizer = <function _wrap_asyncgen_fixture.<locals>._asyncgen_fixture_wrapper.<locals>.finalizer at 0x7f0dcf15f700>
2024-03-21T17:29:22.6736306Z
2024-03-21T17:29:22.6736453Z @functools.wraps(fixture)
2024-03-21T17:29:22.6736850Z def _asyncgen_fixture_wrapper(
2024-03-21T17:29:22.6737453Z event_loop: asyncio.AbstractEventLoop, request: SubRequest, **kwargs: Any
2024-03-21T17:29:22.6738025Z ):
2024-03-21T17:29:22.6738359Z func = _perhaps_rebind_fixture_func(
2024-03-21T17:29:22.6739052Z fixture, request.instance, fixturedef.unittest
2024-03-21T17:29:22.6739518Z )
2024-03-21T17:29:22.6739955Z gen_obj = func(**_add_kwargs(func, kwargs, event_loop, request))
2024-03-21T17:29:22.6740465Z
2024-03-21T17:29:22.6740752Z async def setup():
2024-03-21T17:29:22.6741154Z res = await gen_obj.__anext__()
2024-03-21T17:29:22.6741592Z return res
2024-03-21T17:29:22.6741910Z
2024-03-21T17:29:22.6742240Z def finalizer() -> None:
2024-03-21T17:29:22.6742667Z """Yield again, to finalize."""
2024-03-21T17:29:22.6743081Z
2024-03-21T17:29:22.6743448Z async def async_finalizer() -> None:
2024-03-21T17:29:22.6743889Z try:
2024-03-21T17:29:22.6744252Z await gen_obj.__anext__()
2024-03-21T17:29:22.6744721Z except StopAsyncIteration:
2024-03-21T17:29:22.6745150Z pass
2024-03-21T17:29:22.6745494Z else:
2024-03-21T17:29:22.6745961Z msg = "Async generator fixture didn't stop."
2024-03-21T17:29:22.6746478Z msg += "Yield only once."
2024-03-21T17:29:22.6746924Z raise ValueError(msg)
2024-03-21T17:29:22.6747327Z
2024-03-21T17:29:22.6747701Z event_loop.run_until_complete(async_finalizer())
2024-03-21T17:29:22.6748165Z
2024-03-21T17:29:22.6748528Z > result = event_loop.run_until_complete(setup())
2024-03-21T17:29:22.6748878Z
2024-03-21T17:29:22.6749248Z /usr/local/lib/python3.8/site-packages/pytest_asyncio/plugin.py:304:
2024-03-21T17:29:22.6750027Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2024-03-21T17:29:22.6750765Z /usr/local/lib/python3.8/asyncio/base_events.py:616: in run_until_complete
2024-03-21T17:29:22.6751367Z return future.result()
2024-03-21T17:29:22.6752002Z /usr/local/lib/python3.8/site-packages/pytest_asyncio/plugin.py:286: in setup
2024-03-21T17:29:22.6752859Z res = await gen_obj.__anext__()
2024-03-21T17:29:22.6753308Z conftest.py:120: in setup_test_workspace
2024-03-21T17:29:22.6753903Z workspace_path, workspace_id = await create_or_get_test_workspace(
2024-03-21T17:29:22.6754513Z conftest.py:72: in create_or_get_test_workspace
2024-03-21T17:29:22.6755571Z workspace_path, workspace_id = await post_resource(payload, resource_strings.API_WORKSPACES, access_token=admin_token, verify=verify)
2024-03-21T17:29:22.6756446Z resources/resource.py:39: in post_resource
2024-03-21T17:29:22.6757195Z assert_status(response, [status.HTTP_202_ACCEPTED], "The resource couldn't be sent")
2024-03-21T17:29:22.6757940Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2024-03-21T17:29:22.6758335Z
2024-03-21T17:29:22.6758604Z response = <Response [400 Bad Request]>, expected_status = [202]
2024-03-21T17:29:22.6759237Z message_prefix = "The resource couldn't be sent"
2024-03-21T17:29:22.6759578Z
2024-03-21T17:29:22.6760103Z def assert_status(response: Response, expected_status: List[int] = [200], message_prefix: str = "Unexpected HTTP Status"):
2024-03-21T17:29:22.6760963Z > assert response.status_code in expected_status, \
2024-03-21T17:29:22.6761850Z f"***message_prefix***. Expected: ***expected_status***. Actual: ***response.status_code***. Response text: ***response.text***"
2024-03-21T17:29:22.6763163Z E AssertionError: The resource couldn't be sent. Expected: [202]. Actual: 400. Response text: The App is missing role WorkspaceOwner
2024-03-21T17:29:22.6763853Z
2024-03-21T17:29:22.6764004Z helpers.py:126: AssertionError
2024-03-21T17:29:22.6764489Z =============================== warnings summary ===============================
2024-03-21T17:29:22.6765044Z test_airlock.py::test_airlock_review_vm_flow
2024-03-21T17:29:22.6765561Z test_shared_services.py::test_patch_firewall
2024-03-21T17:29:22.6766270Z test_shared_services.py::test_create_shared_service[tre-shared-service-gitea]
2024-03-21T17:29:22.6767320Z test_shared_services.py::test_create_shared_service[tre-shared-service-admin-vm]
2024-03-21T17:29:22.6768225Z test_shared_services.py::test_create_shared_service[tre-shared-service-airlock-notifier]
2024-03-21T17:29:22.6769007Z test_shared_services.py::test_create_certs_nexus_shared_service
2024-03-21T17:29:22.6769719Z test_workspace_services.py::test_create_guacamole_service_into_aad_workspace
2024-03-21T17:29:22.6770609Z test_workspace_templates.py::test_create_workspace_templates[tre-workspace-unrestricted]
2024-03-21T17:29:22.6771606Z test_workspace_templates.py::test_create_workspace_templates[tre-workspace-airlock-import-review]
2024-03-21T17:29:22.6773817Z /usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py:1103: InsecureRequestWarning: Unverified HTTPS request is being made to host 'login.microsoftonline.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
2024-03-21T17:29:22.6775466Z warnings.warn(
2024-03-21T17:29:22.6775673Z
2024-03-21T17:29:22.6776038Z -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
2024-03-21T17:29:22.6777078Z - generated xml file: /workspaces/tre/e2e_tests/pytest_e2e_extended_or_extended_aad_or_shared_services_or_airlock.xml -
2024-03-21T17:29:22.6777958Z =========================== short test summary info ============================
2024-03-21T17:29:22.6778734Z ERROR test_airlock.py::test_airlock_review_vm_flow - AssertionError: The reso...
2024-03-21T17:29:22.6779590Z ERROR test_airlock.py::test_airlock_flow - AssertionError: The resource could...
2024-03-21T17:29:22.6780411Z ERROR test_workspace_services.py::test_create_guacamole_service_into_base_workspace
2024-03-21T17:29:22.6781203Z ===== 8 passed, 30 deselected, 9 warnings, 3 errors in 11281.04s (3:08:01) =====
2024-03-21T17:29:22.7280480Z make: *** [Makefile:346: test-e2e-custom] Error 1
2024-03-21T17:29:22.8714316Z ##[error]Process completed with exit code 2.
2024-03-21T17:29:22.8786310Z ##[group]Run actions/upload-artifact@v3
2024-03-21T17:29:22.8786769Z with:
2024-03-21T17:29:22.8787072Z name: E2E Test Results
2024-03-21T17:29:22.8787473Z path: ./e2e_tests/pytest_e2e_custom.xml
2024-03-21T17:29:22.8787914Z if-no-files-found: warn
2024-03-21T17:29:22.8788263Z env:
2024-03-21T17:29:22.8788561Z AZURE_ENVIRONMENT: AzureCloud
2024-03-21T17:29:22.8789092Z TRE_URL: https://***.uksouth.cloudapp.azure.com
2024-03-21T17:29:22.8789591Z ARM_ENVIRONMENT: public
2024-03-21T17:29:22.8790019Z ACR_DOMAIN_SUFFIX: .azurecr.io
2024-03-21T17:29:22.8790408Z ##[endgroup]
2024-03-21T17:29:22.9427152Z ##[warning]No files were found with the provided path: ./e2e_tests/pytest_e2e_custom.xml. No artifacts will be uploaded.
2024-03-21T17:29:22.9566303Z ##[warning]`pre` execution is not supported for local action from './.github/actions/devcontainer_run_command'
2024-03-21T17:29:22.9594530Z Post job cleanup.
2024-03-21T17:29:22.9631577Z Post job cleanup.
2024-03-21T17:29:23.0473328Z Clearing azure cli accounts from the local cache.
2024-03-21T17:29:23.0485275Z [command]/usr/bin/az account clear
2024-03-21T17:29:23.8427095Z Post job cleanup.
2024-03-21T17:29:23.9243952Z [command]/usr/bin/git version
2024-03-21T17:29:23.9294650Z git version 2.43.2
2024-03-21T17:29:23.9333996Z Temporarily overriding HOME='/home/runner/work/_temp/579d7b7d-38da-4149-a926-e8b7db42dbff' before making global git config changes
2024-03-21T17:29:23.9335934Z Adding repository directory to the temporary git global config as a safe directory
2024-03-21T17:29:23.9339944Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/AzureTRE/AzureTRE
2024-03-21T17:29:23.9387056Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
2024-03-21T17:29:23.9428242Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
2024-03-21T17:29:23.9695937Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
2024-03-21T17:29:23.9737495Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
2024-03-21T17:29:24.0188947Z Cleaning up orphan processes
2024-03-21T17:29:24.0629069Z Terminate orphan process: pid (3668) (python3)
Describe the bug The E2E tests failed on
test_airlock_review_vm_flow
with an error aboutThe App is missing role WorkspaceOwner
.It's not clear if this is a one-off Heisenbug, or if it's reproducible, so recording this first occurrence here to make sure we don't lose it. Either way, it's not very satisfactory.
Steps to reproduce
Azure TRE release version (e.g. v0.14.0 or main): main, as of 21st March 2024
Deployed Azure TRE components - click the (i) in the UI: everything deployed through CICD.