[Bug] Test server in time-skipping mode does return userMetadata.summary
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- backend, testing-qa
Research direction
Start by reproducing the example with the test server in time-skipping mode, comparing its workflow history with dev mode. Trace summary handling from workflow.execute_activity through fetch_history_events and user_metadata.summary. Done means the summary is present in the returned HistoryEvent in both modes, with the relevant tests passing.
Written by the indexing model from the issue text.
Description
What are you really trying to do?
I want to leverage userMetadata.summary and show it in UI, and test the functionality.
Describe the bug
My tests fail when running tests with test server in time-skipping mode.
I am passing summary attribute when executing workflow and activities. Then I query workflow history I can see userMetadata.summary populated on the HistoryEvent when running in dev mode, but it is missing in time-skipping mode.
Minimal Reproduction
@workflow.defn
class WorkflowSample:
@workflow.run
async def run(self, name: str) -> list[str]:
result = await workflow.execute_activity(ActivitySample.greeting, name, summary=f"Calculating greeting for {name}")
return [result]
async def get_payload_value(self, *args: Payload | None) -> str | None:
decoded_summary = await self.data_converter.decode(non_empty_payloads(*args))
if len(decoded_summary) == 0:
return None
return decoded_summary[0]
async def get_summary(self, history_event: HistoryEvent) -> str | None:
logger.debug("Getting summary for event %s", MessageToJson(history_event))
return await self.get_payload_value(
history_event.user_metadata.summary)
async def run(self):
async for event in workflow_handle.fetch_history_events(wait_new_event=wait_new_event):
summary = await self.get_summary(event)
print(summary)
Environment/Versions
- OS and processor: M1 Mac
- Temporal Version: 1.10.0
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 241
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 49
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from temporalio/sdk-python
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
temporalio/sdk-python#1517 · 10 comments ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
temporalio/sdk-python#496 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
temporalio/sdk-python#1890 ·
-
[Bug] Local activity resolutions regrouped on replay since 1.32.0, delivering the wrong payload Open
Difficulty 4/5 3-5 days Newbie friendliness 52/100
temporalio/sdk-python#1881 · 1 comment ·
-
bug
temporalio/sdk-python#1817 · 1 comment · 1 assignee ·
All issues in temporalio/sdk-python
Similar issues
-
bug ci good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
documentation
Difficulty 2/5 Half a day Newbie friendliness 62/100
inmanta/inmanta-core#10835 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
sponsored
Difficulty 2/5 1-3 hours Newbie friendliness 65/100