Skip to content
This repository has been archived by the owner on Jul 31, 2020. It is now read-only.

Merge by id action (staging) #313

Merged
merged 6 commits into from
May 17, 2019
Merged

Conversation

AlexeyBarabash
Copy link
Contributor

We met the situation when [CREATE, UPDATE] were merged to [CREATE], which was then ignored because local object had been existed.
This PR makes CREATE and DELETE records stays alone to prevent such ignoring. So only UPDATE records of the same object id are merged.

STR for brave-core brave-syncer branch:

  1. DeviceA: create folderA in bookmarks
  2. DeviceA: create bookmarks of brave://bookmarks, brave://sync, brave://inspect, all in Bookmarks Bar folder
  3. DeviceA: enable sync and copy code words
  4. DeviceB: join sync chain with words from pt.3
  5. DeviceB: As soon as bookmarks from DeviceA appear , move 3 bookmarks into folderA
  6. Actual on DeviceA: bookmark will not be moved
    Expected on DeviceA: bookmarks should be moved.

@AlexeyBarabash AlexeyBarabash self-assigned this May 13, 2019
@AlexeyBarabash AlexeyBarabash changed the title Merge by id action staging Merge by id action (staging) May 13, 2019
@darkdh
Copy link
Member

darkdh commented May 13, 2019

If you want to merge this into staging, you should remove brave-syncer specific commit "Add MetaInfo to Bookmark", otherwise you can merge into brave-syncer branch

@AlexeyBarabash
Copy link
Contributor Author

@darkdh yes, reopened PR for brave-syncer-staging branch

@AlexeyBarabash AlexeyBarabash changed the base branch from staging to brave-syncer-staging May 13, 2019 18:15
Copy link
Member

@darkdh darkdh left a comment

Choose a reason for hiding this comment

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

and you should update the test

Create + Update + Update of an existing object should resolve to a separate Update
@AlexeyBarabash
Copy link
Contributor Author

CI failed because npm ERR! audit Your configured registry (https://registry.npmjs.org/) does not support audit requests, or the audit endpoint is temporarily unavailable.

@AlexeyBarabash
Copy link
Contributor Author

reopened PR to trigger new CI run

Copy link
Member

@darkdh darkdh left a comment

Choose a reason for hiding this comment

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

test/client/recordUtil.js Show resolved Hide resolved
…st to 'sequential Updates should become no op if the merged result equals to existingObject'
@darkdh darkdh merged commit 7a4f9c8 into brave-syncer-staging May 17, 2019
@darkdh darkdh deleted the merge_by_id_action_staging branch May 17, 2019 21:40
darkdh added a commit that referenced this pull request May 17, 2019
darkdh added a commit that referenced this pull request May 21, 2019
@AlexeyBarabash AlexeyBarabash restored the merge_by_id_action_staging branch October 22, 2019 14:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants