Prevent Triggerer from crashing when a trigger event isn't serializable (#60152)#60981
Merged
Prevent Triggerer from crashing when a trigger event isn't serializable (#60152)#60981
Conversation
shahar1
approved these changes
Jan 23, 2026
Contributor
|
CI is not happy :( |
3cbc541 to
59f07da
Compare
Contributor
Author
Yeah, but I know what I did wrong, it related to comms, I took change from 3.2, that won't work. |
…le (#60152) * refactor: If asend in TriggerRunner comms decoder crashes due to NotImplementedError as a trigger event is not serializable, then retry without that event and cancel associated trigger * refactor: Applied some reformatting * refactor: Fixed some mypy issues * refactor: Fixed return type of send_changes method * refactor: Changed imports of trigger events * refactor: Reformatted trigger job runner * refactor: Fixed mocking of comms decoder * refactor: Forgot to add the patched supervisor_builder * refactor: Changed asserts in test_sync_state_to_supervisor * refactor: Refactored how state changes are validated * refactor: Validate events while creating the TriggerStateChanges message * refactor: Refactored try/except in validate_state_changes to keep mypy happy * Update airflow-core/src/airflow/jobs/triggerer_job_runner.py Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com> * refactor: Renamed validate_state_changes method to process_trigger_events * refactor: Only sanitize invalid trigger events if first attempt fails * refactor: Should check if msg.events is not None * refactor: Adapted test_sync_state_to_supervisor so both initial and retry call are correctly asserted and bad events are being sanitized --------- Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com> (cherry picked from commit 0238244)
59f07da to
4c5d0ff
Compare
86 tasks
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.
refactor: If asend in TriggerRunner comms decoder crashes due to NotImplementedError as a trigger event is not serializable, then retry without that event and cancel associated trigger
refactor: Applied some reformatting
refactor: Fixed some mypy issues
refactor: Fixed return type of send_changes method
refactor: Changed imports of trigger events
refactor: Reformatted trigger job runner
refactor: Fixed mocking of comms decoder
refactor: Forgot to add the patched supervisor_builder
refactor: Changed asserts in test_sync_state_to_supervisor
refactor: Refactored how state changes are validated
refactor: Validate events while creating the TriggerStateChanges message
refactor: Refactored try/except in validate_state_changes to keep mypy happy
Update airflow-core/src/airflow/jobs/triggerer_job_runner.py
Co-authored-by: Ash Berlin-Taylor ash_github@firemirror.com
refactor: Renamed validate_state_changes method to process_trigger_events
refactor: Only sanitize invalid trigger events if first attempt fails
refactor: Should check if msg.events is not None
refactor: Adapted test_sync_state_to_supervisor so both initial and retry call are correctly asserted and bad events are being sanitized
Co-authored-by: Ash Berlin-Taylor ash_github@firemirror.com
(cherry picked from commit 0238244)
Was generative AI tooling used to co-author this PR?
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.