Skip to content

[Python] Fix: Empty Output Serialization#2902

Merged
mrkaye97 merged 4 commits intomainfrom
mk/output-hotfix
Feb 1, 2026
Merged

[Python] Fix: Empty Output Serialization#2902
mrkaye97 merged 4 commits intomainfrom
mk/output-hotfix

Conversation

@mrkaye97
Copy link
Copy Markdown
Contributor

@mrkaye97 mrkaye97 commented Feb 1, 2026

Description

Fixing one cause of failed to unmarshal json from the Python SDK sending an empty string instead of None when a task returns nothing

Type of change

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

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 1, 2026

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

Project Deployment Actions Updated (UTC)
hatchet-docs Ready Ready Preview, Comment Feb 1, 2026 0:54am

Request Review

if resp.status_code == 200:
return True

time.sleep(1)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

drive by

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

This pull request fixes a bug in the Python SDK where tasks returning nothing would send an empty string ("") instead of None, causing failed to unmarshal json errors on the engine side.

Changes:

  • Modified serialize_output method to return None instead of empty strings for tasks with no output
  • Updated type annotations across multiple files to reflect that payloads can be None
  • Bumped SDK version from 1.22.13 to 1.22.14

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
sdks/python/pyproject.toml Version bump from 1.22.13 to 1.22.14
sdks/python/CHANGELOG.md Added changelog entry for the new version
sdks/python/hatchet_sdk/worker/runner/runner.py Changed serialize_output to return None instead of empty string; updated type annotations
sdks/python/hatchet_sdk/clients/dispatcher/dispatcher.py Updated type annotations for payload parameters to accept None
sdks/python/hatchet_sdk/worker/action_listener_process.py Updated type annotations for payload field to accept None
sdks/python/tests/worker_fixture.py Added sleep delay after successful health check

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread sdks/python/CHANGELOG.md Outdated
Comment thread sdks/python/hatchet_sdk/worker/runner/runner.py
Comment thread sdks/python/hatchet_sdk/worker/runner/runner.py
Comment thread sdks/python/tests/worker_fixture.py
@mrkaye97 mrkaye97 merged commit 3593023 into main Feb 1, 2026
15 checks passed
@mrkaye97 mrkaye97 deleted the mk/output-hotfix branch February 1, 2026 01:05
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.

3 participants