uber-go / cadence-client

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

Add documentation for propagators and how they are executed #1312

Closed alshopov closed 3 months ago

alshopov commented 4 months ago

Clarify behavior on return of error Document the whole execution sequence

Docs added to both internal package and exposed type alias due to: https://github.com/golang/go/issues/44905

CLAassistant commented 4 months ago

CLA assistant check
All committers have signed the CLA.

alshopov commented 3 months ago

@shijiesheng, @3vilhamster: I have updated the docs. I have verified the behaviour via fiddling with: cmd/samples/recipes/ctxpropagation/propagator.go from //github.com/uber-common/cadence-samples.git

Note that I am documenting current behavior - I am not sure whether it is the intended behavior. Failures to execute on error from Extract and ExtractToWorkflow are different (failing vs time out) but that fact is not important that much and should not constrain future changes. What matters to the user are the problems they will have with their workflow.

I have no idea whether the current silent non-failure on errors from Inject* methods is a good idea - leaving this up to you.

Sorry for the delay - free time is a rare premium

codecov[bot] commented 3 months ago

Codecov Report

Merging #1312 (373ccf8) into master (ba7fa67) will decrease coverage by 0.03%. The diff coverage is n/a.

Additional details and impacted files | [Files](https://app.codecov.io/gh/uber-go/cadence-client/pull/1312?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber-go) | Coverage Δ | | |---|---|---| | [internal/headers.go](https://app.codecov.io/gh/uber-go/cadence-client/pull/1312?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber-go#diff-aW50ZXJuYWwvaGVhZGVycy5nbw==) | `76.47% <ø> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/uber-go/cadence-client/pull/1312/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber-go) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/uber-go/cadence-client/pull/1312?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber-go). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber-go) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/uber-go/cadence-client/pull/1312?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber-go). Last update [ba7fa67...373ccf8](https://app.codecov.io/gh/uber-go/cadence-client/pull/1312?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber-go). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber-go).