Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Issue 1303293002: Gclient with git cache: delete conflicting mirror. (Closed)

Created:
5 years, 4 months ago by tandrii(chromium)
Modified:
5 years, 4 months ago
CC:
chromium-reviews, dpranke+depot_tools_chromium.org, iannucci+depot_tools_chromium.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Gclient with git cache: delete conflicting mirror. Consider an SVN repo which was mirrored to git by git_updater. When SVN repo is migrated to github, the git histories of chromium mirror and new github one are different. As a result, hashes of the objects do not match. Before, gclient would just get stuck at trying to fetch the repo after changing its remote url with errors like this: ... [0:01:21] error: refs/heads/master does not point to a valid object! [0:01:21] error: refs/remotes/origin/HEAD does not point to a valid object! [0:01:21] error: refs/remotes/origin/master does not point to a valid object! [0:01:21] error: refs/heads/master does not point to a valid object! [0:01:21] error: refs/remotes/origin/HEAD does not point to a valid object! [0:01:21] error: refs/remotes/origin/master does not point to a valid object! [0:01:21] fatal: bad object HEAD [0:01:21] error: /b/git-cache/chromium.googlesource.com-external-github.com-google-open--vcdiff did not send all necessary objects The solution is to notice such state, delete the .git folder, and clone again. BUG=523239 R=akuegel@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=296417

Patch Set 1 #

Patch Set 2 : this seems to work #

Total comments: 4

Patch Set 3 : -gotcha #

Total comments: 1

Patch Set 4 : refacotring #

Patch Set 5 : refacotring #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -0 lines) Patch
M gclient_scm.py View 1 2 3 2 chunks +27 lines, -0 lines 2 comments Download

Messages

Total messages: 36 (14 generated)
tandrii(chromium)
5 years, 4 months ago (2015-08-21 14:29:27 UTC) #1
Adrian Kuegel
In general I think this approach should be fine. We can probably just fix it ...
5 years, 4 months ago (2015-08-21 14:34:54 UTC) #2
Adrian Kuegel
https://codereview.chromium.org/1303293002/diff/20001/gclient_scm.py File gclient_scm.py (right): https://codereview.chromium.org/1303293002/diff/20001/gclient_scm.py#newcode470 gclient_scm.py:470: self.Print("tAndrii31", "gotcha") Do you want to keep this in? ...
5 years, 4 months ago (2015-08-21 15:35:58 UTC) #3
Adrian Kuegel
Otherwise lgtm.
5 years, 4 months ago (2015-08-21 15:40:04 UTC) #4
tandrii(chromium)
fixed! https://codereview.chromium.org/1303293002/diff/20001/gclient_scm.py File gclient_scm.py (right): https://codereview.chromium.org/1303293002/diff/20001/gclient_scm.py#newcode470 gclient_scm.py:470: self.Print("tAndrii31", "gotcha") On 2015/08/21 15:35:58, Adrian Kuegel wrote: ...
5 years, 4 months ago (2015-08-21 15:40:15 UTC) #5
tandrii(chromium)
+hinoka who is today's MTV trooper, so that he reverts it in case of problems.
5 years, 4 months ago (2015-08-21 15:41:15 UTC) #7
Adrian Kuegel
https://codereview.chromium.org/1303293002/diff/40001/gclient_scm.py File gclient_scm.py (right): https://codereview.chromium.org/1303293002/diff/40001/gclient_scm.py#newcode465 gclient_scm.py:465: try: Just a small nit: couldn't you put these ...
5 years, 4 months ago (2015-08-21 15:41:16 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1303293002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1303293002/40001
5 years, 4 months ago (2015-08-21 15:41:29 UTC) #11
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1303293002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1303293002/80001
5 years, 4 months ago (2015-08-21 15:53:08 UTC) #15
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 4 months ago (2015-08-21 15:55:10 UTC) #17
tandrii(chromium)
Ryan, friendly ping :)
5 years, 4 months ago (2015-08-24 16:28:32 UTC) #18
Ryan Tseng
rs lgtm https://codereview.chromium.org/1303293002/diff/80001/gclient_scm.py File gclient_scm.py (right): https://codereview.chromium.org/1303293002/diff/80001/gclient_scm.py#newcode1057 gclient_scm.py:1057: if ('fatal: bad object HEAD' in e.stderr ...
5 years, 4 months ago (2015-08-24 22:40:46 UTC) #20
Vadim Sh.
I'll commit this, since I have CL that triggers exact same behavior and I don't ...
5 years, 4 months ago (2015-08-24 22:43:12 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1303293002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1303293002/80001
5 years, 4 months ago (2015-08-24 22:43:32 UTC) #24
Vadim Sh.
On 2015/08/24 22:43:36, Vadim Sh. wrote: > The CQ bit was unchecked by mailto:vadimsh@chromium.org Unchecked ...
5 years, 4 months ago (2015-08-24 22:44:52 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1303293002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1303293002/80001
5 years, 4 months ago (2015-08-24 22:45:02 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: depot_tools_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/depot_tools_presubmit/builds/155)
5 years, 4 months ago (2015-08-24 22:47:52 UTC) #30
hinoka
lgtm
5 years, 4 months ago (2015-08-24 22:52:33 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1303293002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1303293002/80001
5 years, 4 months ago (2015-08-24 22:54:02 UTC) #33
commit-bot: I haz the power
Committed patchset #5 (id:80001) as http://src.chromium.org/viewvc/chrome?view=rev&revision=296417
5 years, 4 months ago (2015-08-24 22:55:56 UTC) #34
Vadim Sh.
On 2015/08/24 22:55:56, commit-bot: I haz the power wrote: > Committed patchset #5 (id:80001) as ...
5 years, 4 months ago (2015-08-24 23:19:42 UTC) #35
tandrii(chromium)
5 years, 4 months ago (2015-08-25 08:00:52 UTC) #36
Message was sent while issue was closed.
https://codereview.chromium.org/1303293002/diff/80001/gclient_scm.py
File gclient_scm.py (right):

https://codereview.chromium.org/1303293002/diff/80001/gclient_scm.py#newcode1057
gclient_scm.py:1057: if ('fatal: bad object HEAD' in e.stderr
On 2015/08/24 22:40:46, Ryan Tseng wrote:
> This sort of error detection scares me :/.  Theres no way to know if it'll
carry
> over from version to verison.
> 
> though failing to run rev-list on HEAD should be signal enough that HEAD is
> broken somehow?
So, I thought this way:

best case -> it works
ok case -> the error changes, so our waterfall gets red. Oh well, not any worse
than now.
worst case -> the error is same, but for some other weird reason. Then we'll mv
.git to _bad_scm, even though we didn't have to. Still tolerable.

Powered by Google App Engine
This is Rietveld 408576698