Remove Unncessary Double connection string resolve #3447
Open
nytian wants to merge 5 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to eliminate redundant connection-name resolution in the Functions scale extension path by removing the extra app-setting resolution step performed on SyncTriggers metadata, relying instead on the existing IConfiguration-based resolution in the scalability provider factories.
Changes:
- Removed the
DurableTaskMetadata.ResolveAppSettingOptions(...)helper and its invocation fromDurableTaskTriggersScaleProvider. - Left connection name extraction to
TriggerMetadataExtensions.ResolveConnectionName(...)and factory-side configuration/environment resolution. - Updated the FunctionsScale
.csprojto set a non-emptyVersionSuffixvalue.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/Microsoft.Azure.WebJobs.Extensions.DurableTask.FunctionsScale/Microsoft.Azure.WebJobs.Extensions.DurableTask.FunctionsScale.csproj | Changes package versioning via VersionSuffix. |
| src/Microsoft.Azure.WebJobs.Extensions.DurableTask.FunctionsScale/DurableTaskTriggersScaleProvider.cs | Removes the metadata app-setting resolution call in the SyncTriggers path. |
| src/Microsoft.Azure.WebJobs.Extensions.DurableTask.FunctionsScale/DurableTaskMetadata.cs | Deletes the ResolveAppSettingOptions API previously used to resolve storage provider settings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <MinorVersion>0</MinorVersion> | ||
| <PatchVersion>0</PatchVersion> | ||
| <VersionSuffix></VersionSuffix> | ||
| <VersionSuffix>test1</VersionSuffix> |
Comment on lines
46
to
50
| /// <summary> | ||
| /// Gets or sets the storage provider configuration dictionary, typically containing connection and provider-specific options. | ||
| /// </summary> | ||
| [JsonPropertyName("storageProvider")] | ||
| public IDictionary<string, object>? StorageProvider { get; set; } |
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.
The connection name from the Scale Controller's TriggerMetadata was being resolved twice: once in DurableTaskTriggersScaleProvider via INameResolver, and again in each scalability provider factory via IConfiguration / environment variables.
This PR removes
DurableTaskMetadata.ResolveAppSettingOptionsand its caller inDurableTaskTriggersScaleProvideras it's just a wrapper over the sameIConfigurationalready injected into the factory.