Skip to content

feat: propagate context through workflow execution - #158

Open
timl3136 wants to merge 1 commit into
cadence-workflow:mainfrom
timl3136:better-context
Open

feat: propagate context through workflow execution#158
timl3136 wants to merge 1 commit into
cadence-workflow:mainfrom
timl3136:better-context

Conversation

@timl3136

Copy link
Copy Markdown
Member

What changed?
Context propagation

Why?
Necessary feature

How did you test it?
Unit and integration tests

Potential risks

Release notes

Documentation Changes

Signed-off-by: Tim Li <ltim@uber.com>
@gitar-bot

gitar-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown
CI failed: Type Safety Check failed with 5 mypy errors in test files due to incorrect return types and type annotations introduced in the context propagation feature.

Overview

1 type safety check failure found across 1 log, directly related to the PR changes introducing context propagation.

Failures

Type Safety Check Failure (confidence: high)

  • Type: build
  • Affected jobs: 90724535767
  • Related to change: yes
  • Root cause: Mypy reported 5 type errors in test files (tests/integration_tests/workflow/test_context_propagation.py and tests/cadence/test_context.py), including returning Any where HistoryEvent was expected and incorrect generator/context manager return type annotations.
  • Suggested fix: Update the return type annotations and ensure proper typing for the context manager and test helpers in tests/integration_tests/workflow/test_context_propagation.py and tests/cadence/test_context.py.

Summary

  • Change-related failures: 1 build/type-checking failure (5 mypy errors across 2 files)
  • Infrastructure/flaky failures: None
  • Recommended action: Fix the mypy type errors in the affected test files by correcting the function return types and generator annotations.
Code Review ✅ Approved

Propagates context through workflow execution to enable proper request tracing and cancellation. No issues found.

Tip

Comment Gitar fix CI or enable auto-apply: gitar auto-apply:on

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.65854% with 35 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cadence/sample/context_propagation_example.py 0.00% 32 Missing ⚠️
cadence/testing/_workflow_environment.py 89.47% 1 Missing and 1 partial ⚠️
cadence/worker/_types.py 66.66% 1 Missing ⚠️
Files with missing lines Coverage Δ
cadence/__init__.py 100.00% <100.00%> (ø)
cadence/_internal/activity/_activity_executor.py 94.78% <100.00%> (+0.13%) ⬆️
cadence/_internal/activity/_context.py 93.04% <100.00%> (+0.38%) ⬆️
cadence/_internal/context.py 100.00% <100.00%> (ø)
cadence/_internal/workflow/context.py 93.61% <100.00%> (+0.23%) ⬆️
cadence/_internal/workflow/workflow_engine.py 91.21% <100.00%> (+0.37%) ⬆️
cadence/activity.py 83.42% <100.00%> (+0.09%) ⬆️
cadence/client.py 88.00% <100.00%> (+0.61%) ⬆️
cadence/context.py 100.00% <100.00%> (ø)
cadence/worker/_activity.py 100.00% <ø> (ø)
... and 5 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant