Skip to content

Avoid panic when an Azure store has no subscription ID - #206

Open
theboringhumane wants to merge 1 commit into
danielfoehrKn:masterfrom
hakopod:codex/179-validate-azure-subscription
Open

theboringhumane wants to merge 1 commit into
danielfoehrKn:masterfrom
hakopod:codex/179-validate-azure-subscription

Conversation

@theboringhumane

Copy link
Copy Markdown

An Azure store without config.subscriptionID reaches InitializeAzureStore with a nil pointer and panics. Validate missing, null, empty and whitespace-only IDs in NewAzureStore so initialization returns a configuration error before attempting authentication. The Azure documentation and type comment now state the existing requirement.

Related to #179. --store azure still appends a configless store alongside configured YAML stores; this patch does not change that flag's store-selection behavior.

Validation: the five invalid-configuration cases failed on the original constructor. All six regression cases and GOMAXPROCS=2 go test -p 2 ./... pass with this change. The tests make no Azure requests. git diff --check also passes. The full lint/license/race make check was not run.

This change was prepared with AI assistance and received a separate code review before submission.

This branch has not been deployed

No deployments
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.

1 participant