Skip to content

OCPBUGS-76319: Makefile: Strip debugging symbols by default#2196

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
tchap:strip-debugging-symbols
Feb 25, 2026
Merged

OCPBUGS-76319: Makefile: Strip debugging symbols by default#2196
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
tchap:strip-debugging-symbols

Conversation

@tchap
Copy link
Contributor

@tchap tchap commented Feb 6, 2026

You can still run make STRIP_DEBUGGING_SYMBOLS=false oc to skip that.

@openshift-ci-robot openshift-ci-robot added jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Feb 6, 2026
@openshift-ci-robot
Copy link

@tchap: This pull request references Jira Issue OCPBUGS-76319, which is invalid:

  • expected the bug to target the "4.22.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

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

Details

In response to this:

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 added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 6, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 6, 2026

No actionable comments were generated in the recent review. 🎉


Walkthrough

This pull request introduces a new build-time configuration to control debugging symbol stripping. A STRIP_DEBUGGING_SYMBOLS flag is added to the Makefile with conditional linker flags, and README documentation is updated to explain the feature.

Changes

Cohort / File(s) Summary
Build Configuration
Makefile
Introduces STRIP_DEBUGGING_SYMBOLS flag (defaults to true) and STRIP_DEBUGGING_SYMBOLS_FLAGS variable with -s -w linker options. Extends GO_LD_EXTRAFLAGS to append these flags to the linker configuration for binary optimization.
Documentation
README.md
Adds documentation explaining that debugging symbols are excluded by default during builds and provides the command to include them using STRIP_DEBUGGING_SYMBOLS=false.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

@tchap
Copy link
Contributor Author

tchap commented Feb 6, 2026

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Feb 6, 2026
@openshift-ci-robot
Copy link

@tchap: This pull request references Jira Issue OCPBUGS-76319, which is valid. The bug has been moved to the POST state.

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

In response to this:

/jira refresh

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-robot
Copy link

@tchap: This pull request references Jira Issue OCPBUGS-76319, which is valid.

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

In response to this:

I still need to verify what all needs to be done for this, starting with RPM for now.

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.

@tchap
Copy link
Contributor Author

tchap commented Feb 6, 2026

/retitle OCPBUGS-76319: Strip debugging symbols when releasing oc

@openshift-ci openshift-ci bot changed the title WIP: OCPBUGS-76319: Strip debugging symbols when releasing oc OCPBUGS-76319: Strip debugging symbols when releasing oc Feb 6, 2026
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 6, 2026
@tchap tchap force-pushed the strip-debugging-symbols branch 4 times, most recently from 97ed65d to 70c4537 Compare February 6, 2026 15:52
@openshift-ci-robot
Copy link

@tchap: This pull request references Jira Issue OCPBUGS-76319, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.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:

We don't want the debug RPM package, so I am setting -w -s in oc.spec directly.

For other cases, oc is being built using the included Dockerfiles, so I updated those as well.

go build is now passed -trimpath also so that there are no absolute file paths in the executable.

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.

@tchap
Copy link
Contributor Author

tchap commented Feb 8, 2026

/retest

You can still run `make STRIP_DEBUGGING_SYMBOLS=false oc` to skip that.
@tchap tchap force-pushed the strip-debugging-symbols branch from 70c4537 to 719e848 Compare February 16, 2026 11:01
@tchap tchap changed the title OCPBUGS-76319: Strip debugging symbols when releasing oc OCPBUGS-76319: Makefile: Strip debugging symbols by default Feb 16, 2026
@tchap
Copy link
Contributor Author

tchap commented Feb 16, 2026

@ardaguclu I greatly simplified the thing as requested, PTAL.

@ardaguclu
Copy link
Member

@ardaguclu I greatly simplified the thing as requested, PTAL.

Thank you. It looks good to me. Let's run the payload blocking jobs;

/payload 4.22 nightly blocking
/lgtm
/approve
/hold
until blocking jobs are green.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 16, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 16, 2026

@ardaguclu: trigger 14 job(s) of type blocking for the nightly release of OCP 4.22

  • periodic-ci-openshift-release-main-ci-4.22-e2e-aws-upgrade-ovn-single-node
  • periodic-ci-openshift-release-main-nightly-4.22-e2e-aws-ovn-upgrade-fips
  • periodic-ci-openshift-release-main-ci-4.22-e2e-azure-ovn-upgrade
  • periodic-ci-openshift-release-main-ci-4.22-upgrade-from-stable-4.21-e2e-gcp-ovn-rt-upgrade
  • periodic-ci-openshift-hypershift-release-4.22-periodics-e2e-aws-ovn-conformance
  • periodic-ci-openshift-release-main-nightly-4.22-e2e-aws-ovn-serial-1of2
  • periodic-ci-openshift-release-main-nightly-4.22-e2e-aws-ovn-serial-2of2
  • periodic-ci-openshift-release-main-ci-4.22-e2e-aws-ovn-techpreview
  • periodic-ci-openshift-release-main-ci-4.22-e2e-aws-ovn-techpreview-serial-1of3
  • periodic-ci-openshift-release-main-ci-4.22-e2e-aws-ovn-techpreview-serial-2of3
  • periodic-ci-openshift-release-main-ci-4.22-e2e-aws-ovn-techpreview-serial-3of3
  • periodic-ci-openshift-release-main-nightly-4.22-e2e-aws-ovn-upgrade-fips-no-nat-instance
  • periodic-ci-openshift-release-main-nightly-4.22-e2e-metal-ipi-ovn-ipv4
  • periodic-ci-openshift-release-main-nightly-4.22-e2e-metal-ipi-ovn-ipv6

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/efebbcb0-0b27-11f1-9af8-0484481bd74f-0

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 16, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 16, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ardaguclu, tchap

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 Feb 16, 2026
@ardaguclu
Copy link
Member

ardaguclu commented Feb 16, 2026

@sdodson mentioned that these changes could be backported to previous versions. Perhaps, once we land this PR in 4.22 and give it some soak time to catch any regressions, we can backport it down to 4.20?.

@sdodson
Copy link
Member

sdodson commented Feb 16, 2026

@sdodson mentioned that these changes could be backported to previous versions. Perhaps, once we land this PR in 4.22 and give it some soak time to catch any regressions, we can backport it down to 4.20?.

I don't think we're in a rush. How about four weeks between main and release-4.21, then another four weeks between release-4.21 and release-4.20? We'll still beat most wide adoption of 4.20 with that timeline.

@tchap
Copy link
Contributor Author

tchap commented Feb 17, 2026

/retest

@ardaguclu
Copy link
Member

This can wait until achknowledge-critical-fixes-only requirement is lifted
/hold

@ardaguclu
Copy link
Member

/hold cancel
/retest

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 24, 2026
@sdodson
Copy link
Member

sdodson commented Feb 24, 2026

/retest-required
Looks like this only has about a 50% pass rate, hard to envision this change causing those test failures but lets give it one more shot

@ardaguclu
Copy link
Member

/verified by CI

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

@ardaguclu: This PR has been marked as verified by CI.

Details

In response to this:

/verified by CI

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.

@ardaguclu
Copy link
Member

I think, this openshift/origin#30809 will fix the e2e-agnostic-ovn-cmd failure.

@sdodson
Copy link
Member

sdodson commented Feb 25, 2026

/override ci/prow/e2e-aws-ovn ci/prow/e2e-aws-ovn-upgrade
passed on previous runs no relevant changes to indicate that this PR has broken anything there

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 25, 2026

@sdodson: Overrode contexts on behalf of sdodson: ci/prow/e2e-aws-ovn, ci/prow/e2e-aws-ovn-upgrade

Details

In response to this:

/override ci/prow/e2e-aws-ovn ci/prow/e2e-aws-ovn-upgrade
passed on previous runs no relevant changes to indicate that this PR has broken anything there

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.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 25, 2026

@tchap: 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 5cbfaa5 into openshift:main Feb 25, 2026
17 checks passed
@openshift-ci-robot
Copy link

@tchap: Jira Issue Verification Checks: Jira Issue OCPBUGS-76319
✔️ This pull request was pre-merge verified.
✔️ All associated pull requests have merged.
✔️ All associated, merged pull requests were pre-merge verified.

Jira Issue OCPBUGS-76319 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓

Details

In response to this:

You can still run make STRIP_DEBUGGING_SYMBOLS=false oc to skip that.

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.

@tchap tchap deleted the strip-debugging-symbols branch February 25, 2026 14:34
@openshift-merge-robot
Copy link
Contributor

Fix included in accepted release 4.22.0-0.nightly-2026-02-26-092444

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/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. 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.

5 participants