Skip to content

wf Worker should only close clients it has initialized #748

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

Merged
merged 1 commit into from
Jul 21, 2025

Conversation

tscolari
Copy link
Contributor

@tscolari tscolari commented Jul 21, 2025

Description

This avoids the workflow worker from closing externally provided dapr clients.
It should only close clients it created itself, not external ones - which would have unexpected side effects cross the caller's code.

Issue reference

#747

Please reference the issue this PR will close: #747

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

@tscolari tscolari requested review from a team as code owners July 21, 2025 10:32
@tscolari tscolari force-pushed the worker-shutdown-fix branch from 3fd83df to a449de1 Compare July 21, 2025 10:33
@tscolari tscolari changed the title wf Worker should only close clients it initialized wf Worker should only close clients it has initialized Jul 21, 2025
Copy link

codecov bot commented Jul 21, 2025

Codecov Report

Attention: Patch coverage is 54.54545% with 5 lines in your changes missing coverage. Please review.

Project coverage is 57.14%. Comparing base (6c59092) to head (a449de1).
Report is 28 commits behind head on main.

Files with missing lines Patch % Lines
workflow/worker.go 54.54% 2 Missing and 3 partials ⚠️

❗ There is a different number of reports uploaded between BASE (6c59092) and HEAD (a449de1). Click for more details.

HEAD has 3 uploads less than BASE
Flag BASE (6c59092) HEAD (a449de1)
4 1
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #748      +/-   ##
==========================================
- Coverage   62.52%   57.14%   -5.39%     
==========================================
  Files          56       58       +2     
  Lines        4139     4429     +290     
==========================================
- Hits         2588     2531      -57     
- Misses       1425     1761     +336     
- Partials      126      137      +11     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@mikeee mikeee left a comment

Choose a reason for hiding this comment

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

lgtm

@yaron2 yaron2 merged commit 25dcce5 into dapr:main Jul 21, 2025
17 of 19 checks passed
@tscolari tscolari deleted the worker-shutdown-fix branch July 21, 2025 13:46
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.Worker.Close() should not close the daprClient
4 participants