Skip to content

fix(release): copy vendor tarball into kodata instead of symlink#1791

Merged
tekton-robot merged 1 commit into
tektoncd:mainfrom
jkhelil:fix/release-ko-kodata-symlink
Jul 10, 2026
Merged

fix(release): copy vendor tarball into kodata instead of symlink#1791
tekton-robot merged 1 commit into
tektoncd:mainfrom
jkhelil:fix/release-ko-kodata-symlink

Conversation

@jkhelil

@jkhelil jkhelil commented Jul 10, 2026

Copy link
Copy Markdown
Member

Changes

ko v0.19.0 enforces that kodata/ symlinks must not resolve outside the
kodata root (ko-build/ko#1619), a deliberate security hardening. This broke
the run-ko step in our release pipeline, which symlinked
cmd/*/kodata/source.tar.gz to a tarball in an external mktemp -d
directory:

Error: error processing import paths in ".../config/100-deployment.yaml":
error resolving image references: tarring kodata: kodata symlink
".../cmd/controller/kodata/source.tar.gz" resolves to "/tmp/tmp.gGIAFn/source.tar.gz"
which is outside the kodata root ".../cmd/controller/kodata"

This surfaced during a v0.28.0 patch release after bumping the pinned
ko image digest for Go 1.26.4 support (#1778), which pulled in ko v0.19.1.

Fix: copy the vendor tarball into each cmd/*/kodata/ directory instead of
symlinking to it from a shared tmpdir. ko already dereferences symlinks
and embeds the resolved file's bytes into the image layer when tarring
kodata, so this has no effect on the final image size — only the symlink
itself was rejected, not the underlying content.

Applied the same fix to the historical examples/releases/v0.3.0-build-chains-taskrun.yaml
for consistency, since it has the identical pattern.

Note: tektoncd/pipeline's tekton/publish.yaml has the same unfixed
pattern and is pinned to the same ko v0.19.1 image family, so it's likely
exposed to the same issue.

Submitter Checklist

  • Has Tests included if any functionality added or changed — N/A, release pipeline script fix
  • Follows the commit message standard
  • Meets the Tekton contributor standards
  • Has a kind label. You can add one by adding a comment on this PR that contains /kind bug
  • Release notes block below has been updated with any user facing changes
Fix release pipeline `ko resolve` failure caused by `ko` >= v0.19.0 rejecting
the `kodata/source.tar.gz` symlink used to bundle vendored source.

Made with Cursor

@tekton-robot tekton-robot requested review from lcarva and wlynch July 10, 2026 06:55
@tekton-robot tekton-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 10, 2026
ko v0.19.0 enforces that kodata symlinks must not resolve outside
the kodata root (ko-build/ko#1619). The run-ko step symlinked
cmd/*/kodata/source.tar.gz to a file in an external tmpdir, which
ko now rejects, breaking patch-release image publishing.

Copy the tarball into each kodata/ directory instead. ko already
dereferences symlinks when tarring kodata, so this has no effect
on final image size.

Signed-off-by: Jawed khelil <jkhelil@redhat.com>
Assisted-by: Claude Sonnet 5 (via Cursor)
Co-authored-by: Cursor <cursoragent@cursor.com>
@jkhelil jkhelil force-pushed the fix/release-ko-kodata-symlink branch from 0768afa to 8f3f118 Compare July 10, 2026 06:56
@tekton-robot tekton-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 10, 2026
@anithapriyanatarajan

Copy link
Copy Markdown
Contributor

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 10, 2026
@tekton-robot

Copy link
Copy Markdown

[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 Jul 10, 2026
@tekton-robot tekton-robot merged commit 9c53753 into tektoncd:main Jul 10, 2026
18 checks passed
@jkhelil

jkhelil commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

/cherry-pick release-v0.28.x

@tekton-robot

Copy link
Copy Markdown

Cherry-pick to release-v0.28.x successful!

A new pull request has been created to cherry-pick this change to release-v0.28.x.

PR: #1792

Please review and merge the cherry-pick PR.

@jkhelil

jkhelil commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

We cant wait for ko-build/ko#1698 to be release

@ngelman1

Copy link
Copy Markdown
Contributor

/cherry-pick release-v0.26.x

@ngelman1

Copy link
Copy Markdown
Contributor

/cherry-pick release-v0.27.x

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. 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.

5 participants