Ensure initialization signals get fired during sync #201
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
TODO
Reviewer guidance
I initially attempted a more general approach by creating a NO_STAGE stage to allow the initializing started signal to get triggered, but it broke another test. While it fixed the test here, it did not seem to alter the behaviour in Kolibri. I also didn't know whether this would have implications for the Kolibri sync commands, which seem to explicitly fire the initializing started event: https://github.com/learningequality/kolibri/blob/release-v0.16.x/kolibri/core/auth/management/utils.py#L615
Issues addressed
This should resolve learningequality/kolibri#10588 by ensuring that when an inbound sync happens, the pre-transfer hooks are properly executed: https://github.com/learningequality/kolibri/blob/release-v0.16.x/kolibri/core/auth/sync_event_hook_utils.py#L130