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

fix incorrect uses of the resolved connection string #77

Merged
merged 1 commit into from
Oct 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class NetheriteProvider : DurabilityProvider
public NetheriteProvider(
NetheriteOrchestrationService service,
NetheriteOrchestrationServiceSettings settings)
: base("Netherite", service, service, settings.ResolvedStorageConnectionString)
: base("Netherite", service, service, settings.StorageConnectionName)
{
this.Service = service;
this.Settings = settings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public DurabilityProvider GetDurabilityProvider()
var key = new DurableClientAttribute()
{
TaskHub = settings.HubName,
ConnectionName = settings.ResolvedStorageConnectionString,
ConnectionName = settings.StorageConnectionName,
};

this.defaultProvider = this.cachedProviders.GetOrAdd(key, _ =>
Expand All @@ -145,15 +145,15 @@ public DurabilityProvider GetDurabilityProvider(DurableClientAttribute attribute
var settings = this.GetNetheriteOrchestrationServiceSettings(attribute.TaskHub);

if (string.Equals(this.defaultProvider.Settings.HubName, settings.HubName, StringComparison.OrdinalIgnoreCase) &&
string.Equals(this.defaultProvider.Settings.ResolvedStorageConnectionString, settings.ResolvedStorageConnectionString, StringComparison.OrdinalIgnoreCase))
string.Equals(this.defaultProvider.Settings.StorageConnectionName, settings.StorageConnectionName, StringComparison.OrdinalIgnoreCase))
{
return this.defaultProvider;
}

DurableClientAttribute key = new DurableClientAttribute()
{
TaskHub = settings.HubName,
ConnectionName = settings.ResolvedStorageConnectionString,
ConnectionName = settings.StorageConnectionName,
};

return this.cachedProviders.GetOrAdd(key, _ =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ public NetheriteOrchestrationService(NetheriteOrchestrationServiceSettings setti
TransportConnectionString.Parse(this.Settings.ResolvedTransportConnectionString, out this.configuredStorage, out this.configuredTransport);
this.Logger = loggerFactory.CreateLogger(LoggerCategoryName);
this.LoggerFactory = loggerFactory;
this.StorageAccountName = this.configuredTransport == TransportConnectionString.TransportChoices.Memory
? this.Settings.ResolvedStorageConnectionString
this.StorageAccountName = this.configuredStorage == TransportConnectionString.StorageChoices.Memory
? "Memory"
: CloudStorageAccount.Parse(this.Settings.ResolvedStorageConnectionString).Credentials.AccountName;

EtwSource.Log.OrchestrationServiceCreated(this.ServiceInstanceId, this.StorageAccountName, this.Settings.HubName, this.Settings.WorkerId, TraceUtils.AppName, TraceUtils.ExtensionVersion);
Expand Down