Skip to content

Commit

Permalink
fix incorrect uses of the resolved connection string where the connec…
Browse files Browse the repository at this point in the history
…tion name should be used. (#77)
  • Loading branch information
sebastianburckhardt authored Oct 11, 2021
1 parent 8b1d315 commit 4ae87f2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
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 @@ -135,7 +135,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 @@ -154,15 +154,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

0 comments on commit 4ae87f2

Please sign in to comment.