Fix: Python cancellation test#3700
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
mnafees
approved these changes
Apr 24, 2026
juliusgeo
approved these changes
Apr 24, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Python cancellation integration test to use the run-details API and the SDK’s unified RunStatus enum so the test can reliably observe cancellation without relying on REST task status/output fields.
Changes:
- Replace REST
V1TaskStatuschecks withRunStatus. - Switch polling from
hatchet.runs.aio_get(...)tohatchet.runs.aio_get_details(...). - Treat
QUEUEDas an in-progress state while waiting for cancellation.
Comments suppressed due to low confidence (1)
sdks/python/examples/cancellation/test_cancellation.py:24
- The timeout failure (
assert False, "Workflow run did not cancel in time") doesn’t include the last observed run status/details, which makes CI failures hard to diagnose. Consider capturing the finalrun.status(and optionallyrun.model_dump_json(...)) and including it in the failure message in theelsebranch.
else:
assert False, "Workflow run did not cancel in time"
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.
Description
Broke the DAG outputs in the REST API a couple of commits ago, so this works around that. going to fix that breakage forward in #3689
Type of change