Skip to content

Add sync operations and filter utilities for classroom partitioning - #14070

Merged
rtibbles merged 5 commits into
learningequality:release-v0.19.xfrom
bjester:classroom-partitioning
Jan 21, 2026
Merged

rtibbles merged 5 commits into
learningequality:release-v0.19.xfrom
bjester:classroom-partitioning

Conversation

@bjester

@bjester bjester commented Jan 14, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Fixes make docker-whl for local build of wheel and pex files
  • Fixes make %-with-postgres (e.g. make test-with-postgres) use of docker-compose by updating it to new integrated plugin docker compose
  • Upgrades morango to 0.8.6
  • Adds factory classes for building new partitions and partition filters for new classroom based partitioning strategy, which aligns partitions with user assignment, through Collections, to a classroom
  • Adds a new sync operation that dynamically modifies the sync filter to include new partition, if-and-only-if:
    • the device is the server and a full-facility device
    • the client is SoUD
  • Adds a new network sync operation for receiving the result, as the client, of the aforementioned sync operation that modifies the sync filter, to save the new filter from the server's response into its local context and transfer session

References

Scope: learningequality/morango#283
Supported by: learningequality/morango#284

Reviewer guidance

  • There should be no regressions to full-facility and SoUD syncing behaviors
  • The morango integration tests should pass INTEGRATION_TEST=1 pytest kolibri/core/auth/test/test_morango_integration.py
  • You should be able to use make docker-whl to build assets
  • You should be able to use make test-with-postgres for running tests on postgres

@github-actions github-actions Bot added DEV: backend Python, databases, networking, filesystem... SIZE: large labels Jan 14, 2026
@bjester bjester changed the title Add sync operations and filter utilities for classroom partitioning [DO NOT MERGE] Add sync operations and filter utilities for classroom partitioning Jan 14, 2026
@github-actions

github-actions Bot commented Jan 14, 2026 •

Copy link
Copy Markdown
Contributor

@bjester
bjester force-pushed the classroom-partitioning branch from 93088c5 to fdbd607 Compare January 20, 2026 23:31
@bjester bjester changed the title [DO NOT MERGE] Add sync operations and filter utilities for classroom partitioning Add sync operations and filter utilities for classroom partitioning Jan 20, 2026
@bjester
bjester force-pushed the classroom-partitioning branch from fdbd607 to a4e4554 Compare January 21, 2026 15:54
@bjester
bjester marked this pull request as ready for review January 21, 2026 16:15
@bjester bjester added TODO: needs review Waiting for review TAG: new feature New user-facing feature DEV: dev-ops Continuous integration & deployment TAG: dev experience Build performance, linting, debugging... TAG: dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Jan 21, 2026

@rtibbles rtibbles left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few non-blocking comments - this all broadly makes sense to me, and we can get complete assurance after we've implemented the course related models, and extended the morango integration tests to include these cases.

Comment thread kolibri/core/auth/sync_operations.py Resolved
):
# receive the modified, dynamic, filter(s) from the server and update the transfer
# session and context objects to reflect the change
context.update(sync_filter=response_filter)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non-blocking: In Morango should updating the transfer session's filter be automatic upon updating the context as well?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's possible but there's currently some cyclic relationships between the two, so I had some concerns about making it automatic. The context is used initially to hold the filter and relay it until the transfer session is created, but it also lets the transfer session take precedence. Deconstructing the consequences of all that was too much to be worthwhile IMO so I didn't try to change anything.

if collection is None:
collection = Collection.objects.get(pk=collection_id)

while collection.kind != collection_kinds.CLASSROOM:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In other places we deliberately made the 'collection tree' a fixed structure, rather than able to be arbitrarily nested, so this could be a couple of if statements instead of a while loop - but it would have the same net result.

@bjester
bjester force-pushed the classroom-partitioning branch from a4e4554 to fad881f Compare January 21, 2026 20:28
@rtibbles
rtibbles merged commit 8f6f9b2 into learningequality:release-v0.19.x Jan 21, 2026
57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DEV: backend Python, databases, networking, filesystem... DEV: dev-ops Continuous integration & deployment python Pull requests that update Python code SIZE: large TAG: dependencies Pull requests that update a dependency file TAG: dev experience Build performance, linting, debugging... TAG: new feature New user-facing feature TODO: needs review Waiting for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants