migrating CrOS repos from master->main

204 views
Skip to first unread message

Mike Frysinger

unread,
Nov 25, 2020, 4:02:56 PM11/25/20
to chromium-os-dev
as people might have noticed, we're in the process of migrating the git tip-of-tree development branch from "master" to "main".  this is a rolling process, and we're migrating repositories in groups to reduce risk & chances of user-visible breakage.  if you're interested, you can read more about it here:
https://docs.google.com/document/d/1isVGvU33xNC_yIFp8dLl3Kn6WtGj3g7lBceuq91-duU/

if you're running into problems locally and just want to resolve it to unblock your development, check out the user handbook embedded in the middle:

if you find a situation that isn't covered, feel free to post comments to the doc, or ask here on the mailing list, and we'll try to get it updated.
-mike

David Riley

unread,
Nov 25, 2020, 4:48:15 PM11/25/20
to Mike Frysinger, chromium-os-dev
This is when trying to upload a change platform/borealis.  I am posting it here because it mentions refs/heads/main, but the repo (at least my check out of it is) is still pointing to cros-internal/master.

Project list error on project chromiumos/repohooks: ManifestInvalidRevisionError: revision refs/heads/main in chromiumos/repohooks not found
ERROR: Traceback (most recent call last):
  File "/usr/local/google/home/davidriley/chromiumos/master/.repo/repo/project.py", line 749, in _ExecuteHookViaImport
    context['main'](**kwargs)
  File "/usr/local/google/home/davidriley/chromiumos/master/src/repohooks/pre-upload.py", line 2385, in main
    if _run_project_hooks(project, proj_dir=worktree):
  File "/usr/local/google/home/davidriley/chromiumos/master/src/repohooks/pre-upload.py", line 2350, in _run_project_hooks
    hook_error = hook(project, commit)
  File "/usr/local/google/home/davidriley/chromiumos/master/src/repohooks/pre-upload.py", line 626, in _check_keywords
    common_keywords = _read_terms_file(blocked_terms_file)
  File "/usr/local/google/home/davidriley/chromiumos/master/src/repohooks/pre-upload.py", line 605, in _read_terms_file
    for line in osutils.ReadFile(terms_file).splitlines():
  File "/usr/local/google/home/davidriley/chromiumos/master/chromite/lib/osutils.py", line 293, in ReadFile
    with open(path, 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'blocked_terms.txt'

Failed to run main() for pre-upload hook; see traceback above.

--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
https://groups.google.com/a/chromium.org/group/chromium-os-dev

Mike Frysinger

unread,
Nov 25, 2020, 4:54:47 PM11/25/20
to David Riley, chromium-os-dev
 Project list error on project chromiumos/repohooks: ManifestInvalidRevisionError: revision refs/heads/main in chromiumos/repohooks not found

sounds like you haven't run (a complete) `repo sync`.  please do so.  partial syncs are not supported.
-mike

Mike Frysinger

unread,
Dec 10, 2020, 1:53:59 PM12/10/20
to chromium-os-dev
i noticed that labels were getting reset on CLs during migration.  i think i can hack the scripts up to fix that moving forward, but unfortunately i can't go back on CLs already moved.
so if you had a CR+2 before, it needs to be re-added by reviewers.  sorry for the troubles.
-mike

Mike Frysinger

unread,
Dec 28, 2020, 4:24:46 PM12/28/20
to chromium-os-dev
good progress has been made since last i posted: we're ~80% complete for the internal manifest, and the majority of the ones left are third_party.  but before we have to make a final decision on those ...

i'm planning on migrating platform2 & autotest on Jan 4th 2021.
they're both large & active repos during normal times, but with the current holiday break, they've quieted down quite a bit.  Jan 4th is the last day of scheduled days off, so i want to use that window to migrate to minimize disruption.  if things go wrong, most people should be back on Jan 5th to help raise awareness.
-mike

On Wed, Nov 25, 2020 at 4:02 PM Mike Frysinger <vap...@chromium.org> wrote:

Mike Frysinger

unread,
Feb 12, 2021, 11:05:35 AM2/12/21
to chromium-os-dev
tl;dr if you use Gerrit notifications to watch CLs in specific branches, please double check your Chromium & Chrome queries for "branch:master" usage.

i noticed that i was missing notifications for CLs in repos which made me realize that a bunch of my Gerrit notification settings were broken after the master->main migration.  for example, i have a watch setup for CLs that match "project:chromiumos/manifest branch:master", but this repo no longer uses "master", so my query no longer matches anything.

i put together a script to convert user's notification settings in these two GoB instances.  i limited it to @chromium.org and @google.com users since it requires querying every account directly, and even then there were only ~20 accounts that used "branch:master" across both, so doesn't seem super common.
-mike

On Wed, Nov 25, 2020 at 4:02 PM Mike Frysinger <vap...@chromium.org> wrote:

Mike Frysinger

unread,
Mar 22, 2021, 4:20:32 PM3/22/21
to chromium-os-dev
we've passed the last user facing hurdle: our manifests are now on "main" only, and "master" is now defunct.

anyone with existing checkouts can run:
repo init -b main

anyone getting a new checkout shouldn't need to do anything different: repo will automatically pick the right default for you.
if you've been specifying -b master in your scripts, then you'll need to change that to main.

if you've been relying on the pseudo m/master ref, you'll also need to change that to m/main.

i've updated the user playbook to cover these things.
-mike

On Wed, Nov 25, 2020 at 4:02 PM Mike Frysinger <vap...@chromium.org> wrote:
Reply all
Reply to author
Forward
0 new messages