Skip to content

Fix SyncCallback crashing issue#465

Merged
wangyimosquito merged 1 commit intoaws:mainfrom
wangyimosquito:wwangyw-320
Apr 20, 2026
Merged

Fix SyncCallback crashing issue#465
wangyimosquito merged 1 commit intoaws:mainfrom
wangyimosquito:wwangyw-320

Conversation

@wangyimosquito
Copy link
Copy Markdown
Contributor

@wangyimosquito wangyimosquito commented Apr 15, 2026

Issue #, if available:

  • While setting an deadline alert with SyncCallback in DAG, worker crashed with error Unrecoverable error: KeyError('ti') [celery.worker] loc=worker.py:207. This is due to the sqs_broker expects a hardcoded payload like {"ti": {"id": "uuid", ...}, "type": "ExecuteTask", ...}, but with SyncCallback configured, the payload looks like {"callback": {"id": "uuid", ...}, "type": "ExecuteCallback", ...}

Description of changes:

  • The fix is to handle both types of payload.
  • Added unit tests for changed function.

Testing:

  • Deployed an environment with the fix and configure a simple deadline alert with a Python print SyncCallback. The DAG run was successful, and checked out the worker log, no KeyError was raised and see callback function executed successfully.
  • Also tested the fix with custom sync and async callback function.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@wangyimosquito wangyimosquito changed the title Wwangyw 320 Fix SyncCallback crashing issue Apr 15, 2026
@wangyimosquito wangyimosquito requested a review from isshishi April 15, 2026 21:46
@wangyimosquito wangyimosquito merged commit 4d88919 into aws:main Apr 20, 2026
1 check passed
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