-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
David Justo
committed
Apr 7, 2022
1 parent
3642ec0
commit d7450f7
Showing
22 changed files
with
315 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// | ||
// Copyright (c) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
// | ||
|
||
namespace Microsoft.Azure.Functions.PowerShellWorker.Durable | ||
{ | ||
using System; | ||
using System.Collections; | ||
using System.Management.Automation; | ||
|
||
internal class ExternalInvoker : IExternalInvoker | ||
{ | ||
private readonly Func<PowerShell, object> _externalSDKInvokerFunction; | ||
|
||
public ExternalInvoker(Func<PowerShell, object> invokerFunction) | ||
{ | ||
_externalSDKInvokerFunction = invokerFunction; | ||
} | ||
|
||
public Hashtable Invoke(IPowerShellServices powerShellServices) | ||
{ | ||
return (Hashtable)_externalSDKInvokerFunction.Invoke(powerShellServices.GetPowerShell()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// Copyright (c) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
// | ||
|
||
namespace Microsoft.Azure.Functions.PowerShellWorker.Durable | ||
{ | ||
using System.Collections; | ||
|
||
// Represents a contract for the | ||
internal interface IExternalInvoker | ||
{ | ||
// Method to invoke an orchestration using the external Durable SDK | ||
Hashtable Invoke(IPowerShellServices powerShellServices); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.