[Draft][Speculative][AI-assisted] fix(externalsrc): disable oe-workdir symlinks to stop CI configure races#346
Draft
y3rsh wants to merge 1 commit into
Draft
[Draft][Speculative][AI-assisted] fix(externalsrc): disable oe-workdir symlinks to stop CI configure races#346y3rsh wants to merge 1 commit into
y3rsh wants to merge 1 commit into
Conversation
Parallel do_configure on monorepo externalsrc recipes races on the default oe-workdir symlink under one EXTERNALSRC checkout. Add opentrons-externalsrc and use it for all shared-tree robot recipes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Status: Draft, speculative, AI-assisted. Just want to keep track of similar failures and asked AI a suggestion of the fix @y3rsh has not even learned about if this fix is appropriate or viable.
Observed failures
Flex release image builds on
stage-prodhave failed intermittently inopentrons-update-serverand/oropentrons-usb-bridgedo_configurewith errors like:Confirmed failures (same oe-core commit
54bb342, monorepoedge, release/stage-prod):Other runs on the same commit (
54bb342) succeeded the same day (for example https://github.com/Opentrons/oe-core/actions/runs/29042185771, https://github.com/Opentrons/oe-core/actions/runs/29044848566, https://github.com/Opentrons/oe-core/actions/runs/29102798913), which is consistent with a timing race rather than a deterministic code defect.Root cause
Yocto
externalsrc.bbclassdefaults to:All Opentrons monorepo (and firmware) externalsrc recipes share one checkout (
/volumes/opentrons). Each recipe'sdo_configuretries to create the sameoe-workdirsymlink pointing at its own${WORKDIR}. When several robot-server recipes configure in parallel, they collide on that path.In the Jul 9 failure,
update-serverandusb-bridgestarteddo_configurein the same millisecond after earlier recipes had already claimed the symlink. Jul 10 was the same pattern with onlyupdate-serverfailing.Why had we not seen this before?
This looks like a latent race that became visible as the stack grew, not a single recent regression:
externalsrc_configure_prefuncat overlapping times. Most builds win the race and pass; failures are sporadic on the same oe-core SHA.auth-server,key-server,audit-server,system-server,robot-server,update-server,usb-bridge, etc.). Each addition increases paralleldo_configurepressure on the single sharedoe-workdirpath.auth-serverlanded in Jan 2026 (layers/meta-opentrons: Add auth-server, and set up nginx as a reverse proxy for it #263);key-serverin Mar 2026 (layers/meta-opentrons: key-server needs crypto #297);audit-serverwas touched again Jul 2026 (fix(audit-server): use global numpy for shared-data dependency #339). The Jul failures align with a configure wave that now includes more concurrent recipes than older builds.uv exportduringdo_configure, keeping configure tasks active longer and making overlap more likely than the older pipenv/micropipenv path.We likely had occasional flakes before but they were rare enough to dismiss as infra noise until two edge release builds failed back-to-back.
Fix
Add
opentrons-externalsrc.bbclasswithEXTERNALSRC_SYMLINKS = ""and switch all shared-tree robot recipes to inherit it instead of bareexternalsrc.Acceptance criteria:
oe-workdirconfigure failures on repeated runs.Test Plan and Hands on Testing
Build Flex image on github workflows(release / stage-prod) against monorepoedgeat least twice in a row.opentrons-update-serverandopentrons-usb-bridgedo_configuresucceed.No automated unit tests cover BitBake externalsrc symlink behavior.
Changelog
opentrons-externalsrcbbclass to disable defaultoe-workdir/oe-logssymlinks for shared externalsrc checkouts, avoiding parallel configure races in CI.Review requests
oe-workdiroroe-logssymlinks under the checkout.Risk assessment
Attention level: medium.
Disabling symlinks removes a Yocto convenience link from the source tree into each recipe workdir. Build artifacts remain under
${WORKDIR}as before; only the in-checkout symlinks are omitted. Blast radius is all externalsrc robot recipes (app servers, robot-app, mcu-firmware).