cros_mark_as_stable: support CROS_WORKON_SUBDIR for older branches |
|||||
Issue descriptionThis firmwarebranch build: https://cros-goldeneye.corp.google.com/chromeos/healthmonitoring/buildDetails?buildbucketId=8934287315808578832 Produces this error during "cros_mark_as_stable": cros_mark_as_stable: Unhandled exception: Traceback (most recent call last): File "/b/swarming/w/ir/cache/cbuild/repository/chromite/bin/cros_mark_as_stable", line 169, in <module> DoMain() File "/b/swarming/w/ir/cache/cbuild/repository/chromite/bin/cros_mark_as_stable", line 165, in DoMain commandline.ScriptWrapperMain(FindTarget) File "/b/swarming/w/ir/cache/cbuild/repository/chromite/lib/commandline.py", line 912, in ScriptWrapperMain ret = target(argv[1:]) File "/b/swarming/w/ir/cache/cbuild/repository/chromite/scripts/cros_mark_as_stable.py", line 304, in main git_project_overlays, manifest, package_list) File "/b/swarming/w/ir/cache/cbuild/repository/chromite/scripts/cros_mark_as_stable.py", line 365, in _WorkOnCommit parallel.RunTasksInProcessPool(_CommitOverlays, inputs) File "/b/swarming/w/ir/cache/cbuild/repository/chromite/lib/parallel.py", line 809, in RunTasksInProcessPool queue.put((idx, input_args)) File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__ self.gen.next() File "/b/swarming/w/ir/cache/cbuild/repository/chromite/lib/parallel.py", line 750, in BackgroundTaskRunner queue.put(_AllTasksComplete()) File "/b/swarming/w/ir/cache/cbuild/repository/chromite/lib/parallel.py", line 750, in BackgroundTaskRunner queue.put(_AllTasksComplete()) File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__ self.gen.next() File "/b/swarming/w/ir/cache/cbuild/repository/chromite/lib/parallel.py", line 561, in ParallelTasks raise BackgroundFailure(exc_infos=errors) chromite.lib.parallel.BackgroundFailure: <type 'exceptions.AssertionError'>: Could not find repo project at /b/swarming/w/ir/cache/cbuild/workspace/src/third_party/u-boot/
,
Sep 27
,
Sep 28
I've been working through this, but don't yet understand. In general, the script seems to be looking one directory up from where it should in a variety of cases. In the above example, it should have been "u-boot/files".
,
Sep 28
oof, this is probably because of $CROS_WORKON_SUBDIR. we dropped support for that in issue 805569 .
,
Sep 28
,
Sep 28
Thanks, that's really useful, I can dig through your CLs to try and better understand. In your estimation, is it still feasible for TOT cros_mark_as_stable to support older branches? There are alternatives such as using a pinned version of the script that still has support for older branches.
,
Sep 28
i think so. it's not like we can't ever sunset this code ... random strawman: - start a new module (or maybe extend chromite.lib.repo_manifest) - add a helper func to get the version of the checkout - pull out portage_util.Ebuild.GetVersion to a more general util func - add a constant to that module to say what min checkout version we support - going by current EOL systems, we'd start it at R22 - add a helper to say "is checkout at least version X" - if version X is older than the constant from above, issue a warning so we know we can clean up some code - figure out what version CROS_WORKON_SUBDIR was removed - update cros_mark_as_stable/whatever to use that version info to see if it needs to handle CROS_WORKON_SUBDIR i suspect we're going to want this general framework as we write more utils that'll have to support older branches ...
,
Sep 29
I'm trying to think through the cleanest / easiest way to make this maintainable. I'm also debating not solving that problem yet and just running cros_mark_as_stable from the branch (or at least testing to see how well that works today), with a bug to follow up and do it right. I'd be okay with that if I had strong confidence in the bug being fixed soon.
,
Oct 1
CROS_WORKON_SUBDIR was removed in 10363.0.0.
This is the more useful backtrace:
chromite.lib.parallel.BackgroundFailure: <type 'exceptions.AssertionError'>: Could not find repo project at /b/swarming/w/ir/cache/cbuild/workspace/src/third_party/u-boot/
Traceback (most recent call last):
File "/b/swarming/w/ir/cache/cbuild/repository/chromite/lib/parallel.py", line 602, in TaskRunner
task(*x, **task_kwargs)
File "/b/swarming/w/ir/cache/cbuild/repository/chromite/lib/parallel.py", line 800, in <lambda>
fn = lambda idx, task_args: out_queue.put((idx, task(*task_args)))
File "/b/swarming/w/ir/cache/cbuild/repository/chromite/scripts/cros_mark_as_stable.py", line 489, in _WorkOnEbuild
manifest)
File "/b/swarming/w/ir/cache/cbuild/repository/chromite/lib/portage_util.py", line 932, in RevWorkOnEBuild
info = self.GetSourceInfo(srcroot, manifest)
File "/b/swarming/w/ir/cache/cbuild/repository/chromite/lib/portage_util.py", line 782, in GetSourceInfo
real_project = manifest.FindCheckoutFromPath(subdir_path)['name']
File "/b/swarming/w/ir/cache/cbuild/repository/chromite/lib/git.py", line 683, in FindCheckoutFromPath
raise AssertionError('Could not find repo project at %s' % (path,))
,
Oct 1
I believe the needs to be in either GetSourceInfo, or _ReadCrosWorkonVars. Those two seem harder to split out from portage_util, and I'm not yet sure what else would need to be updated.
,
Oct 5
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/chromite/+/3dbb2932da86d1e175e39e1f9a57d73609e2d16e commit 3dbb2932da86d1e175e39e1f9a57d73609e2d16e Author: Don Garrett <dgarrett@google.com> Date: Fri Oct 05 22:43:19 2018 portage_util: Readd CROS_WORKON_SUBDIR compatibility. CROS_WORKON_SUBDIR support was removed in https://crbug.com/805569 . This CL readds that support behind a conditional flag. That flag should be set only when processing branches older than 10363.0.0. This logic should be removed after all branches older than that are EOL'd (including firmware / factory). DO NOT SUBMIT, CONCEPT REVIEW ONLY. This version works against the daisy_skate branch, but still needs cleanup. BUG= chromium:890017 TEST=run_tests Change-Id: Ie7ac7f7fe137e6d99fb178e14f3d5a0fcae9066c Reviewed-on: https://chromium-review.googlesource.com/1257944 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Don Garrett <dgarrett@chromium.org> Reviewed-by: Don Garrett <dgarrett@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/3dbb2932da86d1e175e39e1f9a57d73609e2d16e/lib/portage_util_unittest.py [modify] https://crrev.com/3dbb2932da86d1e175e39e1f9a57d73609e2d16e/scripts/cros_mark_as_stable.py [modify] https://crrev.com/3dbb2932da86d1e175e39e1f9a57d73609e2d16e/lib/portage_util.py
,
Oct 5
Hopefully fixed, verification builds are running right now.
,
Oct 8
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by dgarr...@chromium.org
, Sep 27