Skip to content

OCPBUGS-83863: Strip debug symbols from Go binaries#180

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
sdodson:strip-go-binaries
May 26, 2026
Merged

OCPBUGS-83863: Strip debug symbols from Go binaries#180
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
sdodson:strip-go-binaries

Conversation

@sdodson
Copy link
Copy Markdown
Member

@sdodson sdodson commented May 25, 2026

Summary

  • Add -s -w to ldflags in .promu.yml to strip DWARF debug info and symbol tables

Impact

The prometheus-node-exporter image (323 MB) contains one unstripped Go binary:

  • node_exporter (23.2 MB)

Stripping typically reduces Go binary size by 20-30%, reducing container image pull time during node scale-up.

Test plan

  • Verify image builds successfully
  • Verify binary is stripped
  • Verify node_exporter functions correctly

Add -s -w to ldflags in .promu.yml to strip DWARF debug info and
symbol tables. This typically reduces binary size by 20-30%, which
reduces container image pull time during node scale-up.

rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels May 25, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@sdodson: This pull request references Jira Issue OCPBUGS-83863, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Summary

  • Add -s -w to ldflags in .promu.yml to strip DWARF debug info and symbol tables

Impact

The prometheus-node-exporter image (323 MB) contains one unstripped Go binary:

  • node_exporter (23.2 MB)

Stripping typically reduces Go binary size by 20-30%, reducing container image pull time during node scale-up.

Test plan

  • Verify image builds successfully
  • Verify binary is stripped
  • Verify node_exporter functions correctly

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot requested review from marioferh and rexagod May 25, 2026 15:28
@simonpasquier
Copy link
Copy Markdown

/approve
/lgtm
/verified by tests

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label May 26, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@simonpasquier: This PR has been marked as verified by tests.

Details

In response to this:

/approve
/lgtm
/verified by tests

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@simonpasquier
Copy link
Copy Markdown

/retest-required

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label May 26, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 26, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sdodson, simonpasquier

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 26, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 26, 2026

@sdodson: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot Bot merged commit 278f5e5 into openshift:main May 26, 2026
10 checks passed
@openshift-ci-robot
Copy link
Copy Markdown

@sdodson: Jira Issue OCPBUGS-83863: Some pull requests linked via external trackers have merged:

The following pull request, linked via external tracker, has not merged:

All associated pull requests must be merged or unlinked from the Jira bug in order for it to move to the next state. Once unlinked, request a bug refresh with /jira refresh.

Jira Issue OCPBUGS-83863 has not been moved to the MODIFIED state.

This PR is marked as verified. If the remaining PRs listed above are marked as verified before merging, the issue will automatically be moved to VERIFIED after all of the changes from the PRs are available in an accepted nightly payload.

Details

In response to this:

Summary

  • Add -s -w to ldflags in .promu.yml to strip DWARF debug info and symbol tables

Impact

The prometheus-node-exporter image (323 MB) contains one unstripped Go binary:

  • node_exporter (23.2 MB)

Stripping typically reduces Go binary size by 20-30%, reducing container image pull time during node scale-up.

Test plan

  • Verify image builds successfully
  • Verify binary is stripped
  • Verify node_exporter functions correctly

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants