Issue metadata
Sign in to add a comment
|
gerrit deps IndexError when hitting a commit not merged via gerrit |
||||||||||||||||||||||||
Issue description
$ ./gerrit deps 575579
gerrit: Unhandled exception:
Traceback (most recent call last):
File "./gerrit", line 168, in <module>
DoMain()
File "./gerrit", line 164, in DoMain
commandline.ScriptWrapperMain(FindTarget)
File "/usr/local/google/home/akeshet/chromiumos/chromite/lib/commandline.py", line 837, in ScriptWrapperMain
ret = target(argv[1:])
File "/usr/local/google/home/akeshet/chromiumos/chromite/scripts/gerrit.py", line 555, in main
functor(opts, *args)
File "/usr/local/google/home/akeshet/chromiumos/chromite/scripts/gerrit.py", line 310, in UserActDeps
visited_key=lambda cl: cl.gerrit_number)
File "/usr/local/google/home/akeshet/chromiumos/chromite/scripts/gerrit.py", line 281, in _BreadthFirstSearch
for child in children(node):
File "/usr/local/google/home/akeshet/chromiumos/chromite/scripts/gerrit.py", line 304, in _Children
change = _QueryChange(dep.ToGerritQueryText())[-1]
IndexError: list index out of range
,
Jul 19 2017
The time I experienced it, my CL did not have a CQ-DEPENDS. This is the CL that I experienced the problem with: https://chromium-review.googlesource.com/c/543904/ However, it no longer had the issue after some period of time. I'm not sure if it is flake, but it probably requires a rare set of conditions to co-align.
,
Jul 19 2017
My CL has CQ-DEPEND between internal and external gerrot. Is that the magic?
,
Jul 20 2017
neither of those have CQ-DEPENDS ;). but lets look at this one as it's been committed and is frozen at this point: https://chromium-review.googlesource.com/516323 it shows the IndexError looks like it's because it's using dep.ToGerritQueryText() and passing that directly as a gerrit search. when we have a gerrit CL # or ChangeId, it works. but when it hits some CLs, we end up searching via a git sha1 and gerrit doesn't return any results for some git sha1's. for example, looking at 516323 eventually comes up with this commit: https://crrev.com/885e5b9d9e44a3a2ab4a9751a061d3c3cec15611 but as you can see, that's a bot generated commit, so gerrit didn't see it, and gerrit doesn't return anything from its search. then again, i don't really expect the deps command to even have made it that far ... it should have aborted sooner since that isn't a "dep" in the sense that anyone cares about. yes, "deps" doesn't support *1234 syntax either, but that's a sep issue. it hasn't worked since the original implementation either.
,
Jul 20 2017
err, nm my "it went too far" comment. i had made a change locally to make it do that ;). but i imagine the end result is the same issue -- we're performing a search that turns up no hits and then the code fails.
,
Sep 26 2017
going to dupe into the newer bug where we triaged it more and resolved the issue. sorry, forgot that we had this one in the first place. |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by vapier@chromium.org
, Jul 19 2017