New issue
Advanced search Search tips

Issue 778315 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

cros_mark_as_stable tries to uprev a baseboard ebuild for two variants

Project Member Reported by pprabhu@chromium.org, Oct 25 2017

Issue description

Looks like it successfully pushed the uprev for overlay-variant-auron-paine.
In fact, the pushed uprev is in the tree:

commit 6d31e2ecc3f9985d436f97c107b2c08494abbcdb
Author: chrome-bot <chrome-bot@chromium.org>
Date:   Tue Oct 24 22:58:21 2017 -0700

    Marking set of ebuilds as stable
    
    Marking 9999 ebuild for chromeos-base/temp-metrics as stable.
    
    Change-Id: Ie97923cebf712c4b55846a9225401e224cbac734
    
    Marking 9999 ebuild for media-libs/arc-camera3-hal-intel-ipu3 as stable.
    
    Change-Id: If1da6398d2dc169acd246f08e8e38c88b8f1a42c

It then seems to have tried the same uprev for overlay-daisy (going by cwd of the rebase):


22:5822:58:21: INFO: For /b/c/cbuild/repository/src/overlays/overlay-variant-auron-paine, using description Marking set of ebuilds as stable
Marking 9999 ebuild for chromeos-base/temp-metrics as stable.
Change-Id: Ie97923cebf712c4b55846a9225401e224cbac734
Marking 9999 ebuild for media-libs/arc-camera3-hal-intel-ipu3 as stable.
Change-Id: If1da6398d2dc169acd246f08e8e38c88b8f1a42c
22:58:24: INFO: Successfully pushed /b/c/cbuild/repository/src/overlays/overlay-variant-auron-paine to cros merge_branch:refs/heads/master
cros_mark_as_stable: Unhandled exception:
Traceback (most recent call last):
  File "/b/c/cbuild/repository/chromite/bin/cros_mark_as_stable", line 169, in <module>
    DoMain()
  File "/b/c/cbuild/repository/chromite/bin/cros_mark_as_stable", line 165, in DoMain
    commandline.ScriptWrapperMain(FindTarget)
  File "/b/c/cbuild/repository/chromite/lib/commandline.py", line 911, in ScriptWrapperMain
    ret = target(argv[1:])
  File "/b/c/cbuild/repository/chromite/scripts/cros_mark_as_stable.py", line 292, in main
    staging_branch=options.staging_branch)
  File "/b/c/cbuild/repository/chromite/scripts/cros_mark_as_stable.py", line 127, in PushChange
    git.SyncPushBranch(cwd, remote_ref.remote, remote_ref.ref)
  File "/b/c/cbuild/repository/chromite/lib/git.py", line 1301, in SyncPushBranch
    RunGit(git_repo, ['rebase', rebase_target])
  File "/b/c/cbuild/repository/chromite/lib/git.py", line 821, in RunGit
    ['git'] + cmd, **kwargs)
  File "/b/c/cbuild/repository/chromite/lib/retry_util.py", line 244, in GenericRetry
    return _run()
  File "/b/c/cbuild/repository/chromite/lib/retry_util.py", line 177, in _Wrapper
    ret = func(*args, **kwargs)
  File "/b/c/cbuild/repository/chromite/lib/retry_util.py", line 243, in _run
    return functor(*args, **kwargs)
  File "/b/c/cbuild/repository/chromite/lib/cros_build_lib.py", line 654, in RunCommand
    raise RunCommandError(msg, cmd_result)
chromite.lib.cros_build_lib.RunCommandError: return code: 128; command: git rebase refs/remotes/cros/master
error: Could not open baseboard-poppy/media-libs/arc-camera3-hal-intel-ipu3/arc-camera3-hal-intel-ipu3-0.0.1-r83.ebuild: No such file or directory
error: Failed to merge in the changes.
First, rewinding head to replay your work on top of it...
Applying: Marking 9999 ebuild for media-libs/arc-camera3-hal-intel-ipu3 as stable.
Using index info to reconstruct a base tree...
A	baseboard-poppy/media-libs/arc-camera3-hal-intel-ipu3/arc-camera3-hal-intel-ipu3-0.0.1-r82.ebuild
Falling back to patching base and 3-way merge...
CONFLICT (rename/rename): Rename "baseboard-poppy/media-libs/arc-camera3-hal-intel-ipu3/arc-camera3-hal-intel-ipu3-0.0.1-r82.ebuild"->"baseboard-poppy/media-libs/arc-camera3-hal-intel-ipu3/arc-camera3-hal-intel-ipu3-9999.ebuild" in branch "HEAD" rename "baseboard-poppy/media-libs/arc-camera3-hal-intel-ipu3/arc-camera3-hal-intel-ipu3-0.0.1-r82.ebuild"->"baseboard-poppy/media-libs/arc-camera3-hal-intel-ipu3/arc-camera3-hal-intel-ipu3-0.0.1-r83.ebuild" in "Marking 9999 ebuild for media-libs/arc-camera3-hal-intel-ipu3 as stable."
Patch failed at 0001 Marking 9999 ebuild for media-libs/arc-camera3-hal-intel-ipu3 as stable.
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem, run "git rebase --continue".
If you prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".
cmd=['git', 'rebase', u'refs/remotes/cros/master'], cwd=/b/c/cbuild/repository/src/overlays/overlay-daisy
22:58:25: ERROR: 
https://uberchromegw.corp.google.com/i/chromeos/builders/master-paladin/builds/16702
 

Comment 1 by vapier@chromium.org, Oct 26 2017

i think the fundamental issue is that cros_mark_as_stable iterates over overlays, not over git repos

remember that we split things into "commit" and "push" phases.  the "commit" command succeeded in that log (and is what generated that commit).  it's the "push" command next that failed.

glancing at the code, i think it's because the code:
- first overlay processed is overlay-variant-auron-paine
  - it's in src/overlays/ git repo
  - there's a pending commit (6d31e2ecc3f9985d436f97c107b2c08494abbcdb)
  - push works
- second overlay processed  is overlay-daisy
  - it's in src/overlays/ git repo
  - there's a pending commit
  - push fails (since it already exists)
  - we fetch latest branch
  - we start a rebase on the assumption that the failure was due to someone else pushed something (like a chumped CL)
  - normally the git rebase would detect the commit was already applied and so we'd skip it
  - the git rebase fails for $some-reason internally (its heuristics failed)

probably best to break up the main loop into distinct commit & push codepaths instead of trying to share the for loop like we are now.  that'd allow us to maintain the commit approach to "i want to iterate all overlays" from the push approach "i want to iterate all git repos".

i'm trying hard to not rewrite this script because i know once i start, i'll just keep finding things :p.
uprev.log
214 KB View Download
Components: Build

Sign in to add a comment