diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 9d49130458..8d4eefdebf 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -29,7 +29,7 @@ // Mount docker socket for docker builds "type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock", // Mounts the github cli login details from the host machine to the container (~/.config/gh/hosts.yml) - "type=bind,source=${env:HOME}${env:USERPROFILE}/.config,target=/home/vscode/.config", + "type=bind,source=${env:HOME}${env:USERPROFILE}/.config,target=/home/vscode/.config" ], "remoteUser": "vscode", "containerEnv": { @@ -277,6 +277,8 @@ "ms-python.pylance", "hashicorp.terraform", "github.vscode-pull-request-github", + "gitHub.copilot", + "github.copilot-chat", "getporter.porter-vscode", "davidanson.vscode-markdownlint", "editorconfig.editorconfig", @@ -291,5 +293,6 @@ 8000 ], // Run commands after the container is created. - "postCreateCommand": "./.devcontainer/scripts/post-create.sh" + "postCreateCommand": "./.devcontainer/scripts/post-create.sh", + "initializeCommand": "mkdir -p $HOME/.azure $HOME/.config || true" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 929f97efc4..1f5501078f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,6 +54,7 @@ BUG FIXES: * Fix VM actions where Workspace shared storage doesn't allow shared key access ([#4222](https://github.com/microsoft/AzureTRE/issues/4222)) * Fix public exposure in Guacamole service ([[#4199](https://github.com/microsoft/AzureTRE/issues/4199)]) * Fix Azure ML network tags to use name rather than ID ([[#4151](https://github.com/microsoft/AzureTRE/issues/4151)]) +* Fix dev container build failure on missing mount directories, add copilot extensions, and CI fixes ([#4290](https://github.com/microsoft/AzureTRE/pull/4290)) COMPONENTS: diff --git a/e2e_tests/config.py b/e2e_tests/config.py index cd43a78181..31ccb34c37 100644 --- a/e2e_tests/config.py +++ b/e2e_tests/config.py @@ -1,11 +1,9 @@ +import warnings from starlette.config import Config +warnings.filterwarnings("ignore", message="Config file '.env' not found.") -try: - config = Config('.env') -# Workaround needed until FastAPI uses Starlette >= 3.7.1 -except FileNotFoundError: - config = Config() +config = Config('.env') # Resource Info RESOURCE_LOCATION: str = config("RESOURCE_LOCATION", default="") diff --git a/e2e_tests/conftest.py b/e2e_tests/conftest.py index 7195a14588..39589e1696 100644 --- a/e2e_tests/conftest.py +++ b/e2e_tests/conftest.py @@ -12,23 +12,13 @@ LOGGER = logging.getLogger(__name__) -pytestmark = pytest.mark.asyncio +pytestmark = pytest.mark.asyncio(loop_scope="session") def pytest_addoption(parser): parser.addoption("--verify", action="store", default="true") -@pytest.fixture(scope="session") -def event_loop(): - try: - loop = asyncio.get_running_loop() - except RuntimeError: - loop = asyncio.new_event_loop() - yield loop - loop.close() - - @pytest.fixture(scope="session") def verify(pytestconfig): if pytestconfig.getoption("verify").lower() == "true": diff --git a/e2e_tests/pytest.ini b/e2e_tests/pytest.ini index 72fe2d3414..3e3cf490e3 100644 --- a/e2e_tests/pytest.ini +++ b/e2e_tests/pytest.ini @@ -10,6 +10,7 @@ markers = workspace_services asyncio_mode = auto +asyncio_default_fixture_loop_scope = session log_cli = 1 log_cli_level = INFO diff --git a/e2e_tests/test_airlock.py b/e2e_tests/test_airlock.py index 43e2df71bb..051a5c9d81 100644 --- a/e2e_tests/test_airlock.py +++ b/e2e_tests/test_airlock.py @@ -14,7 +14,7 @@ from helpers import get_admin_token -pytestmark = pytest.mark.asyncio +pytestmark = pytest.mark.asyncio(loop_scope="session") LOGGER = logging.getLogger(__name__) BLOB_FILE_PATH = "./test_airlock_sample.txt" BLOB_NAME = os.path.basename(BLOB_FILE_PATH) diff --git a/e2e_tests/test_performance.py b/e2e_tests/test_performance.py index 6c6d836d9d..f6e7637fe2 100644 --- a/e2e_tests/test_performance.py +++ b/e2e_tests/test_performance.py @@ -8,7 +8,7 @@ from helpers import get_admin_token -pytestmark = pytest.mark.asyncio +pytestmark = pytest.mark.asyncio(loop_scope="session") @pytest.mark.performance diff --git a/e2e_tests/test_provisioned_health_api.py b/e2e_tests/test_provisioned_health_api.py index 01c3cbeecc..92636d12dc 100644 --- a/e2e_tests/test_provisioned_health_api.py +++ b/e2e_tests/test_provisioned_health_api.py @@ -5,7 +5,7 @@ from resources import strings -pytestmark = pytest.mark.asyncio +pytestmark = pytest.mark.asyncio(loop_scope="session") @pytest.mark.smoke diff --git a/e2e_tests/test_ui.py b/e2e_tests/test_ui.py index 6e34da518b..8d71827fdb 100644 --- a/e2e_tests/test_ui.py +++ b/e2e_tests/test_ui.py @@ -4,7 +4,7 @@ import config -pytestmark = pytest.mark.asyncio +pytestmark = pytest.mark.asyncio(loop_scope="session") @pytest.mark.smoke diff --git a/e2e_tests/test_workspace_service_templates.py b/e2e_tests/test_workspace_service_templates.py index 34545d9af1..8ea70e6368 100644 --- a/e2e_tests/test_workspace_service_templates.py +++ b/e2e_tests/test_workspace_service_templates.py @@ -8,7 +8,7 @@ from resources import strings from helpers import get_admin_token -pytestmark = pytest.mark.asyncio +pytestmark = pytest.mark.asyncio(loop_scope="session") workspace_service_templates = [ (strings.AZUREML_SERVICE), diff --git a/e2e_tests/test_workspace_services.py b/e2e_tests/test_workspace_services.py index cd48910817..3013fef370 100644 --- a/e2e_tests/test_workspace_services.py +++ b/e2e_tests/test_workspace_services.py @@ -5,7 +5,7 @@ from resources.resource import get_resource, post_resource from resources import strings -pytestmark = pytest.mark.asyncio +pytestmark = pytest.mark.asyncio(loop_scope="session") workspace_services = [ strings.AZUREML_SERVICE, diff --git a/e2e_tests/test_workspace_templates.py b/e2e_tests/test_workspace_templates.py index d0ccb1f64e..1fed11daaa 100644 --- a/e2e_tests/test_workspace_templates.py +++ b/e2e_tests/test_workspace_templates.py @@ -11,7 +11,7 @@ from helpers import get_admin_token -pytestmark = pytest.mark.asyncio +pytestmark = pytest.mark.asyncio(loop_scope="session") workspace_templates = [ diff --git a/templates/workspaces/airlock-import-review/porter.yaml b/templates/workspaces/airlock-import-review/porter.yaml index 7e4330cd30..56f90dbc70 100644 --- a/templates/workspaces/airlock-import-review/porter.yaml +++ b/templates/workspaces/airlock-import-review/porter.yaml @@ -1,7 +1,7 @@ --- schemaVersion: 1.0.0 name: tre-workspace-airlock-import-review -version: 0.14.1 +version: 0.14.2 description: "A workspace to do Airlock Data Import Reviews for Azure TRE" dockerfile: Dockerfile.tmpl registry: azuretre diff --git a/templates/workspaces/airlock-import-review/template_schema.json b/templates/workspaces/airlock-import-review/template_schema.json index e05a0d87e7..180e360abc 100644 --- a/templates/workspaces/airlock-import-review/template_schema.json +++ b/templates/workspaces/airlock-import-review/template_schema.json @@ -16,6 +16,7 @@ "description": "The SKU that will be used when deploying an Azure App Service Plan.", "default": "P1v3", "enum": [ + "P0v3", "P1v3", "P1v2", "S1" diff --git a/templates/workspaces/base/porter.yaml b/templates/workspaces/base/porter.yaml index 89be17e3de..a7e09fa692 100644 --- a/templates/workspaces/base/porter.yaml +++ b/templates/workspaces/base/porter.yaml @@ -1,7 +1,7 @@ --- schemaVersion: 1.0.0 name: tre-workspace-base -version: 1.9.1 +version: 1.9.2 description: "A base Azure TRE workspace" dockerfile: Dockerfile.tmpl registry: azuretre diff --git a/templates/workspaces/base/template_schema.json b/templates/workspaces/base/template_schema.json index 77049d7f1c..b456b5f044 100644 --- a/templates/workspaces/base/template_schema.json +++ b/templates/workspaces/base/template_schema.json @@ -28,6 +28,7 @@ "description": "The SKU that will be used when deploying an Azure App Service Plan.", "default": "P1v3", "enum": [ + "P0v3", "P1v3", "P1v2", "S1" diff --git a/templates/workspaces/unrestricted/porter.yaml b/templates/workspaces/unrestricted/porter.yaml index 5d1cc8cfa1..b8bd2becae 100644 --- a/templates/workspaces/unrestricted/porter.yaml +++ b/templates/workspaces/unrestricted/porter.yaml @@ -1,7 +1,7 @@ --- schemaVersion: 1.0.0 name: tre-workspace-unrestricted -version: 0.13.1 +version: 0.13.2 description: "A base Azure TRE workspace" dockerfile: Dockerfile.tmpl registry: azuretre diff --git a/templates/workspaces/unrestricted/template_schema.json b/templates/workspaces/unrestricted/template_schema.json index 3fbaa16a3a..f9c8a807f1 100644 --- a/templates/workspaces/unrestricted/template_schema.json +++ b/templates/workspaces/unrestricted/template_schema.json @@ -28,6 +28,7 @@ "description": "The SKU that will be used when deploying an Azure App Service Plan.", "default": "P1v3", "enum": [ + "P0v3", "P1v3", "P1v2", "S1"