Skip to content

Support starting the Azure emulator#262

Draft
carole-lavillonniere wants to merge 2 commits into
mainfrom
az-support
Draft

Support starting the Azure emulator#262
carole-lavillonniere wants to merge 2 commits into
mainfrom
az-support

Conversation

@carole-lavillonniere
Copy link
Copy Markdown
Collaborator

@carole-lavillonniere carole-lavillonniere commented May 27, 2026

Motivation

Minimal implementation so that LocalStack Azure emulator (localstack/localstack-azure-alpha) can be launched.

Changes

  • Register the Azure emulator in internal/config: knownImages (localstack/localstack-azure-alpha), emulatorHealthPaths, and ContainerPort — so Image()/ProductName()/HealthPath()/ContainerPort() resolve for Azure.
  • Add Azure to SelectableEmulatorTypes so it appears in the first-run emulator picker. Replaced the first-character SelectionKey() with an explicit unique-key map (a/s/z) — aws and azure both start with "a", so without this, selecting Azure resolved to AWS.
  • Skip lstk's pre-flight platform license check for Azure, mirroring Snowflake. Introduced EmulatorType.SelfValidatesLicense() (Snowflake + Azure) and used it in start.go (pre-pull and post-pull validation) and label.go. The Azure-alpha container activates its own license against the licensing server; lstk's platform GetLicense has no catalog entry for it and would otherwise abort the start.

Tests

  • Unit: Azure resolves through the start-path helpers, EmulatorTypeForImage for the Azure image, and SelfValidatesLicense truth table. Updated existing FindRunningByImage expectations to include the new repo.
  • Integration: TestStartCommandSucceedsForAzure (mirrors the Snowflake start test) launches the Azure emulator and checks the container is running on the localstack-azure-alpha image and serves /_localstack/health. TestFirstRunCanSelectAzureEmulator (PTY, no Docker) confirms Azure is selectable and writes type = "azure".
  1. Select
select
  1. Started
az-started
  1. Status
az-status
  1. Stop
az-stop

TODO before merging

  • Change the image name to localstack-azure, see SMF-642

Towards FLC-679

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant