uber-go / cadence-client

Framework for authoring workflows and activities running on top of the Cadence orchestration engine.
https://cadenceworkflow.io
MIT License
345 stars 131 forks source link

Decouple Client from worker part of SDK #1100

Closed vytautas-karpavicius closed 3 years ago

vytautas-karpavicius commented 3 years ago

What changed? Decouple Client from "worker" part of the SDK. There was only a single place where NewClient is instantiated from within worker. Several other places (related to heartbeats) instead call a common function shared between Client and workers. Do the same here as well.

Why? This coupling makes it harder to make grpc changes, as switching workflowserviceclient.Interface in one place quickly propagates everywhere. With this change, it becomes possible to independently change Client and workers - thus enabling smaller changes.

How did you test it? Existing tests.

Potential risks

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 1ba83332-46e3-444f-9141-effa15fe0a0b


Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/internal_task_handlers.go 18 20 90.0%
internal/session.go 0 13 0.0%
<!-- Total: 19 34 55.88% -->
Files with Coverage Reduction New Missed Lines %
internal/internal_task_handlers.go 1 76.73%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 4df57e44-e180-4974-be24-9fb3e7e1dc38: -0.01%
Covered Lines: 10327
Relevant Lines: 13550

💛 - Coveralls