temporalio / temporalio/sdk-python

[Bug] Handle possibility of update-before-start

Open
#462 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
1.2k
Forks
241
Avg merge
3d 21h
Merged PRs (30d)
55

Description

Describe the bug

Because of the fact that we re-order updates to come before other things a-la signals in Core, it's currently possible to handle an update before running the first bit of workflow code if an update comes in same task as start workflow.

We'll likely need to buffer things as we do in other SDKs (in lieu of making some other choice)

Minimal Reproduction

See the test_workflow_update_handlers_unhappy test and discussion here

Environment/Versions
  • OS and processor: [e.g. M1 Mac, x86 Windows, Linux]
  • Temporal Version: [e.g. 1.14.0?] and/or SDK version
  • Are you using Docker or Kubernetes or building Temporal from source?
Additional context

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the test_workflow_update_handlers_unhappy test and the discussion linked in the issue. Reproduce an update arriving in the same task as workflow start, then trace the update and startup ordering in the relevant workflow code. Done means the update is not handled before the first workflow code runs, with the expected behavior covered by the test.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.