Skip to content

#355 Fix missing AZURE_UAMI_RESOURCE_ID in ACI containers and quota leak#356

Merged
jathavaan merged 1 commit into
mainfrom
bugfix/355-aci-containers-crash-on-startup-missing-azure_uami_resource_id-env-var-failed-containers-leak-quota
May 26, 2026
Merged

#355 Fix missing AZURE_UAMI_RESOURCE_ID in ACI containers and quota leak#356
jathavaan merged 1 commit into
mainfrom
bugfix/355-aci-containers-crash-on-startup-missing-azure_uami_resource_id-env-var-failed-containers-leak-quota

Conversation

@jathavaan
Copy link
Copy Markdown
Collaborator

This pull request introduces improvements to container lifecycle management and environment variable configuration in the main.py file. The main changes ensure that container resources are cleaned up reliably and that all necessary environment variables are set when creating container instances.

Container lifecycle management:

  • The _run_container_benchmark function now uses a try...finally block to guarantee that _delete_container_instance is always called, ensuring container resources are cleaned up even if _check_container_state fails.

Environment variable configuration:

  • The _create_container_instance function now includes the AZURE_UAMI_RESOURCE_ID in the environment variables passed to the container, ensuring the container has access to this required configuration.

Forward AZURE_UAMI_RESOURCE_ID to container environment variables so
Config initialization no longer crashes on startup. Wrap container
state polling in try/finally so failed containers are always cleaned
up, preventing ACI core quota exhaustion across batches.
@jathavaan jathavaan self-assigned this May 26, 2026
Copilot AI review requested due to automatic review settings May 26, 2026 13:29
@jathavaan jathavaan merged commit c1473fb into main May 26, 2026
2 of 3 checks passed
@jathavaan jathavaan deleted the bugfix/355-aci-containers-crash-on-startup-missing-azure_uami_resource_id-env-var-failed-containers-leak-quota branch May 26, 2026 13:30
@jathavaan jathavaan review requested due to automatic review settings May 26, 2026 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ACI containers crash on startup: missing AZURE_UAMI_RESOURCE_ID env var + failed containers leak quota

1 participant