Repository navigation
Recognize identity-based AzureWebJobsStorage settings - #408
Open
Gabriel Bider (silkfire) wants to merge 1 commit into
Open
Gabriel Bider (silkfire) wants to merge 1 commit into
Gabriel Bider (silkfire) wants to merge 1 commit into
Conversation
The host storage warning only checked AzureWebJobsStorage and AzureWebJobsStorage__accountName, so apps using the URI-based identity configuration (__blobServiceUri, __queueServiceUri, etc.) got a false positive warning. Treat any AzureWebJobsStorage__* setting as configured host storage, and let the run-from-package publisher use AzureWebJobsStorage__blobServiceUri for blob access, failing with a clear error instead of building an 'undefined' endpoint when no blob endpoint can be determined.
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #407.
Problem
The host storage check only looked for
AzureWebJobsStorageandAzureWebJobsStorage__accountName. Apps using the URI-based identity configuration (AzureWebJobsStorage__blobServiceUri,__queueServiceUri,__tableServiceUri, ...) got a false-positive warning:On Flex Consumption the settings are never read (deployment goes through Kudu
api/publish), so there the warning is purely cosmetic. On the run-from-package path, however, the publisher builthttps://undefined.blob.core.windows.netwhen only the URI-based settings were present.Changes
HostStoragehelper (src/utils/host_storage.ts):isConfigured()treatsAzureWebJobsStorageor any non-emptyAzureWebJobsStorage__*setting as configured host storage.getBlobServiceUri()prefersAzureWebJobsStorage__blobServiceUri, falling back to the endpoint derived fromAzureWebJobsStorage__accountName.resourceValidator.tsusesisConfigured()in both the RBAC (ARM) and SCM (Kudu) paths, and passesAzureWebJobsStorage__blobServiceUrithroughIAppSettings. The warning text now mentions the identity-based settings.websiteRunFromPackageDeploy.tsusesgetBlobServiceUri()and throws a clearAzureResourceErrorwhen no blob endpoint can be determined, instead of building anundefinedendpoint.tests/utils/host_storage.spec.ts.Testing
tsc --project tsconfig.prod.json --noEmitpasses.npm test: 96 passing, including the new helper tests.__blobServiceUri; there are no existing tests forresourceValidatoror the publisher.