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

Add Get-TaskResult CmdLet for DF #786

Merged
merged 8 commits into from
Apr 18, 2022

Conversation

davidmrdavid
Copy link
Contributor

@davidmrdavid davidmrdavid commented Apr 5, 2022

Issue describing the changes in this PR

Related to #685 and #753

Currently, users do not have a way of obtaining the result of a DF Task that has already completed. This means that if a user did not assign a Task onto a variable when first invoking it, then they have no way of accessing its result.

This is an urgently missing feature and user oobegreg is proposing a CmdLet named Get-DurableTaskResult that allows us to do just that.

In general, this serves the purpose of performing an await (or yield in Python and JS) on a completed Durable Task, because in those languages re-awaiting a completed Task is a supported means of extracting that Task's result. Another way to do this is to expose a .result property on the DurableTask class and have users access that. However, I think this CmdLet-based approach is also sound, and I don't see why we couldn't have both given that users in other PLs can both access their classes' .result property and call yield/await for the same effect.

Pull request checklist

Additional information

This needs a documentation update (to announce the new CmdLet) and also needs to be backported to all DF-supported branches.

Where should this documentation issue requested by the PR checklist be created? In the azure docs repo? I suppose that we can create it in this repo as well, just checking for this group goes about it :-)

@davidmrdavid davidmrdavid changed the title [WIP] Add Get-TaskResult CmdLet for DF Add Get-TaskResult CmdLet for DF Apr 7, 2022
@davidmrdavid davidmrdavid requested review from AnatoliB, michaelpeng36 and Francisco-Gamino and removed request for AnatoliB April 7, 2022 23:13
@davidmrdavid davidmrdavid marked this pull request as ready for review April 7, 2022 23:13
@AnatoliB
Copy link
Contributor

@davidmrdavid Please add a work item to document the new cmdlet.

@@ -235,6 +235,8 @@ function New-DurableOrchestrationCheckStatusResponse {
The TaskHubName of the orchestration instance that will handle the external event.
.PARAMETER ConnectionName
The name of the connection string associated with TaskHubName
.PARAMETER AppCode
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes do not seem to be related to the declared PR goal. I will not be insisting on necessarily separating them, but I want us to be mindful of this.

Copy link
Contributor Author

@davidmrdavid davidmrdavid Apr 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, I forgot about this addition. At the very least, I should have called this out. I'll keep an eye out in the future

@davidmrdavid
Copy link
Contributor Author

Added documentation issue here: #797

@davidmrdavid davidmrdavid merged commit 483ab47 into dev Apr 18, 2022
@davidmrdavid davidmrdavid deleted the dajusto/external-contrib-get-taskResult branch April 18, 2022 21:00
davidmrdavid added a commit that referenced this pull request Apr 18, 2022
davidmrdavid added a commit that referenced this pull request Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants