Skip to content

Strip Go symbol table from release binaries#2843

Merged
tekton-robot merged 1 commit intotektoncd:mainfrom
alliasgher:issue-2109-strip-symbol-table
May 7, 2026
Merged

Strip Go symbol table from release binaries#2843
tekton-robot merged 1 commit intotektoncd:mainfrom
alliasgher:issue-2109-strip-symbol-table

Conversation

@alliasgher
Copy link
Copy Markdown
Contributor

Changes

Add -s to the goreleaser ldflags alongside the existing -w.

Per maintainer testing in #2109, building tkn with -s -w shrinks the binary from ~207MB to ~147MB (~30%) compared to the current -w-only default. The release pipeline already strips DWARF debug info via -w; adding -s additionally strips the Go symbol table, which is purely a size optimization for release artifacts.

Fixes part of #2109.

Submitter Checklist

  • Includes tests (n/a — release-config-only change)
  • Run the code checkers with make check (n/a — no Go code touched)
  • Regenerate the manpages, docs and go formatting with make generated (n/a)
  • Commit messages follow commit message best practices

Release Notes

Release binaries are now built with `-s` in addition to `-w`, reducing the `tkn` binary size by ~30%.

Adds -s to the goreleaser ldflags alongside the existing -w. Per
maintainer testing on tektoncd#2109, building with -s -w shrinks the tkn
binary from ~207MB to ~147MB (~30%) compared to the current -w-only
default.

Signed-off-by: alliasgher <alliasgher123@gmail.com>
@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label May 7, 2026
@tekton-robot tekton-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label May 7, 2026
@chmouel
Copy link
Copy Markdown
Member

chmouel commented May 7, 2026

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label May 7, 2026
Copy link
Copy Markdown
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

/lgtm

@tekton-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vdemeester

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

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 7, 2026
@tekton-robot tekton-robot merged commit 960f517 into tektoncd:main May 7, 2026
13 checks passed
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. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants