Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • pymemri pymemri
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 44
    • Issues 44
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • MemriMemri
  • pymemripymemri
  • Merge requests
  • !161

Implement merging and syncing items in PodClient

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Eelco van der Wel requested to merge sync-v2 into dev Feb 01, 2022
  • Overview 23
  • Commits 9
  • Pipelines 6
  • Changes 9
  • for get, update, search, bulk: All items are now stored in the local_db, with the following logic:
if item.id not in local_db:
    local_db.add(item)
else:
    local_item = local_db[item.id]
    merge(local_item, item, merge_priority)
  • add requires_client_ref to ItemBase to keep compatible with Dataset
  • ItemBase has an ensure_id method, that creates a new ID if the item doesnt have one.
  • ItemBase now has an _in_pod property, which tracks if the item already exists in pod.
  • ItemBase now tracks which properties are updated by keeping a record of original_properties and date_local_modified. Each changed property gets recorded in both, which enables local, remote and newest merge strategies
  • ItemBase now has an on_sync() method, which resets these tracking variables to the appropriate values after syncing.
Edited Feb 02, 2022 by Eelco van der Wel
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: sync-v2