Skip to content

[ML] Enforce zero warnings in debug Linux CI build - #3198

Open
edsavage wants to merge 3 commits into
elastic:mainfrom
edsavage:fix/werror-debug-linux-ci
Open

edsavage wants to merge 3 commits into
elastic:mainfrom
edsavage:fix/werror-debug-linux-ci

Conversation

@edsavage

@edsavage edsavage commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds -DCMAKE_COMPILE_WARNING_AS_ERROR=ON to the debug Linux x86_64 CI build step
  • PR [ML] Fix compiler warnings across the codebase #2985 reduced compiler warnings to zero on this configuration; this makes any regression an immediate build failure rather than silent accumulation
  • Scoped to the existing debug PR build step only — release and cross-compile configurations are unchanged

Test plan

  • Verify the debug Linux build step still passes with zero warnings
  • Introduce a deliberate warning locally to confirm the build fails with a clear error

Add -DCMAKE_COMPILE_WARNING_AS_ERROR=ON to the debug Linux x86_64 CI
build step. PR elastic#2985 reduced compiler warnings to zero on this
configuration; this flag makes any regression an immediate build failure
rather than a silent accumulation.

The flag is scoped to the existing debug PR build step only, leaving
release and cross-compile configurations unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@elasticsearchmachine

Copy link
Copy Markdown

Pinging @elastic/ml-core (Team:ML)

@edsavage
edsavage force-pushed the fix/werror-debug-linux-ci branch from 884b942 to 1eab514 Compare September 17, 2026 03:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The remaining feedback is a non-blocking test-coverage nit.

Pull request overview

Enforces zero compiler warnings in the Linux x86_64 debug CI build.

Changes:

  • Enables CMAKE_COMPILE_WARNING_AS_ERROR=ON for the debug build.
  • Leaves release and cross-compile configurations unchanged.
File summaries
File Summary
.buildkite/pipelines/build_linux.json.py Adds warning-as-error enforcement; a non-blocking nit requests coverage verifying the flag remains scoped correctly.
Review details

Suppressed comments (1)

.buildkite/pipelines/build_linux.json.py:240

  • The existing pipeline-generator tests only assert that the debug step's label is present; they never inspect its environment. A later edit could remove this warning-as-error flag (or apply it to the wrong step) while all current tests still pass. Add coverage that finds the debug build step and asserts this flag is present, while the release/cross-compile steps remain unchanged.
              "CMAKE_FLAGS": "-DCMAKE_TOOLCHAIN_FILE=cmake/linux-x86_64.cmake -DML_FAST_DEBUG=ON -DCMAKE_UNITY_BUILD=ON -DML_PCH=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON",
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants