fix(ci): dev-deps clone retry + shared build.sh sibling-mount fix #40

Merged
Breadway merged 2 commits from fix/dev-deps-clone-retry into main 2026-09-28 06:21:58 +08:00
Owner

Part of ECO-38. Two CI infra fixes found while rolling ECO-38 out past the pilot:

  1. dev-deps.sh: retry transient git clone/fetch failures. breadbar's first real dev-release run on main failed after ~3 minutes with no diagnosable cause (Forgejo's API exposes no job log endpoint). A clean local reproduction of the exact same steps succeeded without any code changes, and there was no other job running on the shared runner at the time. Wraps the initial clone and the owned-clone refresh fetch in a small retry helper (3 attempts, exponential backoff from 3s).

  2. ci/build.sh: mount REPO_ROOT's parent, not REPO_ROOT itself. Discovered rolling dev-deps.sh out to breadbox, the first multi-crate-workspace consumer. dev-deps.sh's default DEV_DEPS_DIR is a true sibling of the app checkout, but the shared dockerized build script only ever bind-mounted the checkout itself, so breadbar's PR worked around that by forcing DEV_DEPS_DIR inside the checkout. That workaround breaks on any consumer that is itself a Cargo workspace (breadbox, breadclip, breadpad, breadsearch, breadarr, breadcast): Cargo attributes a sibling clone nested inside the checkout's own workspace directory tree to the OUTER workspace for field-inheritance purposes, failing with "workspace.package.edition was not defined" the instant the outer workspace doesn't define that field. Mounting the parent directory instead keeps the sibling clone a genuine, non-nested sibling on both sides of the bind mount, matching a developer's own local sibling checkout. Verified both the normal --locked release build (no dev-deps.sh involved) and a dev-mode build (dev-deps.sh with its default sibling DEV_DEPS_DIR) against a real breadbox checkout, dockerized, end to end.

Consumers using the docker wrapper need no Cargo.toml or check.yml structural change for fix 2 beyond bumping their pinned ci/bread-ecosystem.rev once this merges, and dropping any DEV_DEPS_DIR override in favor of the script's default. breadbar itself is a single crate (no [workspace]), so it never hit this bug and is left as merged.

Part of ECO-38. Two CI infra fixes found while rolling ECO-38 out past the pilot: 1. **dev-deps.sh: retry transient git clone/fetch failures.** breadbar's first real dev-release run on main failed after ~3 minutes with no diagnosable cause (Forgejo's API exposes no job log endpoint). A clean local reproduction of the exact same steps succeeded without any code changes, and there was no other job running on the shared runner at the time. Wraps the initial clone and the owned-clone refresh fetch in a small retry helper (3 attempts, exponential backoff from 3s). 2. **ci/build.sh: mount REPO_ROOT's parent, not REPO_ROOT itself.** Discovered rolling dev-deps.sh out to breadbox, the first multi-crate-workspace consumer. dev-deps.sh's default DEV_DEPS_DIR is a true sibling of the app checkout, but the shared dockerized build script only ever bind-mounted the checkout itself, so breadbar's PR worked around that by forcing DEV_DEPS_DIR *inside* the checkout. That workaround breaks on any consumer that is itself a Cargo workspace (breadbox, breadclip, breadpad, breadsearch, breadarr, breadcast): Cargo attributes a sibling clone nested inside the checkout's own workspace directory tree to the OUTER workspace for field-inheritance purposes, failing with "workspace.package.edition was not defined" the instant the outer workspace doesn't define that field. Mounting the parent directory instead keeps the sibling clone a genuine, non-nested sibling on both sides of the bind mount, matching a developer's own local sibling checkout. Verified both the normal `--locked` release build (no dev-deps.sh involved) and a dev-mode build (dev-deps.sh with its default sibling DEV_DEPS_DIR) against a real breadbox checkout, dockerized, end to end. Consumers using the docker wrapper need no Cargo.toml or check.yml structural change for fix 2 beyond bumping their pinned `ci/bread-ecosystem.rev` once this merges, and dropping any `DEV_DEPS_DIR` override in favor of the script's default. breadbar itself is a single crate (no `[workspace]`), so it never hit this bug and is left as merged.
fix(dev-deps): retry transient git clone/fetch failures
All checks were successful
check / check (push) Successful in 2m52s
9639ac25f2
Part of ECO-38. breadbar's first real dev-release run on main failed
after ~3 minutes with no diagnosable cause: a clean local reproduction
of the exact same checkout/dev-deps.sh/build steps succeeded without
any changes. Since dev-deps.sh's own git clone/fetch of each
dependency repo is a single point of failure for every dev-track
build and PR check across the ecosystem, wrap it in a small retry
(3 attempts, exponential backoff) so a transient network blip on the
self-hosted runner doesn't fail the job outright.
fix(ci): mount REPO_ROOT's parent so sibling dev-deps clones resolve
All checks were successful
check / check (push) Successful in 2m40s
888d10228d
Part of ECO-38. Discovered while rolling dev-deps.sh out to breadbox
(the first multi-crate-workspace consumer): dev-deps.sh's default
DEV_DEPS_DIR is a true sibling of the app checkout, but ci/build.sh's
docker wrapper only ever bind-mounted the checkout itself, so the
sibling clone was invisible inside the container unless DEV_DEPS_DIR
was forced *inside* the checkout instead (breadbar's workaround).

That workaround breaks on any consumer that is itself a Cargo
workspace (breadbox, breadclip, breadpad, breadsearch, breadarr,
breadcast): a sibling clone nested inside the checkout's own
workspace directory tree gets attributed to the OUTER workspace by
Cargo's field-inheritance resolution, so any `foo.workspace = true`
in the nested clone's manifests fails with "workspace.package.foo
was not defined" the moment the checkout's own workspace root
doesn't define that field.

Mount REPO_ROOT's parent directory instead, with the container's cwd
set to that parent's REPO_ROOT subdirectory, so a true sibling clone
on the host is also a true sibling inside the container: no nested
workspace, no forced DEV_DEPS_DIR override needed. Verified both the
normal --locked release build (no dev-deps.sh at all) and the dev-mode
build (dev-deps.sh with its default sibling DEV_DEPS_DIR) against a
real breadbox checkout through this script, dockerized.
Breadway changed title from fix(dev-deps): retry transient git clone/fetch failures to fix(ci): dev-deps clone retry + shared build.sh sibling-mount fix 2026-09-28 01:52:34 +08:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Breadway/bread-ecosystem!40
No description provided.