Skip to content

ENH: Add collapsible CI log sections for dashboard phases#5973

Draft
hjmjohnson wants to merge 2 commits intoInsightSoftwareConsortium:dashboardfrom
hjmjohnson:dash-board-github-ci-instrument-groupings
Draft

ENH: Add collapsible CI log sections for dashboard phases#5973
hjmjohnson wants to merge 2 commits intoInsightSoftwareConsortium:dashboardfrom
hjmjohnson:dash-board-github-ci-instrument-groupings

Conversation

@hjmjohnson
Copy link
Member

Summary

  • Adds ci_section_start() / ci_section_end() helper functions to itk_common.cmake
  • Wraps configure, build, test, coverage, memcheck, and submit phases in collapsible log sections
  • Detects CI environment via standard env vars and emits platform-appropriate markers:
    • GitHub Actions: ::group:: / ::endgroup::
    • Azure DevOps: ##[group] / ##[endgroup]
    • GitLab CI: ANSI escape section_start / section_end with [collapsed=true]
    • Local/other: plain --- Title --- delimiters

Motivation

Dashboard CI logs can be very long, making it hard to find the relevant phase (e.g., jumping straight to test failures). Collapsible sections let developers expand only the phase they care about.

References

Test plan

  • Verify collapsible sections appear correctly in GitHub Actions CI logs
  • Verify collapsible sections appear correctly in Azure DevOps CI logs
  • Verify local runs show plain --- Title --- delimiters

🤖 Generated with Claude Code

Wrap configure/build/test/coverage/memcheck/submit phases in
collapsible log sections so CI output is easier to navigate.

Detects the CI environment via standard environment variables
and emits the appropriate markers:
- GitHub Actions: ::group::/::endgroup::
- Azure DevOps: ##[group]/##[endgroup]
- GitLab CI: ANSI escape section_start/section_end (collapsed)
- Other/local: plain "--- Title ---" delimiters

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions bot added the type:Enhancement Improvement of existing methods or implementation label Mar 20, 2026
@hjmjohnson hjmjohnson requested a review from thewtex March 20, 2026 00:20
@hjmjohnson
Copy link
Member Author

@thewtex, @blowekamp, @dzenanz I am hoping that this will make navigating the CI infrastructure easier by breaking up the testing/building phases into sub-sections that can be hidden.

I'd love you feedback on this suggestion. I'll be away from the office for the next week, so my responses may be slow.

ctest_build() only exposes warning/error counts via NUMBER_WARNINGS
and NUMBER_ERRORS.  The actual compiler messages are written to
Build.xml for CDash submission but never printed to the CI log,
making it hard to see what went wrong without visiting CDash.

Add ci_report_build_diagnostics() which reads Build.xml after the
build step, extracts <Text> content from <Warning> and <Error>
elements, and prints them directly to stdout so they appear in
the CI log output.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@blowekamp
Copy link
Member

Is there a sample run to look at someplace?

I get the problem you are trying to solve, with the difficulty with the logs. And using the groups look like a nice approach.

I have wanted to split the ctest steps into senate CI steps. The current driver monolithically does all steps. CTest has Start, Update, Configure, Build, Test, Coverage, MemCheck, and Submit steps, were submit cat be run after many of the steps or in parts. Just having separate configure, build and test steps in the CI would help along too IMHO. This would do a similar thing.

I am not sure parsing the xml in the cmake code is the right things to do. Perhaps using that python script in the dashboard branch, and directly calling it similar to the other PR would better keep components separated.

@hjmjohnson
Copy link
Member Author

I am not sure parsing the xml in the cmake code is the right things to do. Perhaps using that python script in the dashboard branch, and directly calling it similar to the other PR would better keep components separated.

@blowekamp One benefit of parsing the XML is that it clearly list the exact warning or error that causes the build indicate failure AFTER the regular expressions had been filtered out. It should make adding specific regex easier to debug.

I like your idea of moving the python script to the dashboard branch and making it part of the dashboard steps. I'll try that next week after some more testing in this draft mode.

hjmjohnson added a commit to hjmjohnson/ITK that referenced this pull request Mar 20, 2026
Point all CI pipelines at hjmjohnson/ITK dash-board-github-ci-instrument-groupings
branch instead of upstream dashboard to test collapsible CI log sections
and build diagnostics reporting from PR InsightSoftwareConsortium#5973.

This commit must NOT be merged — revert the dashboard clone URL
before merging PR InsightSoftwareConsortium#5971.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@hjmjohnson
Copy link
Member Author

Attempt to use dashboard to review this PR

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

Labels

type:Enhancement Improvement of existing methods or implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants