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

Make enviroment variable tracking external SDK into a constant #908

Merged
merged 1 commit into from
Jan 10, 2023
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
4 changes: 2 additions & 2 deletions src/DurableWorker/DurableController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ internal class DurableController
private readonly ILogger _logger;

private bool isExternalDFSdkEnabled { get; } =
PowerShellWorkerConfiguration.GetBoolean("ExternalDurablePowerShellSDK") ?? false;
PowerShellWorkerConfiguration.GetBoolean(Utils.ExternalDurableSdkEnvVariable) ?? false;

public DurableController(
DurableFunctionInfo durableDurableFunctionInfo,
Expand Down Expand Up @@ -81,7 +81,7 @@ private void tryEnablingExternalSDK()
else if (isExternalSdkLoaded)
{
// External SDK is in the session, but customer did not explicitly enable it. Report the potential of runtime errors.
_logger.Log(isUserOnlyLog: false, LogLevel.Error, String.Format(PowerShellWorkerStrings.PotentialDurableSDKClash, Utils.ExternalDurableSdkName));
_logger.Log(isUserOnlyLog: false, LogLevel.Error, String.Format(PowerShellWorkerStrings.PotentialDurableSDKClash, Utils.ExternalDurableSdkName, Utils.ExternalDurableSdkEnvVariable));
}
}

Expand Down
1 change: 1 addition & 0 deletions src/Utility/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ internal class Utils
internal const string ExternalDurableSdkName = "AzureFunctions.PowerShell.Durable.SDK";
internal const string IsOrchestrationFailureKey = "IsOrchestrationFailure";
internal const string TracePipelineObjectCmdlet = "Microsoft.Azure.Functions.PowerShellWorker\\Trace-PipelineObject";
internal const string ExternalDurableSdkEnvVariable = "ExternalDurablePowerShellSDK";

internal readonly static object BoxedTrue = (object)true;
internal readonly static object BoxedFalse = (object)false;
Expand Down