Repository navigation
test(buildkite): group log output by --- RUN - #7645
Conversation
|
Not sure this helped, although it does no harm: https://buildkite.com/ddev/ddev-macos-arm64-mutagen/builds/11483#01996764-07ac-45cc-a65c-3745741109fa Although successful tests are shown in the right place, failures still show after it I think. |
stasadev
left a comment
There was a problem hiding this comment.
I don't see any difference, but it doesn't harm.
840756d to
20db999
Compare
|
Tried another round. Will look at actual buildkite output. |
1b88efb to
cb64e84
Compare
|
I don't think this is going to be successful. The buildkite docs are at https://buildkite.com/docs/pipelines/configure/managing-log-output, esp "Creating section boundaries" Apparently the Giving up for now. |
## The Issue Buildkite test output has been showing test failures nested under the previous test's name instead of the actual failing test. This has been an ongoing issue for years where failure details appear misaligned in the build logs. ## How This PR Solves The Issue Removed inappropriate `---` markers from test execution echo statements in `.buildkite/test.sh`. Buildkite treats `---` as special markers for creating collapsible sections, so `echo "--- Running tests..."` was creating a section that all subsequent test output got nested under, causing failure details to appear under the wrong test name. Changed: - `echo "--- Running tests..."` → `echo "Running tests..."` - `echo "--- Running Windows installer tests first..."` → `echo "Running Windows installer tests first..."` The remaining `---` markers for testbot_maintenance.sh and sanetestbot.sh are intentional section headers for setup phases. ## Manual Testing Instructions 1. Run Buildkite build and observe test failure output 2. Verify failure details appear under the correct failing test name instead of the previous test ## Automated Testing Overview No new tests needed - this is a logging/output formatting fix that will be validated by existing CI runs. ## Release/Deployment Notes No deployment impact. This only affects Buildkite output formatting and improves debugging experience for failed tests. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Buildkite interprets lines starting with '---' as section markers, which was causing test failure output to be nested under the wrong test name. Go's test output naturally contains '--- PASS:' and '--- FAIL:' lines. This change pipes test output through sed to replace '--- ' with '=== ' at the beginning of lines, preventing Buildkite from treating them as section markers while preserving the readability of test results. The pipefail option ensures test exit codes are still properly captured.
Add '^^^ +++' after setup sections to ensure test output doesn't get nested under the 'running sanetestbot.sh' section. This closes all previous Buildkite sections before tests begin, ensuring test failures appear at the correct nesting level.
Go test output with '--- PASS:' and '--- FAIL:' creates useful collapsible sections in Buildkite. The real issue was unclosed setup sections, which is fixed by the '^^^ +++' section closer. This preserves the intended test result navigation while fixing the nesting problem.
Add section closer (^^^ +++) after each test result line to prevent subsequent test output from being nested under the previous test's section in Buildkite. This ensures that test failures appear under the correct test name rather than being nested under previous tests. The awk command detects lines starting with '--- PASS:', '--- FAIL:', or '--- SKIP:' and adds a section closer immediately after each one.
The awk approach created too many individual sections for every test and subtest, making the output overwhelming. Keep only the simple solution that closes setup sections with '^^^ +++' before tests begin. This should fix the original nesting issue without creating visual clutter.
…arkers" This reverts commit 8d49900.
cb64e84 to
aa8eebd
Compare
stasadev
left a comment
There was a problem hiding this comment.
Works for me.
I didn't test sed -u on Windows.
--- RUN


The Issue
Buildkite test output has been showing test failures nested under the previous test's name instead of the actual failing test. This has been an ongoing issue for years where failure details appear misaligned in the build logs.
Example: https://buildkite.com/ddev/macos-colima-vz/builds/4534#01996736-c75b-4c96-b51b-8a13b97b1b4d
How This PR Solves The Issue
"--- "with"=== ""=== RUN "with"--- RUN "(if this is not a sub-test, which contains a forward slash)Manual Testing Instructions
🤖 Generated with Claude Code