Skip to content

Commit

Permalink
Fix dev container build failure on mount config and CI fixes (#4290)
Browse files Browse the repository at this point in the history
  • Loading branch information
marrobi authored Feb 5, 2025
1 parent 7c88fe4 commit d61965d
Show file tree
Hide file tree
Showing 18 changed files with 24 additions and 28 deletions.
7 changes: 5 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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",
Expand All @@ -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"
}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
8 changes: 3 additions & 5 deletions e2e_tests/config.py
Original file line number Diff line number Diff line change
@@ -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="")
Expand Down
12 changes: 1 addition & 11 deletions e2e_tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down
1 change: 1 addition & 0 deletions e2e_tests/pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ markers =
workspace_services

asyncio_mode = auto
asyncio_default_fixture_loop_scope = session

log_cli = 1
log_cli_level = INFO
Expand Down
2 changes: 1 addition & 1 deletion e2e_tests/test_airlock.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion e2e_tests/test_performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from helpers import get_admin_token

pytestmark = pytest.mark.asyncio
pytestmark = pytest.mark.asyncio(loop_scope="session")


@pytest.mark.performance
Expand Down
2 changes: 1 addition & 1 deletion e2e_tests/test_provisioned_health_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from resources import strings


pytestmark = pytest.mark.asyncio
pytestmark = pytest.mark.asyncio(loop_scope="session")


@pytest.mark.smoke
Expand Down
2 changes: 1 addition & 1 deletion e2e_tests/test_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import config


pytestmark = pytest.mark.asyncio
pytestmark = pytest.mark.asyncio(loop_scope="session")


@pytest.mark.smoke
Expand Down
2 changes: 1 addition & 1 deletion e2e_tests/test_workspace_service_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion e2e_tests/test_workspace_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion e2e_tests/test_workspace_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from helpers import get_admin_token


pytestmark = pytest.mark.asyncio
pytestmark = pytest.mark.asyncio(loop_scope="session")


workspace_templates = [
Expand Down
2 changes: 1 addition & 1 deletion templates/workspaces/airlock-import-review/porter.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion templates/workspaces/base/porter.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions templates/workspaces/base/template_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion templates/workspaces/unrestricted/porter.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions templates/workspaces/unrestricted/template_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit d61965d

Please sign in to comment.