Skip to content

check-rd-presets.sh reports present presets as missing under load, blocking merges #4193

Closed as not planned

Description

@kvaps

hack/check-rd-presets.sh reports presets as missing when they are in the file, and the false failure blocks merges on unrelated PRs.

From #4185:

hack/check-rd-presets.sh: line 39: printf: write error: Broken pipe
FAIL: packages/system/mariadb-rd/cozyrds/mariadb.yaml resourcesPreset enum missing: c1.small

c1.small is in that file on main, and the script passes when run on the same head.

The check is printf '%s\n' "$enums" | grep -Fqx -- "$want" under set -euo pipefail. grep -q exits on the first match and closes the pipe while printf is still writing, printf fails with EPIPE, pipefail makes the pipeline non-zero, and ! reads that as not found. A value gets reported missing because it matched first. It is a race, so it fires under make -j4 in CI and not on a laptop.

The cost is not the red tick. Unit & controller tests is in needs for finalize, finalize gates e2e, so this turns the required E2E Tests context red on a PR that never failed a test. #4185, #4138 and #3539 are red this way right now. #4109, #4097, #3802 and #3594 are not, which is what a race looks like rather than a schema drift.

Fix is a here-string instead of the pipe. This is the only script under hack/ with pipefail and | grep -q.

PR here: #4194

Activity

  1. myasnikovdaniil commented on Sep 10, 2026

    @myasnikovdaniil
    Contributor

    Fixed in #4191, it carries your commit from #4142 with your authorship.

    I lifted it out of your branch instead of waiting for it, because this one reddens every pull request in the repo while #4142 is a feature that needs its own review time, and a one line fix should not sit behind that. Your commit is self contained and applies cleanly on its own, so cherry-picking it was the whole of it, nothing rewritten. Asked you in #4142 to drop 99d16a2 from that branch so it does not land twice.

    Numbers from the same window in case they help triage: 32 of the 48 unit-lane failures on pull requests between 09-04 and 09-10 were this, on 21 different branches. All 41 printf: write error: Broken pipe lines name line 39, and the count of accused presets equals the count of broken pipes in the same job every time, which is what tells it apart from a truncated jq read.

    Guard is there too, list doubled past 4 MiB like your repro. It also pins -x and -F, neither of which a fixture that just omits a value can see.

  2. kvaps commented on Sep 10, 2026

    @kvaps
    MemberAuthor

    Duplicate of #4178, which names the same line, gives the same analysis and predates this by a day. I filed without searching first, my mistake. The fix is #4194 and I have re-pointed it at #4178.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage/needs-triageIndicates an issue needs triage by a maintainer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions