Skip to content

[cherry-pick: release-v0.28.x] fix(release): copy vendor tarball into kodata instead of symlink#1792

Merged
tekton-robot merged 1 commit into
release-v0.28.xfrom
cherry-pick-1791-to-release-v0.28.x
Jul 10, 2026
Merged

[cherry-pick: release-v0.28.x] fix(release): copy vendor tarball into kodata instead of symlink#1792
tekton-robot merged 1 commit into
release-v0.28.xfrom
cherry-pick-1791-to-release-v0.28.x

Conversation

@tekton-robot

Copy link
Copy Markdown

This is a cherry-pick of #1791


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

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>
@tekton-robot tekton-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jul 10, 2026
@anithapriyanatarajan

Copy link
Copy Markdown
Contributor

/approve

@tekton-robot

Copy link
Copy Markdown
Author

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: anithapriyanatarajan

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:
  • OWNERS [anithapriyanatarajan]

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
@jkhelil

jkhelil commented Jul 10, 2026

Copy link
Copy Markdown
Member

fixed ko-build/ko#1698 but we cant wait fr it to be released

@jkhelil

jkhelil commented Jul 10, 2026

Copy link
Copy Markdown
Member

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 10, 2026
@tekton-robot
tekton-robot merged commit e1630a7 into release-v0.28.x Jul 10, 2026
15 of 16 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. 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.

3 participants