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

Sync fix bookmarks object id duplication #4710

Merged
merged 2 commits into from
Feb 27, 2020
Merged

Conversation

AlexeyBarabash
Copy link
Contributor

@AlexeyBarabash AlexeyBarabash commented Feb 21, 2020

Resolves brave/brave-browser#8325

To fix the profile which have duplicated object_ids and keeping crashing when enabling sync back is a separate issue: brave/brave-browser#8358.

Submitter Checklist:

Test Plan:

See issue brave/brave-browser#8325

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

@AlexeyBarabash AlexeyBarabash self-assigned this Feb 21, 2020
@AlexeyBarabash AlexeyBarabash changed the title Sync fix obj id dup Sync fix bookmarks object id duplication Feb 21, 2020
@darkdh darkdh marked this pull request as ready for review February 21, 2020 18:30
@AlexeyBarabash AlexeyBarabash force-pushed the sync_fix_obj_id_dup branch 2 times, most recently from 5dc0e92 to 3b13b36 Compare February 21, 2020 18:33
@AlexeyBarabash
Copy link
Contributor Author

CI build on Windows failed with error

21:42:06  ninja: build stopped: subcommand failed.
21:42:06  null
21:42:06  powershell.exe : null
21:42:06  At C:\_dup@tmp\durable-ddf68735\powershellWrapper.ps1:3 char:1
21:42:06  + & powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -Comm ...
21:42:06  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
21:42:06      + CategoryInfo          : NotSpecified: (null:String) [], RemoteException
21:42:06      + FullyQualifiedErrorId : NativeCommandError

restarted

@AlexeyBarabash
Copy link
Contributor Author

now failed iOS build only with

15:50:58  ERROR at //build/timestamp.gni:31:19: Script returned non-zero exit code.
15:50:58  build_timestamp = exec_script(compute_build_timestamp,
15:50:58                    ^----------
15:50:58  Current dir: /Users/jenkins/jenkins/workspace/ser-build-pr_sync_fix_obj_id_dup/src/out/ios_Release/
15:50:58  Command: python /Users/jenkins/jenkins/workspace/ser-build-pr_sync_fix_obj_id_dup/src/build/compute_build_timestamp.py official
15:50:58  Returned 1.

Restarted.

@AlexeyBarabash
Copy link
Contributor Author

This time again succeded all except iOS build: https://ci.brave.com/job/brave-browser-build-pr/job/sync_fix_obj_id_dup/3/flowGraphTable/ .

20:56:20  ERROR at //build/timestamp.gni:31:19: Script returned non-zero exit code.
20:56:20  build_timestamp = exec_script(compute_build_timestamp,
20:56:20                    ^----------
20:56:20  Current dir: /Users/jenkins/jenkins/workspace/ser-build-pr_sync_fix_obj_id_dup/src/out/ios_Release/
20:56:20  Command: python /Users/jenkins/jenkins/workspace/ser-build-pr_sync_fix_obj_id_dup/src/build/compute_build_timestamp.py official
20:56:20  Returned 1.
20:56:20  stderr:

So re-launch build ignoring all platforms except iOS.

@AlexeyBarabash AlexeyBarabash added CI/skip-android Do not run CI builds for Android CI/skip-linux CI/skip-macos-x64 Do not run CI builds for macOS x64 labels Feb 22, 2020
@bsclifton bsclifton added this to the 1.7.x - Nightly milestone Feb 23, 2020
@AlexeyBarabash
Copy link
Contributor Author

iOS build still fails

cc.py\" "
05:20:51  ERROR at //build/timestamp.gni:31:19: Script returned non-zero exit code.
05:20:51  build_timestamp = exec_script(compute_build_timestamp,
05:20:51                    ^----------
05:20:51  Current dir: /Users/jenkins/jenkins/workspace/ser-build-pr_sync_fix_obj_id_dup/src/out/ios_Release/
05:20:51  Command: python /Users/jenkins/jenkins/workspace/ser-build-pr_sync_fix_obj_id_dup/src/build/compute_build_timestamp.py official
05:20:51  Returned 1.
05:20:51  stderr:
05:20:51  
05:20:51  Traceback (most recent call last):
05:20:51    File "/Users/jenkins/jenkins/workspace/ser-build-pr_sync_fix_obj_id_dup/src/build/compute_build_timestamp.py", line 127, in <module>
05:20:51      sys.exit(main())
05:20:51    File "/Users/jenkins/jenkins/workspace/ser-build-pr_sync_fix_obj_id_dup/src/build/compute_build_timestamp.py", line 113, in main
05:20:51      last_commit_timestamp = int(open(lastchange_file).read())
05:20:51  IOError: [Errno 2] No such file or directory: '/Users/jenkins/jenkins/workspace/ser-build-pr_sync_fix_obj_id_dup/src/build/util/LASTCHANGE.committime'
05:20:51  
05:20:51  See //base/BUILD.gn:34:1: whence it was imported.

restarting CI

@AlexeyBarabash
Copy link
Contributor Author

got the same

15:32:57  /Users/jenkins/jenkins/workspace/ser-build-pr_sync_fix_obj_id_dup/src: gn gen /Users/jenkins/jenkins/workspace/ser-build-pr_sync_fix_obj_id_dup/src/out/ios_Release --args="fieldtrial_testing_like_official_build=true brave_services_key=\"****\" root_extra_deps=[\"//brave\"] is_component_build=false target_cpu=\"x64\" is_official_build=true is_debug=false dcheck_always_on=false brave_channel=\"nightly\" google_api_key=\"****token\" brave_product_name=\"Brave\" brave_project_name=\"brave\" brave_version_major=\"1\" brave_version_minor=\"7\" brave_version_build=\"10\" chrome_version_string=\"80.0.3987.116\" chrome_version_major=\"80\" webcompat_report_api_endpoint=\"https://webcompat.brave.com/1/webcompat\" enable_cdm_host_verification=false skip_signing=true target_os=\"ios\" enable_dsyms=false enable_stripping=false use_xcode_clang=true use_clang_coverage=false ios_deployment_target=\"12.0\" ios_enable_code_signing=false cc_wrapper=\"/Users/jenkins/jenkins/workspace/ser-build-pr_sync_fix_obj_id_dup/src/brave/script/redirect-cc.py\" "
15:32:58  ERROR at //build/timestamp.gni:31:19: Script returned non-zero exit code.
15:32:58  build_timestamp = exec_script(compute_build_timestamp,
15:32:58                    ^----------
15:32:58  Current dir: /Users/jenkins/jenkins/workspace/ser-build-pr_sync_fix_obj_id_dup/src/out/ios_Release/
15:32:58  Command: python /Users/jenkins/jenkins/workspace/ser-build-pr_sync_fix_obj_id_dup/src/build/compute_build_timestamp.py official
15:32:58  Returned 1.
15:32:58  stderr:
15:32:58  
15:32:58  Traceback (most recent call last):
15:32:58    File "/Users/jenkins/jenkins/workspace/ser-build-pr_sync_fix_obj_id_dup/src/build/compute_build_timestamp.py", line 127, in <module>
15:32:58      sys.exit(main())
15:32:58    File "/Users/jenkins/jenkins/workspace/ser-build-pr_sync_fix_obj_id_dup/src/build/compute_build_timestamp.py", line 113, in main
15:32:58      last_commit_timestamp = int(open(lastchange_file).read())
15:32:58  IOError: [Errno 2] No such file or directory: '/Users/jenkins/jenkins/workspace/ser-build-pr_sync_fix_obj_id_dup/src/build/util/LASTCHANGE.committime'
15:32:58  
15:32:58  See //base/BUILD.gn:34:1: whence it was imported.
15:32:58  import("//build/timestamp.gni")
15:32:58  ^-----------------------------
15:32:58  See //BUILD.gn:70:5: which caused the file to be included.
15:32:58      "//base:base_perftests",
15:32:58      ^----------------------
15:32:58  null
15:32:58  null

@AlexeyBarabash AlexeyBarabash deleted the sync_fix_obj_id_dup branch February 27, 2020 21:19
AlexeyBarabash added a commit that referenced this pull request Feb 27, 2020
Sync fix bookmarks object id duplication
AlexeyBarabash added a commit that referenced this pull request Feb 27, 2020
Sync fix bookmarks object id duplication
AlexeyBarabash added a commit that referenced this pull request Feb 27, 2020
Sync fix bookmarks object id duplication
AlexeyBarabash added a commit that referenced this pull request Mar 2, 2020
Sync fix bookmarks object id duplication
AlexeyBarabash added a commit that referenced this pull request Mar 2, 2020
Sync fix bookmarks object id duplication
AlexeyBarabash added a commit that referenced this pull request Mar 2, 2020
Sync fix bookmarks object id duplication
AlexeyBarabash added a commit that referenced this pull request Mar 3, 2020
Sync fix bookmarks object id duplication
@btlechowski
Copy link

btlechowski commented Mar 3, 2020

LGTM

Verification passed on

Brave 1.7.35 Chromium: 80.0.3987.122 (Official Build) nightly (64-bit)
Revision cf72c4c4f7db75bc3da689cd76513962d31c7b52-refs/branch-heads/3987@{#943}
OS Ubuntu 18.04 LTS
Brave 1.7.35 Chromium: 80.0.3987.122 (Official Build) nightly (64-bit)
Revision cf72c4c4f7db75bc3da689cd76513962d31c7b52-refs/branch-heads/3987@{#943}
OS Windows 7 Service Pack 1 (Build 7601.24544)

Reproduced the crash on 1.4.95

  • Verified the test plan from Duplicate sync object id of bookmarks brave-browser#8325 (comment), no crash
  • Verified no crash for bookmark folders.
  • Verified that only one bookmark(original bookmark) is being initially synced out of all bookmarks with the same id.
  • Verified that all bookmarks are eventually synced
  • Verified no crash with multiple bookmarks with the same id
  • Verified renaming the bookmarks works
  • Verified moving of the bookmarks works
  • Verified additional bookmarks are synced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug CI/skip-android Do not run CI builds for Android CI/skip-macos-x64 Do not run CI builds for macOS x64 feature/sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate sync object id of bookmarks
5 participants