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

Workflow authoring support #563

Merged
merged 18 commits into from
Jan 22, 2024
Merged

Conversation

kaibocai
Copy link
Contributor

@kaibocai kaibocai commented Dec 21, 2023

Description

This PR initiates the support for dapr workflow.

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #463 and #545

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation
  1. durabletask-js haven't been released under Microsoft namespace, I am working on it and keep tracking it.
  2. I still need to add test suits (unit, e2e) for this PR, @shubham1172, @DeepanshuA please let me know if you can help with it.
  3. I definitely need a review and suggestions from you @DeepanshuA and @shubham1172 on this PR as it's my first few JS PR, still learning it.

cc @cgillum, @rabollin, @torosent

more updates

update durabletask-js version

init workflow support

Signed-off-by: kaibocai <kaibocai@microsoft.com>
Signed-off-by: kaibocai <kaibocai@microsoft.com>
Signed-off-by: kaibocai <kaibocai@microsoft.com>
@kaibocai kaibocai marked this pull request as ready for review January 2, 2024 18:41
@kaibocai kaibocai requested review from a team as code owners January 2, 2024 18:41
Copy link
Member

@shubham1172 shubham1172 left a comment

Choose a reason for hiding this comment

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

First pass, please also fix the linting issues.

package-lock.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Show resolved Hide resolved
test/e2e/workflow/workflow.test.ts Outdated Show resolved Hide resolved
src/workflow/examples/activity-sequence.ts Outdated Show resolved Hide resolved
src/workflow/examples/activity-sequence.ts Outdated Show resolved Hide resolved
src/workflow/examples/activity-sequence.ts Outdated Show resolved Hide resolved
src/workflow/examples/activity-sequence.ts Outdated Show resolved Hide resolved
src/workflow/types/Activity.type.ts Outdated Show resolved Hide resolved
improve workflow unit test

Signed-off-by: kaibocai <kaibocai@microsoft.com>
Signed-off-by: kaibocai <kaibocai@microsoft.com>
Signed-off-by: kaibocai <kaibocai@microsoft.com>
Signed-off-by: kaibocai <kaibocai@microsoft.com>
Copy link

codecov bot commented Jan 9, 2024

Codecov Report

Attention: 63 lines in your changes are missing coverage. Please review.

Comparison is base (998f8ee) 35.36% compared to head (6fb6544) 55.79%.
Report is 2 commits behind head on main.

❗ Current head 6fb6544 differs from pull request most recent head fb4ef7f. Consider uploading reports for the commit fb4ef7f to get more accurate results

Files Patch % Lines
src/workflow/runtime/WorkflowRuntime.ts 64.10% 13 Missing and 1 partial ⚠️
src/workflow/client/DaprWorkflowClient.ts 67.56% 11 Missing and 1 partial ⚠️
src/workflow/internal/index.ts 50.00% 9 Missing and 3 partials ⚠️
src/workflow/runtime/WorkflowContext.ts 55.00% 9 Missing ⚠️
src/workflow/client/WorkflowFailureDetails.ts 20.00% 4 Missing ⚠️
src/workflow/client/WorkflowState.ts 76.47% 4 Missing ⚠️
src/workflow/runtime/WorkflowActivityContext.ts 33.33% 4 Missing ⚠️
src/workflow/runtime/WorkflowRuntimeStatus.ts 78.94% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #563       +/-   ##
===========================================
+ Coverage   35.36%   55.79%   +20.43%     
===========================================
  Files          95       14       -81     
  Lines       10570      319    -10251     
  Branches      452       63      -389     
===========================================
- Hits         3738      178     -3560     
+ Misses       6745      124     -6621     
+ Partials       87       17       -70     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: kaibocai <kaibocai@microsoft.com>
src/workflow/client/WorkflowClient.ts Outdated Show resolved Hide resolved
src/workflow/client/WorkflowClient.ts Outdated Show resolved Hide resolved
src/workflow/runtime/WorkflowContext.ts Outdated Show resolved Hide resolved
Signed-off-by: kaibocai <kaibocai@microsoft.com>
Copy link
Member

@shubham1172 shubham1172 left a comment

Choose a reason for hiding this comment

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

Hi @kaibocai, please add docs to the PR too!

examples/workflow/authoring/package.json Outdated Show resolved Hide resolved
examples/workflow/authoring/src/activity-sequence.ts Outdated Show resolved Hide resolved
src/workflow/client/WorkflowClient.ts Outdated Show resolved Hide resolved
test/e2e/workflow/workflow.test.ts Show resolved Hide resolved
test/e2e/workflow/workflow.test.ts Show resolved Hide resolved
src/workflow/internal/ApiTokenClientInterceptor.ts Outdated Show resolved Hide resolved
src/workflow/internal/ApiTokenClientInterceptor.ts Outdated Show resolved Hide resolved
src/workflow/internal/index.ts Outdated Show resolved Hide resolved
src/workflow/runtime/WorkflowRuntime.ts Outdated Show resolved Hide resolved
src/workflow/client/WorkflowClient.ts Outdated Show resolved Hide resolved
Signed-off-by: kaibocai <kaibocai@microsoft.com>
@shubham1172 shubham1172 changed the title Initiated support for workflow Workflow authoring support Jan 12, 2024
Signed-off-by: kaibocai <kaibocai@microsoft.com>
Signed-off-by: kaibocai <kaibocai@microsoft.com>
Signed-off-by: kaibocai <kaibocai@microsoft.com>
examples/workflow/authoring/src/human-interaction.ts Outdated Show resolved Hide resolved
examples/workflow/authoring/src/human-interaction.ts Outdated Show resolved Hide resolved
src/types/workflow/WorkflowClientOption.ts Outdated Show resolved Hide resolved
src/types/workflow/WorkflowClientOption.ts Outdated Show resolved Hide resolved
src/workflow/client/DaprWorkflowClient.ts Outdated Show resolved Hide resolved
src/workflow/client/DaprWorkflowClient.ts Outdated Show resolved Hide resolved
src/workflow/client/DaprWorkflowClient.ts Outdated Show resolved Hide resolved
Signed-off-by: kaibocai <kaibocai@microsoft.com>
Signed-off-by: kaibocai <kaibocai@microsoft.com>
Signed-off-by: kaibocai <kaibocai@microsoft.com>
Copy link
Member

@shubham1172 shubham1172 left a comment

Choose a reason for hiding this comment

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

LGTM overall now, @kaibocai could you see the warnings?
image
image

package.json Outdated Show resolved Hide resolved
Signed-off-by: kaibocai <kaibocai@microsoft.com>
shubham1172
shubham1172 previously approved these changes Jan 16, 2024
Copy link
Member

@shubham1172 shubham1172 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the PR and great work @kaibocai! This will greatly benefit JS SDK users who have been wanting to try out authoring Dapr Workflow!

Signed-off-by: kaibocai <kaibocai@microsoft.com>
@shubham1172 shubham1172 added this pull request to the merge queue Jan 22, 2024
Merged via the queue into dapr:main with commit 5c2b40a Jan 22, 2024
6 checks passed
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.

Workflow implementation in SDK
3 participants