Fix AwaitMessageTrigger missing super().__init__() call#65934
Closed
david-parkk wants to merge 1 commit into
Closed
Fix AwaitMessageTrigger missing super().__init__() call#65934david-parkk wants to merge 1 commit into
david-parkk wants to merge 1 commit into
Conversation
- add test to verify _task_instance
vincbeck
approved these changes
Apr 27, 2026
Contributor
Author
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.
Summary
Fix
AwaitMessageTriggernot callingsuper().__init__(), which caused anAttributeErrorwhen the trigger was used as an
AssetWatchertrigger.Analysis
BaseTrigger.__init__()initialisesself._task_instance = None, which is required for thetask_instanceproperty to work correctly:AwaitMessageTrigger.__init__()was missing thesuper().__init__()call, so_task_instancewas never initialised.When the trigger is used as an

AssetWatchertrigger, there is no associated task instance,so
_task_instanceis never set. When the triggerer later accessestrigger.task_instance,it raises:
This was confirmed by running
KafkaMessageQueueTrigger(which delegates toAwaitMessageTrigger) as anAssetWatchertrigger in a Breeze dev environment.Changes
Added
super().__init__()call toAwaitMessageTrigger.__init__().Test
test_trigger_has_task_instance_attribute— verifies that_task_instanceisproperly initialised to
Noneafter instantiation, which is the condition required forAssetWatcherusage to work withoutAttributeErroruv run --project providers/apache/kafka pytest providers/apache/kafka/tests/unit/)prek run --from-ref main --stage pre-commit)Was generative AI tooling used to co-author this PR?
Generated-by: Claude following the guidelines
I'm happy to make any adjustments based on your feedback. Thank you to the maintainers for taking the time to review this contribution!