Skip to content

Conversation

@SaschaSchwarze0
Copy link
Member

@SaschaSchwarze0 SaschaSchwarze0 commented Dec 31, 2025

Changes

This fixes a problem with certain sources in the ko build strategy after the root file system was made readonly in #2020.

Basically for modules with dependencies but without vendoring, Go downloads the modules to the GOMODCACHE directory which is /go/pkg/mod by default. And that directory is not anymore writable.

I re-used the gocache volume as persistence here also makes sense for those that overwrite the volume.

/cc hasanawad94
/kind bug

Submitter Checklist

  • Includes tests if functionality changed/was added
  • Includes docs if changes are user-facing
  • Set a kind label on this PR
  • Release notes block has been filled in, or marked NONE

Release Notes

The ko build strategy is fixed for Go modules that have dependencies but no vendoring.

Signed-off-by: Sascha Schwarze <schwarzs@de.ibm.com>
@SaschaSchwarze0 SaschaSchwarze0 added this to the release-v0.19.0 milestone Dec 31, 2025
@openshift-ci openshift-ci bot requested a review from hasanawad94 December 31, 2025 11:39
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Dec 31, 2025
@openshift-ci openshift-ci bot added release-note Label for when a PR has specified a release note kind/bug Categorizes issue or PR as related to a bug. labels Dec 31, 2025
@SaschaSchwarze0 SaschaSchwarze0 changed the title Set GOMODCACHE to writable directory Set GOMODCACHE to writable directory in ko sample build strategy Dec 31, 2025
@qu1queee qu1queee self-requested a review January 5, 2026 14:09
Copy link
Contributor

@qu1queee qu1queee left a comment

Choose a reason for hiding this comment

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

/approve

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 5, 2026
@sayan-biswas
Copy link

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 20, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qu1queee, sayan-biswas

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

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. kind/bug Categorizes issue or PR as related to a bug. release-note Label for when a PR has specified a release note size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants