Skip to content
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
1 change: 0 additions & 1 deletion azure-pipelines-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ steps:
AzureWebJobsServiceBus: $(AzureWebJobsServiceBus)
AzureWebJobsEventHubSender: $(AzureWebJobsEventHubSender)
FUNCTIONS_WORKER_RUNTIME : "powershell"
PSWorkerEnableExperimentalDurableFunctions: "true"
continueOnError: true
displayName: 'Running E2ETest'

Expand Down
1 change: 0 additions & 1 deletion azure-pipelines-2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ steps:
AzureWebJobsEventHubSender: $(AzureWebJobsEventHubSender)
FUNCTIONS_WORKER_RUNTIME : "powershell"
FunctionAppUrl: $(FunctionAppUrl)
PSWorkerEnableExperimentalDurableFunctions: "true"
continueOnError: true
displayName: 'Running E2ETest'

Expand Down
1 change: 0 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ steps:
AzureWebJobsServiceBus: $(AzureWebJobsServiceBus)
AzureWebJobsEventHubSender: $(AzureWebJobsEventHubSender)
FUNCTIONS_WORKER_RUNTIME : "powershell"
PSWorkerEnableExperimentalDurableFunctions: "true"
displayName: 'Running E2ETest'

- task: CopyFiles@2
Expand Down
4 changes: 1 addition & 3 deletions docs/durable-experimental-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ Set the following app settings (if running on Azure) or just use the sample loca
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"AzureWebJobsFeatureFlags": "AllowSynchronousIO",
"FUNCTIONS_WORKER_RUNTIME": "powershell",
"PSWorkerInProcConcurrencyUpperBound": 10,
"PSWorkerEnableExperimentalDurableFunctions": "true"
"PSWorkerInProcConcurrencyUpperBound": 10
}
}
```
Expand All @@ -68,7 +67,6 @@ Set the following app settings (if running on Azure) or just use the sample loca
- `AzureWebJobsFeatureFlags` must contain `AllowSynchronousIO`. Don't ask.
- `FUNCTIONS_WORKER_RUNTIME` must be set to `powershell`.
- You may need to adjust `PSWorkerInProcConcurrencyUpperBound` to increase [concurrency](https://docs.microsoft.com/azure/azure-functions/functions-reference-powershell#concurrency) for the Fan-out/Fan-in pattern.
- `PSWorkerEnableExperimentalDurableFunctions` is a feature flag that enables PowerShell Durable Functions. It is turned off by default for now.

## 5. Starting the app

Expand Down
3 changes: 1 addition & 2 deletions examples/durable/DurableApp/local.settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"AzureWebJobsFeatureFlags": "AllowSynchronousIO",
"FUNCTIONS_WORKER_RUNTIME": "powershell",
"PSWorkerInProcConcurrencyUpperBound": 10,
"PSWorkerEnableExperimentalDurableFunctions": "true"
"PSWorkerInProcConcurrencyUpperBound": 10
}
}
2 changes: 1 addition & 1 deletion src/Durable/DurableController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ private void ThrowIfDurableNotEnabled()
{
if (!_durableEnabled)
{
throw new NotImplementedException(PowerShellWorkerStrings.DurableFunctionNotSupported);
throw new NotImplementedException(PowerShellWorkerStrings.DurableFunctionsDisabled);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
#

function CheckIfDurableFunctionsEnabled {
if (-not [bool]$env:PSWorkerEnableExperimentalDurableFunctions) {
throw 'Durable function is not yet supported for PowerShell.'
if (($null -ne $env:PSWorkerEnableExperimentalDurableFunctions) -and
(-not [bool]::Parse($env:PSWorkerEnableExperimentalDurableFunctions))) {
throw 'PowerShell Durable Functions are disabled (check the PSWorkerEnableExperimentalDurableFunctions environment variable).'
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Utility/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ internal static object TransformOutBindingValueAsNeeded(string bindingName, Read

internal static bool AreDurableFunctionsEnabled()
{
return PowerShellWorkerConfiguration.GetBoolean("PSWorkerEnableExperimentalDurableFunctions") ?? false;
return PowerShellWorkerConfiguration.GetBoolean("PSWorkerEnableExperimentalDurableFunctions") ?? true;
}

internal static string GetPowerShellVersion(PowerShell pwsh)
Expand Down
4 changes: 2 additions & 2 deletions src/resources/PowerShellWorkerStrings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@
<data name="UnsupportedMessage" xml:space="preserve">
<value>Unsupported message type: {0}.</value>
</data>
<data name="DurableFunctionNotSupported" xml:space="preserve">
<value>Durable function is not yet supported for PowerShell.</value>
<data name="DurableFunctionsDisabled" xml:space="preserve">
<value>Durable PowerShell Functions are disabled (check the PSWorkerEnableExperimentalDurableFunctions environment variable).</value>
</data>
<data name="FailToConvertToHttpResponseContext" xml:space="preserve">
<value>The given value for the 'http' output binding '{0}' cannot be converted to the type 'HttpResponseContext'. The conversion failed with the following error: {1}</value>
Expand Down
3 changes: 1 addition & 2 deletions test/E2E/TestFunctionApp/local.settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"AzureWebJobsEventHubSender":"",
"AzureWebJobsCosmosDBConnectionString":"",
"AzureWebJobsFeatureFlags": "AllowSynchronousIO",
"FUNCTIONS_WORKER_RUNTIME": "powershell",
"PSWorkerEnableExperimentalDurableFunctions": "true"
"FUNCTIONS_WORKER_RUNTIME": "powershell"
}
}