Repository navigation
Conversation
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was changed
Remove the update-compensation flag assignment from
workflow_compensation().run()already sets the workflow-compensation flag after that activity finishes;the update flag should only change after update compensation.
Add workflow-only and update-only compensation regressions, and compare the
query flags with the compensation activities scheduled/completed in the real
Temporal history. The existing both/neither paths use the same assertions.
Why?
Cancelling this sample before sending any update reports
update_compensation_done() == True, even though the server history contains noupdate-compensation activity. The existing tests did not distinguish this from
the case where both compensations actually ran.
This is a one-line sample state fix, not a change to activity execution,
compensation ordering, retries or the SDK.
How was this tested?
update flag: 1 failed, 4 passed.
server; repeating this group three times yields 15 passes.
tests. This is not a claim that every sample/integration in the repository ran.
git diff --checkpass.uv sync --locked --python 3.11 uv run pytest -q tests/message_passing/waiting_for_handlers_and_compensation --workflow-environment localTested with Python 3.11.15, Temporal Python SDK 1.33.0 and the local server version
selected by this repository's test fixture. No external Temporal service or
application side effects were used. No documentation/API change is needed.
AI assistance was used to trace the issue, write the tests/fix, execute checks,
and prepare this description. The complete patch and reproduction are provided
for review; no claim of prior human review or upstream acceptance is made.