Skip to content

Use ifneq instead of ifndef for SKIP_DEBUG_BINARIES check#8039

Merged
yurishkuro merged 4 commits into
mainfrom
copilot/suppress-debug-build-ci
Feb 11, 2026
Merged

Use ifneq instead of ifndef for SKIP_DEBUG_BINARIES check#8039
yurishkuro merged 4 commits into
mainfrom
copilot/suppress-debug-build-ci

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 11, 2026

Changes

Addressed review feedback:

  1. Set SKIP_DEBUG_BINARIES to '0' explicitly (instead of empty string)

    • Changed: ${{ github.event_name == 'pull_request' && '1' || '' }}
    • To: ${{ github.event_name == 'pull_request' && '1' || '0' }}
  2. Move DEBUG_BINARY=1 to target definition

    • Added _build-platform-binaries-debug: DEBUG_BINARY=1 on the target line
    • Removed DEBUG_BINARY=1 from the make invocation
    • This ensures manual runs of make _build-platform-binaries-debug also get debug builds

Behavior

All scenarios tested and working:

  • ✅ SKIP_DEBUG_BINARIES not set → debug builds run with DEBUG_BINARY=1
  • ✅ SKIP_DEBUG_BINARIES=0 → debug builds run with DEBUG_BINARY=1
  • ✅ SKIP_DEBUG_BINARIES=1 → debug builds skipped
  • ✅ Manual make _build-platform-binaries-debug → debug builds run with DEBUG_BINARY=1

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Add SKIP_DEBUG_BINARIES environment variable that can be set to skip building
debug versions of binaries. Set this variable only for pull_request events in
the Build Binaries workflow to save ~4+ minutes per architecture.

Debug builds still run on main branch, merge groups, and during release workflows.

Co-authored-by: yurishkuro <[email protected]>
Copilot AI changed the title [WIP] Suppress building debug images during PR CI Skip debug binary builds on PRs to save CI time Feb 11, 2026
Copilot AI requested a review from yurishkuro February 11, 2026 17:17
@yurishkuro yurishkuro marked this pull request as ready for review February 11, 2026 17:18
@yurishkuro yurishkuro requested a review from a team as a code owner February 11, 2026 17:18
Copilot AI review requested due to automatic review settings February 11, 2026 17:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to reduce CI time by skipping the “debug” variant of binary builds (built with -gcflags="all=-N -l") during pull_request workflows, while keeping debug builds enabled for main branch and release contexts.

Changes:

  • Add a Makefile guard to skip invoking the debug-binary build when SKIP_DEBUG_BINARIES is set.
  • Set SKIP_DEBUG_BINARIES in the ci-build-binaries.yml workflow for PR-triggered runs.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
scripts/makefiles/BuildBinaries.mk Adds a conditional around the recursive debug-binary build invocation.
.github/workflows/ci-build-binaries.yml Exports SKIP_DEBUG_BINARIES during the binary build step based on the event type.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/makefiles/BuildBinaries.mk Outdated
Comment thread .github/workflows/ci-build-binaries.yml Outdated
@yurishkuro yurishkuro added the changelog:ci Change related to continuous integration / testing label Feb 11, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.47%. Comparing base (3634402) to head (5bdce54).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8039   +/-   ##
=======================================
  Coverage   95.47%   95.47%           
=======================================
  Files         316      316           
  Lines       16756    16756           
=======================================
  Hits        15997    15997           
  Misses        593      593           
  Partials      166      166           
Flag Coverage Δ
badger_v1 9.16% <ø> (ø)
badger_v2 1.89% <ø> (ø)
cassandra-4.x-v1-manual 13.35% <ø> (ø)
cassandra-4.x-v2-auto 1.88% <ø> (ø)
cassandra-4.x-v2-manual 1.88% <ø> (ø)
cassandra-5.x-v1-manual 13.35% <ø> (ø)
cassandra-5.x-v2-auto 1.88% <ø> (ø)
cassandra-5.x-v2-manual 1.88% <ø> (ø)
clickhouse 1.97% <ø> (ø)
elasticsearch-6.x-v1 17.19% <ø> (ø)
elasticsearch-7.x-v1 17.22% <ø> (ø)
elasticsearch-8.x-v1 17.37% <ø> (ø)
elasticsearch-8.x-v2 1.89% <ø> (ø)
elasticsearch-9.x-v2 1.89% <ø> (ø)
grpc_v1 8.40% <ø> (ø)
grpc_v2 1.89% <ø> (ø)
kafka-3.x-v2 1.89% <ø> (ø)
memory_v2 1.89% <ø> (ø)
opensearch-1.x-v1 17.26% <ø> (ø)
opensearch-2.x-v1 17.26% <ø> (ø)
opensearch-2.x-v2 1.89% <ø> (ø)
opensearch-3.x-v2 1.89% <ø> (ø)
query 1.89% <ø> (ø)
tailsampling-processor 0.54% <ø> (ø)
unittests 94.15% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Change from `ifndef SKIP_DEBUG_BINARIES` to `ifneq ($(SKIP_DEBUG_BINARIES),1)`
to make the check more explicit. This clearly shows we're checking if the
variable equals "1" rather than relying on the subtle behavior of ifndef
with empty strings. Both work the same way, but ifneq is more readable.

Co-authored-by: yurishkuro <[email protected]>
Copilot AI changed the title Skip debug binary builds on PRs to save CI time Use ifneq instead of ifndef for SKIP_DEBUG_BINARIES check Feb 11, 2026
Copilot AI requested a review from yurishkuro February 11, 2026 17:29
Comment thread .github/workflows/ci-build-binaries.yml Outdated
env:
# Skip debug binaries on PRs to save CI time (4+ min per arch)
# Debug binaries are still built on main branch and during releases
SKIP_DEBUG_BINARIES: ${{ github.event_name == 'pull_request' && '1' || '' }}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

let's set to 0 explicitly instead of blank

Suggested change
SKIP_DEBUG_BINARIES: ${{ github.event_name == 'pull_request' && '1' || '' }}
SKIP_DEBUG_BINARIES: ${{ github.event_name == 'pull_request' && '1' || '0' }}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 5bdce54. Changed to explicitly use '0' instead of empty string for non-PR events.

Comment thread scripts/makefiles/BuildBinaries.mk Outdated
# invoke make recursively such that DEBUG_BINARY=1 can take effect
# skip debug builds if SKIP_DEBUG_BINARIES is set to 1 (e.g., during PRs to save CI time)
ifneq ($(SKIP_DEBUG_BINARIES),1)
$(MAKE) _build-platform-binaries-debug GOOS=$(GOOS) GOARCH=$(GOARCH) DEBUG_BINARY=1
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

shouldn't DEBUG_BINARY=1 flag be set on L161 instead, e.g.

_build-platform-binaries-debug: DEBUG_BINARY=1
_build-platform-binaries-debug: \
	build-jaeger \
	build-remote-storage

? Otherwise if someone manually runs make _build-platform-binaries-debug they will not actually get debug builds.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 5bdce54. Moved DEBUG_BINARY=1 to the target definition line. Now manual runs of make _build-platform-binaries-debug will also get debug builds.

…arget

1. Set SKIP_DEBUG_BINARIES to '0' instead of '' for non-PR events
2. Move DEBUG_BINARY=1 to target definition instead of invocation

This ensures manual runs of `make _build-platform-binaries-debug` also
get debug builds, and makes the workflow logic more explicit.

Co-authored-by: yurishkuro <[email protected]>
Copilot AI review requested due to automatic review settings February 11, 2026 17:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@yurishkuro yurishkuro merged commit 6d8e4d0 into main Feb 11, 2026
61 checks passed
@yurishkuro yurishkuro deleted the copilot/suppress-debug-build-ci branch February 11, 2026 17:53
SoumyaRaikwar pushed a commit to SoumyaRaikwar/jaeger that referenced this pull request Feb 13, 2026
…ing#8039)

## Changes

Addressed review feedback:

1. **Set SKIP_DEBUG_BINARIES to '0' explicitly** (instead of empty
string)
   - Changed: `${{ github.event_name == 'pull_request' && '1' || '' }}`
   - To: `${{ github.event_name == 'pull_request' && '1' || '0' }}`
   
2. **Move DEBUG_BINARY=1 to target definition**
- Added `_build-platform-binaries-debug: DEBUG_BINARY=1` on the target
line
   - Removed `DEBUG_BINARY=1` from the make invocation
- This ensures manual runs of `make _build-platform-binaries-debug` also
get debug builds

## Behavior

All scenarios tested and working:
- ✅ SKIP_DEBUG_BINARIES not set → debug builds run with DEBUG_BINARY=1
- ✅ SKIP_DEBUG_BINARIES=0 → debug builds run with DEBUG_BINARY=1  
- ✅ SKIP_DEBUG_BINARIES=1 → debug builds skipped
- ✅ Manual `make _build-platform-binaries-debug` → debug builds run with
DEBUG_BINARY=1

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: yurishkuro <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:ci Change related to continuous integration / testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants