Skip to content

Scoped field updates in custom Morango sync ops - #14985

Merged
rtibbles merged 2 commits into
learningequality:release-v0.19.xfrom
bjester:tidy-the-strawberry-reaper
Jul 9, 2026
Merged

Scoped field updates in custom Morango sync ops#14985
rtibbles merged 2 commits into
learningequality:release-v0.19.xfrom
bjester:tidy-the-strawberry-reaper

Conversation

@bjester

@bjester bjester commented Jul 8, 2026

Copy link
Copy Markdown
Member

Summary

  • Updates morango model saves in Kolibri's sync operations to scope the saves to only the updated fields, similar to the corresponding morango PR (referenced below)
  • Upgrades morango to v0.8.15

References

Related to this investigation:

Also, this corresponding morango update:

Reviewer guidance

The guidance in learningequality/kolibri-sync-extras-plugin#15 is sufficient. Morango integ tests pass

AI usage

None

@github-actions github-actions Bot added DEV: backend Python, databases, networking, filesystem... SIZE: very small labels Jul 8, 2026
@bjester
bjester force-pushed the tidy-the-strawberry-reaper branch from d49c62f to 598efb9 Compare July 9, 2026 00:14
@bjester
bjester requested a review from rtibblesbot July 9, 2026 00:17
@rtibblesbot

rtibblesbot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🔵 Review posted

Last updated: 2026-07-09 00:22 UTC

@rtibblesbot rtibblesbot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PR #14985 — Small, correct cleanup: a None guard on records_total in the sync progress hook plus scoping two morango save() calls to their changed fields. Both are consistent with this branch's earlier "scope saves to changed fields" work, and the test assertion was updated to match. CI pending; no UI changes (Phase 3 N/A).

One worthwhile follow-up (inline): the new guard doesn't cover the sibling stats handler in the same adapter, so the crash it targets can still fire. Minor: the guard has no test, unlike the update_fields change.


@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly

How was this generated?

Ran a phased review pipeline over the pull request diff:

  • Classified the diff to select review passes (core, frontend, backend) and whether manual QA was required
  • Core review pass checked correctness, design, architecture, testing, completeness, and DRY/SRP/Rule-of-Three principles
  • Specialized frontend/backend review passes applied framework-specific lenses where those files changed
  • For UI changes: manual QA and an accessibility audit against a live dev server, when available
  • Checked CI status and linked issue acceptance criteria
  • Synthesized one review from those passes and chose the verdict from the findings, CI status, and QA evidence

Comment thread kolibri/core/auth/management/utils.py Outdated
Comment thread kolibri/core/auth/sync_operations.py
@bjester
bjester force-pushed the tidy-the-strawberry-reaper branch from 598efb9 to 6614d8e Compare July 9, 2026 00:27
@bjester bjester changed the title Tidying up behaviors after testing of kolibri-sync-extras-plugin Scoped field updates in custom Morango sync ops Jul 9, 2026
@bjester bjester changed the title Scoped field updates in custom Morango sync ops [DO NOT MERGE] Scoped field updates in custom Morango sync ops Jul 9, 2026
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

@bjester bjester changed the title [DO NOT MERGE] Scoped field updates in custom Morango sync ops Scoped field updates in custom Morango sync ops Jul 9, 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.

Changes make sense to me - one thought for the future, but not needed right now.

extra_fields.update(**storage)
context.sync_session.extra_fields = json.dumps(extra_fields)
context.sync_session.save()
context.sync_session.save(update_fields=["extra_fields"])

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.

Not needed for now - but it almost feels like having "dirty field" tracking on the sync session might be good to have this be the default behaviour.

@rtibbles
rtibbles merged commit 44bf426 into learningequality:release-v0.19.x Jul 9, 2026
85 of 86 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... SIZE: small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants