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

workflows: update durabletask dependency #757

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

famarting
Copy link

@famarting famarting commented Dec 3, 2024

Description

Update durabletask dependency to use new dapr fork

Also implements support for purge API #711

Implements support for reuse id policy and set custom status from #739

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: #[issue number]

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

Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Fabian Martinez <[email protected]>
@famarting famarting requested review from a team as code owners December 3, 2024 10:25
Signed-off-by: Fabian Martinez <[email protected]>
Signed-off-by: Fabian Martinez <[email protected]>
Copy link
Contributor

@elena-kolevska elena-kolevska left a comment

Choose a reason for hiding this comment

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

Some comments. Please run tox -e ruff and tox -e flake8 to fix linter errors.

We'll also need to update the grpc library to >= 1.67.0, for compatibility with durabletask.

And finally, we'll need to update the tests in test_dapr_workflow_context.py to cover set-custom_status. Something like

class FakeOrchestrationContext:
    def __init__(self):
        self.instance_id = mock_instance_id
        self.custom_status = None. # <- adding this
    def set_custom_status(self, custom_status):
        self.custom_status = custom_status
        
...

class DaprWorkflowContextTest(unittest.TestCase):
...
def test_workflow_context_functions(self):
...
            dapr_wf_ctx.set_custom_status(mock_status)
            assert fakeContext.custom_status == mock_status            

@@ -26,8 +26,8 @@ include_package_data = True
zip_safe = False
install_requires =
protobuf >= 4.22
grpcio >= 1.37.0
grpcio-status>=1.37.0
grpcio >= 1.67.0
Copy link
Contributor

Choose a reason for hiding this comment

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

@berndverst any objections on bumping the grpc library version?
This has been updated in the durable task fork and it's a dependency here.

Signed-off-by: Elena Kolevska <[email protected]>
Copy link

codecov bot commented Dec 4, 2024

Codecov Report

Attention: Patch coverage is 96.77419% with 1 line in your changes missing coverage. Please review.

Project coverage is 86.07%. Comparing base (bffb749) to head (ddff512).
Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
...ext-workflow/dapr/ext/workflow/workflow_context.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #757      +/-   ##
==========================================
- Coverage   86.63%   86.07%   -0.56%     
==========================================
  Files          84       87       +3     
  Lines        4473     4804     +331     
==========================================
+ Hits         3875     4135     +260     
- Misses        598      669      +71     

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

Copy link
Contributor

@elena-kolevska elena-kolevska left a comment

Choose a reason for hiding this comment

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

LGTM, pending @berndverst 's approval on the grpcio version bump

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