Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove azureWebJobsStorage validation on deploy #3647

Merged
merged 1 commit into from
Apr 14, 2023
Merged

Conversation

MicroFish91
Copy link
Contributor

@MicroFish91 MicroFish91 commented Apr 14, 2023

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 azureWebJobsStorage validation on deploy to be consistent with how we used to things and to fix the above issue.

@MicroFish91 MicroFish91 requested a review from a team as a code owner April 14, 2023 08:59
export async function validateStorageConnection(context: Omit<ISetConnectionSettingContext, 'projectPath'>, projectPath: string, options?: IConnectionPromptOptions): Promise<void> {
if (context.action === CodeAction.Deploy) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need even need this? validateStorageConnection never gets called in the deploy scenario anyway, right? I think it's only in pre-debugging.

Copy link
Contributor Author

@MicroFish91 MicroFish91 Apr 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@MicroFish91 MicroFish91 merged commit 3b57517 into main Apr 14, 2023
@MicroFish91 MicroFish91 deleted the mwf/homely-maroon branch April 14, 2023 20:26
@microsoft microsoft locked and limited conversation to collaborators May 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants