Skip to content

Commit

Permalink
separate DF SDK classes from DF worker classes
Browse files Browse the repository at this point in the history
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 <michaelpeng@microsoft.com>

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 <michaelpeng@microsoft.com>

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 <Greg.Roll@oobe.com.au>

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
  • Loading branch information
davidmrdavid authored and David Justo committed Apr 7, 2022
1 parent 67c81cc commit 9a2724e
Show file tree
Hide file tree
Showing 73 changed files with 909 additions and 437 deletions.
14 changes: 4 additions & 10 deletions azure-pipelines-e2e-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,16 @@ strategy:
linux:
imageName: 'ubuntu-latest'
windows:
imageName: 'vs2017-win2016'
imageName: 'windows-latest'

pool:
vmImage: $(imageName)

steps:
- pwsh: |
Invoke-WebRequest 'https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.ps1' -OutFile 'dotnet-install.ps1'
./dotnet-install.ps1 -InstallDir "$env:ProgramFiles/dotnet" -Version "6.0.100" -Channel 'release'
displayName: 'Install the .Net version used by the Core Tools for Windows'
condition: eq( variables['Agent.OS'], 'Windows_NT' )

- bash: |
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
displayName: 'Install the .Net version used by the Core Tools for Linux'
condition: eq( variables['Agent.OS'], 'Linux' )
Import-Module "./tools/helper.psm1" -Force
Install-Dotnet
displayName: 'Install .NET 6.0'

- pwsh: ./test/E2E/Start-E2ETest.ps1 -UseCoreToolsBuildFromIntegrationTests
env:
Expand Down
24 changes: 3 additions & 21 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,32 +43,14 @@ steps:

- pwsh: |
$ErrorActionPreference = "Stop"
if ($isReleaseBuild)
{
./build.ps1 -Clean -Configuration Release -BuildNumber "$(buildNumber)" -AddSBOM -SBOMUtilSASUrl $env:SBOMUtilSASUrl
}
else
{
./build.ps1 -Clean -Configuration Release -BuildNumber "$(buildNumber)"
}
$shouldAddSBOM = [bool]"$(IsReleaseBuild)"
./build.ps1 -Clean -Configuration Release -BuildNumber "$(buildNumber)" -AddSBOM:$shouldAddSBOM -SBOMUtilSASUrl "$(SBOMUtilSASUrl)"
displayName: 'Build worker code'
env:
SBOMUtilSASUrl: $(SBOMUtilSASUrl)

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

- pwsh: |
Invoke-WebRequest 'https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.ps1' -OutFile 'dotnet-install.ps1'
./dotnet-install.ps1 -InstallDir "$env:ProgramFiles/dotnet" -Version "6.0.100" -Channel 'release'
displayName: 'Install the .Net version used by the Core Tools for Windows'
condition: eq( variables['Agent.OS'], 'Windows_NT' )

- bash: |
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
displayName: 'Install the .Net version used by the Core Tools for Linux'
condition: eq( variables['Agent.OS'], 'Linux' )

- pwsh: ./test/E2E/Start-E2ETest.ps1
env:
AzureWebJobsStorage: $(AzureWebJobsStorage)
Expand Down
78 changes: 0 additions & 78 deletions src/Durable/OrchestrationInvoker.cs

This file was deleted.

74 changes: 0 additions & 74 deletions src/Durable/PowerShellServices.cs

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
36 changes: 36 additions & 0 deletions src/DurableSDK/Commands/GetDurableTaskResult.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//

#pragma warning disable 1591 // Missing XML comment for publicly visible type or member 'member'

namespace Microsoft.Azure.Functions.PowerShellWorker.Durable.Commands
{
using System.Collections;
using System.Management.Automation;
using Microsoft.Azure.Functions.PowerShellWorker.Durable.Tasks;

[Cmdlet("Get", "DurableTaskResult")]
public class GetDurableTaskResultCommand : PSCmdlet
{
[Parameter(Mandatory = true)]
[ValidateNotNull]
public DurableTask[] Task { get; set; }

private readonly DurableTaskHandler _durableTaskHandler = new DurableTaskHandler();

protected override void EndProcessing()
{
var privateData = (Hashtable)MyInvocation.MyCommand.Module.PrivateData;
var context = (OrchestrationContext)privateData[SetFunctionInvocationContextCommand.ContextKey];

_durableTaskHandler.GetTaskResult(Task, context, WriteObject);
}

protected override void StopProcessing()
{
_durableTaskHandler.Stop();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,8 @@ protected override void EndProcessing()
{
var privateData = (Hashtable)MyInvocation.MyCommand.Module.PrivateData;
var context = (OrchestrationContext)privateData[SetFunctionInvocationContextCommand.ContextKey];
var loadedFunctions = FunctionLoader.GetLoadedFunctions();

var task = new ActivityInvocationTask(FunctionName, Input, RetryOptions);
ActivityInvocationTask.ValidateTask(task, loadedFunctions);

_durableTaskHandler.StopAndInitiateDurableTaskOrReplay(
task, context, NoWait.IsPresent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace Microsoft.Azure.Functions.PowerShellWorker.Durable.Commands
{
using System.Collections;
using System.Management.Automation;
using Microsoft.PowerShell.Commands;

/// <summary>
/// Set the orchestration context.
Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 9a2724e

Please sign in to comment.