Skip to content

ci: select-install.sh has the same blind pipe-status defects being fixed in select-e2e.sh #3669

Open

Description

Summary

hack/select-install.sh, the install-side companion to select-e2e.sh, carries the same three silent-failure defects being fixed in its sibling: line 95 NODES="$(yq ... | sort -u)" and line 96 FORWARD="$(build_forward_deps | sort -u)" both take the pipeline's exit status from sort, so a yq failure is invisible; line 106 find ... 2>/dev/null | sed | sort discards find's status and its stderr. In each case a broken index-build produces an empty result that the caller reads as a legitimate answer.

Why it matters

The mechanism is identical to the select-e2e fixes, but the blast radius is different and must be assessed on its own terms: this script decides which PACKAGES to install, not which suites to run. A silently-empty node or dependency index here degrades the install plan rather than the test selection, so the severity does not simply inherit from the select-e2e analysis.

Fix shape

The same shape the sibling adopts: capture each pipeline's producer separately, check its exit status, and fail loud (or fall back with a named, visible reason) instead of letting an empty index pass as a decision. A test harness already exists at hack/select-install_test.bats (18 tests), so the guards can be pinned the same way.

Activity

  1. added
    kind/bugCategorizes issue or PR as related to a bug
    area/ciIssues or PRs related to CI workflows, GitHub Actions, automation
    on Aug 8, 2026
  2. lexfrei commented on Aug 8, 2026

    @lexfrei
    ContributorAuthor

    One more defect in the same file, and this one weakens a check that runs in CI today. discover_suites guards only on the directory being absent ([ ! -d "$SUITES_DIR" ]), so an existing but EMPTY hack/e2e-chainsaw/ yields zero suites, the loop body never executes, and the --validate mapping check passes vacuously. The guard stops one state short of the one that matters: absent is caught, empty is not. This path is exercised on every make bats-unit-tests via hack/select-install_test.bats:105, so the vacuous-pass is live rather than hypothetical.

    Same shape as the empty-list defect being fixed in select-e2e.sh: an empty enumeration is treated as a legitimate answer rather than as a broken index. The fix belongs with the other three in this issue, and the fix shape is the same one adopted there, fail loud at the source of the list instead of letting an empty result flow into a consumer that reads it as "nothing to do".

  3. added
    triage/acceptedIndicates an issue is ready to be actively worked on
    priority/backlogGeneral backlog priority. Lower than priority/important-longterm
    and removed
    triage/needs-triageIndicates an issue needs triage by a maintainer
    on Sep 23, 2026
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

    area/ciIssues or PRs related to CI workflows, GitHub Actions, automationkind/bugCategorizes issue or PR as related to a bugpriority/backlogGeneral backlog priority. Lower than priority/important-longtermtriage/acceptedIndicates an issue is ready to be actively worked on

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions