Skip to content
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

[Bug] workflow.upsert_search_attributes() will bork SDK on empty inputs #629

Open
accupham opened this issue Sep 2, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@accupham
Copy link

accupham commented Sep 2, 2024

In the middle of a workflow, if you call upsert_search_attributes with an empty input:

empty = []
workflow.upsert_search_attributes(empty)

You'll get a completely inscrutable and hard to debug error like so:

Failed completing activation on workflow with run ID 27fa7d71-76a8-4b3b-be33-1e0d11afc5a4
Traceback (most recent call last):
  File ".../.venv/lib/python3.12/site-packages/temporalio/worker/_workflow.py", line 320, in _handle_activation
    await self._bridge_worker().complete_workflow_activation(completion)
  File ".../.venv/lib/python3.12/site-packages/temporalio/bridge/worker.py", line 117, in complete_workflow_activation
    await self._ref.complete_workflow_activation(comp.SerializeToString())
RuntimeError: Completion failure: Lang SDK sent us a malformed workflow completion for run (27fa7d71-76a8-4b3b-be33-1e0d11afc5a4): At least one workflow command in the completion contained an empty variant
@cretz
Copy link
Member

cretz commented Sep 3, 2024

Saw the attached PR, thanks!

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