Skip to content

fix(ci): shard package lists are truncated at a '#' — core-and-rest runs the whole workspace - #786

Open
ohdearquant wants to merge 1 commit into
ruvnet:mainfrom
ohdearquant:fix/ci-shard-package-lists
Open

fix(ci): shard package lists are truncated at a '#' — core-and-rest runs the whole workspace#786
ohdearquant wants to merge 1 commit into
ruvnet:mainfrom
ohdearquant:fix/ci-shard-package-lists

Conversation

@ohdearquant

Copy link
Copy Markdown
Contributor

What this fixes

packages: in the test job's matrix is a folded scalar (>-). YAML folds every
line of the block into one single-line string, and # inside a folded scalar is
ordinary content, not a comment. That string is pasted into the step's script by
${{ matrix.packages }} before bash parses it, and bash then treats the # as the
start of a comment and drops the rest of the line.

core-and-rest puts a comment on the second line of the block, so the intended
command

cargo nextest run --no-fail-fast --workspace --exclude photonlayer-core ...(99 excludes)

is actually run as

cargo nextest run --no-fail-fast --workspace

Every exclusion is dropped. The catch-all shard runs the whole workspace, including
all the crates that research-nightly, core-and-rest-heavy, core-and-rest-wasm,
ruvix, rvagent and the ml-research shards were created to hoist out of it. That
is the shard sitting at timeout-minutes: 240.

core-and-rest-wasm has the same construct, but its comment block is the last thing
in the scalar, so today only the comment is lost. It is one reordering away from
truncating the package list the same way.

The change

Both comment blocks move above the packages: key, where YAML reads them as
comments. The comment text is unchanged and no package list is edited.

How this was checked

Load the workflow, take each shard's resolved packages string, and paste it into a
shell script the way the runner does, then count the arguments bash actually produces:

shard args before args after
core-and-rest 4 202
core-and-rest-wasm 59 59
every other shard unchanged unchanged

After the change no packages value contains #.

Running the restored core-and-rest argument list locally (cargo nextest run --no-fail-fast plus the 199 restored words) links 227 test binaries and executes 3121
tests, so the exclusion list is accepted by cargo as written.

Note

Restoring the exclusions is necessary for that job to finish, but on its own it is not
sufficient: the job also stalls compiling ruvector-filter's test target, which is
addressed separately in #784. Both are needed before Tests (core-and-rest) reports a
real result rather than a timeout.

`packages:` in the test matrix is a folded scalar (`>-`), so every line in it
becomes part of one long single-line string, `#` included. That string is
substituted into the `run:` script by `${{ matrix.packages }}` before bash
parses it, and bash then reads the `#` as the start of a comment and discards
everything after it on that line.

For `core-and-rest` the comment sits on the second line of the block, so

    cargo nextest run --no-fail-fast --workspace --exclude photonlayer-core ... (99 more)

is executed as

    cargo nextest run --no-fail-fast --workspace

All 99 exclusions are dropped and the "catch-all" shard silently runs the
entire workspace, including every crate the other shards exist to hoist out of
it. That is the shard that has been hitting `timeout-minutes: 240`.

`core-and-rest-wasm` has the same construct but its comment is the last line
of the block, so only the comment itself is lost today; it is one reordering
away from truncating the package list.

Both comment blocks move above the `packages:` key, where YAML treats them as
comments. No package list changes.

Checked by loading the workflow and pasting each shard's resolved value into a
shell script the way the runner does: `core-and-rest` goes from 4 arguments to
202, `core-and-rest-wasm` is unchanged at 59, and no `packages` value contains
`#` any more.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant