Skip to content

Fix event subscription to use event_group instead of event_source.remote#204

Merged
tedwaine merged 1 commit intoAcademySoftwareFoundation:developfrom
jhery-rdo:fix/event-subscription-group
Feb 23, 2026
Merged

Fix event subscription to use event_group instead of event_source.remote#204
tedwaine merged 1 commit intoAcademySoftwareFoundation:developfrom
jhery-rdo:fix/event-subscription-group

Conversation

@jhery-rdo
Copy link
Copy Markdown
Contributor

Fix subscribe_to_event_group() registering callback on wrong actor

Summary

ModuleBase.subscribe_to_event_group() registers the callback on event_source.remote instead of the retrieved event_group, causing event callbacks to never fire.

Updated PR with a recent rebase on develop branch

The Bug

In module.py line 391:

def subscribe_to_event_group(self, event_source, callback_method):
    event_group = self.connection.request_receive(event_source.remote, get_event_group_atom())[0]
    return self.connection.link.add_message_callback(event_source.remote, callback_method)
    #                                                ^^^^^^^^^^^^^^^^^^^ BUG: should be event_group

The method correctly retrieves the event_group actor but then ignores it, registering the callback on event_source.remote instead.

The Fix

def subscribe_to_event_group(self, event_source, callback_method):
    event_group = self.connection.request_receive(event_source.remote, get_event_group_atom())[0]
    return self.connection.link.add_message_callback(event_group, callback_method)
    #                                                ^^^^^^^^^^^^ FIXED: use event_group

Impact

  • Before: Event subscriptions via subscribe_to_event_group() were non-functional. Callbacks were registered on the wrong actor and events were never delivered.
  • After: Event subscriptions work as intended. Callbacks receive events from the event group.

Discovery

Found while implementing event-driven bookmark detection in a Python plugin. Studio-level session events were not being received despite successful subscription. Tracing the issue revealed the callback was registered on the wrong actor.

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented Feb 5, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: jhery-rdo / name: julien hery (ba5ee0d)

@jhery-rdo jhery-rdo marked this pull request as draft February 5, 2026 15:20
@jhery-rdo jhery-rdo force-pushed the fix/event-subscription-group branch from c02f0c9 to ba5ee0d Compare February 5, 2026 15:49
@jhery-rdo
Copy link
Copy Markdown
Contributor Author

/easy-cla

@jhery-rdo jhery-rdo marked this pull request as ready for review February 5, 2026 21:37
@tedwaine tedwaine merged commit 015494d into AcademySoftwareFoundation:develop Feb 23, 2026
1 of 2 checks 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.

2 participants