Skip to content

Commit 9a2724e

Browse files
committed
separate DF SDK classes from DF worker classes
fix typo DurableSDK now compiles by itself Allow ExternalSDK to handle orchestration document next steps allow external SDK to set the user-code's input. Still need to refactor this logic for the worker to continue working with old SDK add import module supress traces avoid nullptr pass tests fix E2E tests develop E2E tests Enabled external durable client (#765) Co-authored-by: Michael Peng <[email protected]> bindings work conditional binding intialization conditional import Added exception handling logic Revert durableController name to durableFunctionsUtils Ensure unit tests are functioning properly Corrected unit test names Turned repeated variables in unit tests into static members Fixed issue with building the worker Fix E2E test Fixed unit test setup Fixed another unit test setup Remove string representation of booleans patch e2e test remove typo in toString Update PowerShell language worker pipelines (#750) * Install .Net to a global location * Remove .Net installation tasks * Update install .Net 6 task * Update Windows image to use windows-latest Make throughput warning message visible for tooling diagnosis (#757) Update grpc.tools to version 2.43.0 Update Google.Protobuf.Tools to version 3.19.4 Revert "Update Google.Protobuf.Tools to version 3.19.4" This reverts commit bcbd022. Revert "Update grpc.tools to version 2.43.0" This reverts commit ccb323a. Update Google.Protobuf to 3.19.4 and grpc.tools to 2.43.0 (#762) * Update grpc.tools to version 2.43.0 * Update Google.Protobuf.Tools to version 3.19.4 Switch from Grpc.Core to Grpc.Net.Client (#758) * Upgraded protobuf versions and removed Grpc.Core dependency * Updated channel and option types used * Change channel credentials * Added http prefix to url * Add valid URL check and explicitly include credentials Update pipeline logic to generate the SBOM for release builds (#767) separate DF SDK classes from DF worker classes fix typo DurableSDK now compiles by itself Allow ExternalSDK to handle orchestration document next steps allow external SDK to set the user-code's input. Still need to refactor this logic for the worker to continue working with old SDK add import module supress traces avoid nullptr pass tests fix E2E tests develop E2E tests Enabled external durable client (#765) Co-authored-by: Michael Peng <[email protected]> bindings work conditional binding intialization conditional import Added exception handling logic Revert durableController name to durableFunctionsUtils Ensure unit tests are functioning properly Corrected unit test names Turned repeated variables in unit tests into static members Fixed issue with building the worker Fix E2E test Fixed unit test setup Fixed another unit test setup Remove string representation of booleans patch e2e test remove typo in toString Update PowerShell language worker pipelines (#750) * Install .Net to a global location * Remove .Net installation tasks * Update install .Net 6 task * Update Windows image to use windows-latest Make throughput warning message visible for tooling diagnosis (#757) Update grpc.tools to version 2.43.0 Update Google.Protobuf.Tools to version 3.19.4 Revert "Update Google.Protobuf.Tools to version 3.19.4" This reverts commit bcbd022. Revert "Update grpc.tools to version 2.43.0" This reverts commit ccb323a. Update Google.Protobuf to 3.19.4 and grpc.tools to 2.43.0 (#762) * Update grpc.tools to version 2.43.0 * Update Google.Protobuf.Tools to version 3.19.4 Switch from Grpc.Core to Grpc.Net.Client (#758) * Upgraded protobuf versions and removed Grpc.Core dependency * Updated channel and option types used * Change channel credentials * Added http prefix to url * Add valid URL check and explicitly include credentials Update pipeline logic to generate the SBOM for release builds (#767) Return results from Start-DurableExternalEventListener (#685) (#753) Co-authored-by: Greg Roll <[email protected]> add e2e test for GetTaskResult parametrize test patch new e2e test patch external contrib fix typo in test comment changes Adds IExternalInvoker (#776) * Define a contract for the external invoker * Remove extraneous comments and variables rename hasOrchestrationContext to hasInitializedDurableFunction remove outdated TODO comment remove now unused function - CreateOrchestrationBindingInfo Allow worker to read results directly from the external SDK (#777) comment out external SDK path
1 parent 67c81cc commit 9a2724e

File tree

73 files changed

+909
-437
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+909
-437
lines changed

azure-pipelines-e2e-integration-tests.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,16 @@ strategy:
1111
linux:
1212
imageName: 'ubuntu-latest'
1313
windows:
14-
imageName: 'vs2017-win2016'
14+
imageName: 'windows-latest'
1515

1616
pool:
1717
vmImage: $(imageName)
1818

1919
steps:
2020
- pwsh: |
21-
Invoke-WebRequest 'https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.ps1' -OutFile 'dotnet-install.ps1'
22-
./dotnet-install.ps1 -InstallDir "$env:ProgramFiles/dotnet" -Version "6.0.100" -Channel 'release'
23-
displayName: 'Install the .Net version used by the Core Tools for Windows'
24-
condition: eq( variables['Agent.OS'], 'Windows_NT' )
25-
26-
- bash: |
27-
curl -sSL https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.sh | bash /dev/stdin -v '6.0.100' -c 'release' --install-dir /usr/share/dotnet
28-
displayName: 'Install the .Net version used by the Core Tools for Linux'
29-
condition: eq( variables['Agent.OS'], 'Linux' )
21+
Import-Module "./tools/helper.psm1" -Force
22+
Install-Dotnet
23+
displayName: 'Install .NET 6.0'
3024

3125
- pwsh: ./test/E2E/Start-E2ETest.ps1 -UseCoreToolsBuildFromIntegrationTests
3226
env:

azure-pipelines.yml

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -43,32 +43,14 @@ steps:
4343

4444
- pwsh: |
4545
$ErrorActionPreference = "Stop"
46-
if ($isReleaseBuild)
47-
{
48-
./build.ps1 -Clean -Configuration Release -BuildNumber "$(buildNumber)" -AddSBOM -SBOMUtilSASUrl $env:SBOMUtilSASUrl
49-
}
50-
else
51-
{
52-
./build.ps1 -Clean -Configuration Release -BuildNumber "$(buildNumber)"
53-
}
46+
$shouldAddSBOM = [bool]"$(IsReleaseBuild)"
47+
48+
./build.ps1 -Clean -Configuration Release -BuildNumber "$(buildNumber)" -AddSBOM:$shouldAddSBOM -SBOMUtilSASUrl "$(SBOMUtilSASUrl)"
5449
displayName: 'Build worker code'
55-
env:
56-
SBOMUtilSASUrl: $(SBOMUtilSASUrl)
5750

5851
- pwsh: ./build.ps1 -NoBuild -Test
5952
displayName: 'Running UnitTest'
6053

61-
- pwsh: |
62-
Invoke-WebRequest 'https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.ps1' -OutFile 'dotnet-install.ps1'
63-
./dotnet-install.ps1 -InstallDir "$env:ProgramFiles/dotnet" -Version "6.0.100" -Channel 'release'
64-
displayName: 'Install the .Net version used by the Core Tools for Windows'
65-
condition: eq( variables['Agent.OS'], 'Windows_NT' )
66-
67-
- bash: |
68-
curl -sSL https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.sh | bash /dev/stdin -v '6.0.100' -c 'release' --install-dir /usr/share/dotnet
69-
displayName: 'Install the .Net version used by the Core Tools for Linux'
70-
condition: eq( variables['Agent.OS'], 'Linux' )
71-
7254
- pwsh: ./test/E2E/Start-E2ETest.ps1
7355
env:
7456
AzureWebJobsStorage: $(AzureWebJobsStorage)

src/Durable/OrchestrationInvoker.cs

Lines changed: 0 additions & 78 deletions
This file was deleted.

src/Durable/PowerShellServices.cs

Lines changed: 0 additions & 74 deletions
This file was deleted.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
//
2+
// Copyright (c) Microsoft. All rights reserved.
3+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
4+
//
5+
6+
#pragma warning disable 1591 // Missing XML comment for publicly visible type or member 'member'
7+
8+
namespace Microsoft.Azure.Functions.PowerShellWorker.Durable.Commands
9+
{
10+
using System.Collections;
11+
using System.Management.Automation;
12+
using Microsoft.Azure.Functions.PowerShellWorker.Durable.Tasks;
13+
14+
[Cmdlet("Get", "DurableTaskResult")]
15+
public class GetDurableTaskResultCommand : PSCmdlet
16+
{
17+
[Parameter(Mandatory = true)]
18+
[ValidateNotNull]
19+
public DurableTask[] Task { get; set; }
20+
21+
private readonly DurableTaskHandler _durableTaskHandler = new DurableTaskHandler();
22+
23+
protected override void EndProcessing()
24+
{
25+
var privateData = (Hashtable)MyInvocation.MyCommand.Module.PrivateData;
26+
var context = (OrchestrationContext)privateData[SetFunctionInvocationContextCommand.ContextKey];
27+
28+
_durableTaskHandler.GetTaskResult(Task, context, WriteObject);
29+
}
30+
31+
protected override void StopProcessing()
32+
{
33+
_durableTaskHandler.Stop();
34+
}
35+
}
36+
}

src/Durable/Commands/InvokeDurableActivityCommand.cs renamed to src/DurableSDK/Commands/InvokeDurableActivityCommand.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,8 @@ protected override void EndProcessing()
4343
{
4444
var privateData = (Hashtable)MyInvocation.MyCommand.Module.PrivateData;
4545
var context = (OrchestrationContext)privateData[SetFunctionInvocationContextCommand.ContextKey];
46-
var loadedFunctions = FunctionLoader.GetLoadedFunctions();
4746

4847
var task = new ActivityInvocationTask(FunctionName, Input, RetryOptions);
49-
ActivityInvocationTask.ValidateTask(task, loadedFunctions);
5048

5149
_durableTaskHandler.StopAndInitiateDurableTaskOrReplay(
5250
task, context, NoWait.IsPresent,

src/Durable/Commands/SetFunctionInvocationContextCommand.cs renamed to src/DurableSDK/Commands/SetFunctionInvocationContextCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ namespace Microsoft.Azure.Functions.PowerShellWorker.Durable.Commands
99
{
1010
using System.Collections;
1111
using System.Management.Automation;
12+
using Microsoft.PowerShell.Commands;
1213

1314
/// <summary>
1415
/// Set the orchestration context.

0 commit comments

Comments
 (0)