Skip to content

Fix: Python cancellation test#3700

Merged
mrkaye97 merged 2 commits into
mainfrom
mk/fix-python-test
Apr 24, 2026
Merged

Fix: Python cancellation test#3700
mrkaye97 merged 2 commits into
mainfrom
mk/fix-python-test

Conversation

@mrkaye97
Copy link
Copy Markdown
Contributor

@mrkaye97 mrkaye97 commented Apr 24, 2026

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

  • Bug fix (non-breaking change which fixes an issue)

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hatchet-docs Ready Ready Preview, Comment Apr 24, 2026 2:26pm

Request Review

@mrkaye97 mrkaye97 marked this pull request as ready for review April 24, 2026 14:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 V1TaskStatus checks with RunStatus.
  • Switch polling from hatchet.runs.aio_get(...) to hatchet.runs.aio_get_details(...).
  • Treat QUEUED as 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 final run.status (and optionally run.model_dump_json(...)) and including it in the failure message in the else branch.
    else:
        assert False, "Workflow run did not cancel in time"

@mrkaye97 mrkaye97 merged commit 3b7ceaf into main Apr 24, 2026
21 checks passed
@mrkaye97 mrkaye97 deleted the mk/fix-python-test branch April 24, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants