8000 [Bug] Test server in time-skipping mode does return userMetadata.summary · Issue #851 · temporalio/sdk-python · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Bug] Test server in time-skipping mode does return userMetadata.summary #851

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

Open
yunmanger1 opened this issue Apr 25, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@yunmanger1
Copy link

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
@yunmanger1 yunmanger1 added the bug Something isn't working label Apr 25, 2025
@cretz
Copy link
Member
cretz commented Apr 28, 2025

Hrmm, this was added in temporalio/sdk-java#2441. We will test and confirm. In the meantime, can you clear out any temporal- prefixed files in $TMPDIR and try again and confirm this is still failing?

(transferring to SDK)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants
0