Skip to content

recipe(cef): remove a half-cloned tree before a forced sync (#3062) - #29

Merged
zackees merged 2 commits into
mainfrom
recipe/cef-partial-checkout-3062
Oct 31, 2026
Merged

zackees merged 2 commits into
mainfrom
recipe/cef-partial-checkout-3062

Conversation

@zackees

@zackees zackees commented Oct 31, 2026

Copy link
Copy Markdown
Member

Refs obs-rust/obs-studio#3062 (the arm64 CEF build; no new archive yet).

RED

test_sync_replaces_a_checkout_left_without_chrome_version fails on main:
the sync step has no guard, so a tree left by a killed clone reaches
automate-git.py.

GREEN

recipes/cef/linux/build.sh sync now removes $WORK/chromium when
chromium/src exists without chrome/VERSION and --force-update was
passed after the architecture. tests/test_cef_recipe.py: 51 passed,
ruff check and ruff format --check clean, bash -n clean.

Why

Job 56 (cef-linux-sync-arm64-force, 2026-10-31) failed a second after it
started:

Exception: Path does not exist: /cef/work/chromium/src/chrome/VERSION
  File "/cef/work/automate-git.py", line 1485, in <module>
    current_version = read_chrome_version_file(chromium_src_dir)

The earlier sync had been cancelled mid-clone. automate-git.py calls
read_chrome_version_file() for the --no-chromium-history check before it
reaches the --force-update branch that would delete_directory() and
re-clone, so the force flag never got a chance to work. The recipe clears the
broken tree itself, gated on --force-update so an ordinary sync still
reports a partial tree instead of silently discarding it.

Not part of this PR: the archive itself. The re-synced run (bosn job 58) is
in progress on the worker host.

…#3062)

automate-git.py reads the existing tree's version before it honours
--force-update, so a sync killed mid-clone left a tree the next forced sync
died on with `Path does not exist: .../chromium/src/chrome/VERSION` instead
of re-cloning it. The test pins the guard the sync step needs, before the
automate call.
A tick on #3062 hit job 56: the arm64 sync died at once with
`Exception: Path does not exist: /cef/work/chromium/src/chrome/VERSION`.
The previous attempt had been killed mid-clone, and automate-git.py checks
the existing tree with read_chrome_version_file() before it reaches the
--force-update path that would delete and re-clone chromium/src.

The sync step now removes $WORK/chromium itself when chromium/src exists
without chrome/VERSION and --force-update was requested. Without
--force-update a partial tree is still a plain error, so a normal sync does
not silently discard a checkout it did not ask to replace.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant