Skip to content

fix(build): vendor Helm Go deps for hermetic Konflux builds - #282

Closed
nickboldt wants to merge 2 commits into
mainfrom
fix/RHIDP-16046-helm-gomod-vendor
Closed

fix(build): vendor Helm Go deps for hermetic Konflux builds#282
nickboldt wants to merge 2 commits into
mainfrom
fix/RHIDP-16046-helm-gomod-vendor

Conversation

@nickboldt

Copy link
Copy Markdown
Member

Summary

  • Vendor Helm external Go modules under vendor/helm/vendor/ for offline/hermetic builds
  • Run go mod tidy + go mod vendor in hack/update-vendor.sh after pruning Helm source
  • Build Helm with -mod=vendor in upstream and downstream Containerfiles
  • Tidies vendor/helm/go.mod (drops test-only requires)

Fixes Konflux/cachi2 build failure where go build could not resolve imports with GOPROXY=file:// and no network during RUN.

Ref: https://redhat.atlassian.net/browse/RHIDP-16046

Test plan

  • podman build --target helm-builder -f Containerfile . succeeds
  • GOPROXY=off go build -mod=vendor ./cmd/helm in vendor/helm succeeds
  • Konflux hermetic build passes on downstream pipeline

Generated-by: cursor

Konflux hermetic builds source cachi2.env with GOPROXY=file:// and no
network access during RUN. Building Helm from vendor/helm without
vendored external modules caused go build to fail resolving imports
(e.g. helm.sh/helm/v4/internal/plugin/cache).

Run go mod tidy and go mod vendor after pruning Helm source, commit the
vendor tree, and build with -mod=vendor in both Containerfiles so all
dependencies are available offline.

https://redhat.atlassian.net/browse/RHIDP-16046

Generated-by: cursor
Co-authored-by: Cursor <cursoragent@cursor.com>
The troubleshooting step passed all_changed_files through an environment
variable. Large vendor/helm/vendor/ diffs exceed the process argument
limit and fail before the image build runs.

Log the changed-file count and a 20-file git diff sample instead.

https://redhat.atlassian.net/browse/RHIDP-16046

Generated-by: cursor
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

PR images are available (for 1 week):

  1. quay.io/rhdh-community/rhdh-must-gather:pr-282
  2. quay.io/rhdh-community/rhdh-must-gather:pr-282-6b3ac74b1

@nickboldt
nickboldt marked this pull request as draft August 12, 2026 12:19
@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. Required by Prow. label Aug 12, 2026
@nickboldt nickboldt closed this Aug 12, 2026
@nickboldt

Copy link
Copy Markdown
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. Required by Prow.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants