[ci] deflake journald mock test + warn when shellcheck missing locally#68
Merged
Merged
Conversation
Two small fixes for the lessons that surfaced during this session's linter-gate work: 1. components/receivers/kernelevents/journald_test.go: TestJournaldSource_StreamsMockOutput's 2s deadline was tight on loaded macOS / CI runners — subprocess spawn + fixture read + goroutine schedule could miss it. Flaked on 5 of 5 PRs that exercised the full suite (#55, #60, #62, #63, #64). Bumped to 5s. The non-flake budget for "no record ever emitted" regressions stays well under the deadline; 5s just absorbs runner jitter. 2. Makefile actionlint target: actionlint silently skips run-block shellcheck when shellcheck isn't on PATH (macOS doesn't ship it by default). PR #62 passed `make actionlint` locally and then failed CI on 4 shellcheck findings. Added a presence check that prints brew/apt install hints; the underlying lint still runs. Verification: `make ci` exit 0 (no flake this run). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Tri Lam <trilamsr@gmail.com>
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.
What this PR does
Two small fixes that turn this session's lessons into code instead of
notes-to-self:
1. Deflake
TestJournaldSource_StreamsMockOutputThe 2s deadline for the mock-journalctl test was tight on loaded
macOS / CI runners — subprocess spawn + fixture read + goroutine
schedule could miss it. The test flaked on 5 of 5 PRs in this
session that exercised the full suite (#55, #60, #62, #63, #64).
Bumped the deadline 2s → 5s. The non-flake budget for "no record
ever emitted" regressions stays well under the deadline; 5s just
absorbs runner jitter without hiding real bugs.
2. Warn locally when
shellcheckisn't on PATHactionlintsilently skips run-block shellcheck when shellcheckisn't on PATH (macOS doesn't ship shellcheck by default). PR #62
passed
make actionlintlocally and then surfaced 4 shellcheckfindings in CI — exactly the failure mode the gate is supposed to
prevent.
make actionlintnow prints aWARNING: shellcheck not on PATH; actionlint will skip run-block shellcheck.line withbrew install/apt-get installhints when the binary is missing.The underlying lint still runs; the warning just makes the gap
visible to the macOS dev.
Linked issue(s)
No linked issue.
Release notes
Checklist
make ciexit 0 (test passes deterministically with new deadline)make actionlintshows the warning when shellcheck is uninstalled (verified locally)🤖 Generated with Claude Code