Remove azureWebJobsStorage validation on deploy#3647
Merged
MicroFish91 merged 1 commit intomainfrom Apr 14, 2023
Merged
Conversation
nturinski
reviewed
Apr 14, 2023
|
|
||
| // Supports validation on both 'debug' and 'deploy' | ||
| export async function validateStorageConnection(context: Omit<ISetConnectionSettingContext, 'projectPath'>, projectPath: string, options?: IConnectionPromptOptions): Promise<void> { | ||
| if (context.action === CodeAction.Deploy) { |
Member
There was a problem hiding this comment.
Do we need even need this? validateStorageConnection never gets called in the deploy scenario anyway, right? I think it's only in pre-debugging.
Contributor
Author
There was a problem hiding this comment.
Correct, I wanted to add a guard in there so that it's extremely explicit, especially since the rest of the connection string validations use an update pattern that can happen in both debug or deploy
nturinski
approved these changes
Apr 14, 2023
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 #3638
As part of the Durable work, I introduced a remote resource/connection string validation pattern on deploy because these were required for netherite and sql backends. I went ahead and applied this pattern to storage to maintain consistency across the connection strings.
AFAICT, this was not being done before, and in adding this, I introduced an unintended consequence - see: #3638 (comment)
Basically, I was not aware of and did not take this into account: https://learn.microsoft.com/en-us/azure/azure-functions/functions-identity-based-connections-tutorial#edit-the-azurewebjobsstorage-configuration
Since we already connect storage accounts during Function App creation, it's probably not super necessary to do this validation anyway. I am removing
azureWebJobsStoragevalidation on deploy to be consistent with how we used to things and to fix the above issue.