Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Garbage Collection Integration for Morango SyncSessions #11101

Merged

Conversation

ozer550
Copy link
Member

@ozer550 ozer550 commented Aug 15, 2023

Summary

  • Added CleanUpTaskOperation for queuing cleanupsync task passing relevant attributes.
  • Cleanupsync Task to call cleanupsync command recently added in morango
  • Override the command according to Integrate morango garbage collection #8238

Reviewer guidance

  • Run the command using KOLIBRI_HOME=$(mktemp -d) kolibri manage cleanupsyncs
  • Create two devices and try syncing, post_transfer hook gets triggered.

Testing checklist

  • Contributor has fully tested the PR manually
  • If there are any front-end changes, before/after screenshots are included
  • Critical user journeys are covered by Gherkin stories
  • Critical and brittle code paths are covered by unit tests

PR process

  • PR has the correct target branch and milestone
  • PR has 'needs review' or 'work-in-progress' label
  • If PR is ready for review, a reviewer has been added. (Don't use 'Assignees')
  • If this is an important user-facing change, PR or related issue has a 'changelog' label
  • If this includes an internal dependency change, a link to the diff is provided

Reviewer checklist

  • Automated test coverage is satisfactory
  • PR is fully functional
  • PR has been tested for accessibility regressions
  • External dependency files were updated if necessary (yarn and pip)
  • Documentation is updated
  • Contributor is in AUTHORS.md

closes #8238

@github-actions github-actions bot added DEV: backend Python, databases, networking, filesystem... SIZE: small labels Aug 15, 2023
@bjester
Copy link
Member

bjester commented Aug 15, 2023

Lets make sure to include the morango upgrade in this. We have yet to actually release it, so I will help get that sorted out later this week.

@bjester
Copy link
Member

bjester commented Sep 28, 2023

@ozer550 when you have a chance, could you upgrade morango to 0.6.17 here? That will complete this and ready it for merge!

@rtibbles
Copy link
Member

Looks like this has been rebased to include the latest morango update - so I think this is ready to go?

@bjester
Copy link
Member

bjester commented Oct 19, 2023

Looks like this has been rebased to include the latest morango update - so I think this is ready to go?

It's pretty much there, but I didn't get a chance to talk to with Prathamesh about it during our sync yesterday. @ozer550 I think the instance ID filtering is the opposite of what it should be.

When we target sync sessions for clean up, if is_server is True on the completed sync, we would want to find all sync sessions with a matching instance client_instance_id. The is_server is in reference to the current device, so extracting the instance from client_instance_id would produce the other device's instance ID

Copy link
Member

@bjester bjester left a comment

Choose a reason for hiding this comment

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

@ozer550 The logic for which instance ID to use is still incorrect. Please take a closer, careful look at it. Could you also update the expiration to 1? I'm starting to think that 0 is a bad idea

Co-authored-by: Prathamesh Desai <prathameshd419@gmail.com>
Copy link
Member

@bjester bjester left a comment

Choose a reason for hiding this comment

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

🚀

@bjester bjester merged commit 171d094 into learningequality:release-v0.16.x Nov 10, 2023
35 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: medium SIZE: small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate morango garbage collection
4 participants