Skip to content

Upgrade Go to 1.26.3 and update dependencies across functions#1251

Merged
liamfallon merged 6 commits into
kptdev:mainfrom
Nordix:upgrade-go-1.26.3-20260521
May 25, 2026
Merged

Upgrade Go to 1.26.3 and update dependencies across functions#1251
liamfallon merged 6 commits into
kptdev:mainfrom
Nordix:upgrade-go-1.26.3-20260521

Conversation

@aravindtga
Copy link
Copy Markdown
Contributor

@aravindtga aravindtga commented May 21, 2026

Motivation

This aligns the catalog dependency versions to the latest, preparing for a unified workspace where all repos can build together without version conflicts.

Key dependency upgrades:

  • sigs.k8s.io/kustomize/api v0.20.1 → v0.21.1
  • sigs.k8s.io/kustomize/kyaml v0.20.1 → v0.21.1
  • k8s.io/apimachinery v0.34.1/v0.35.4 → v0.36.1
  • github.com/kptdev/kpt v1.0.0-beta.61 → v1.0.0-beta.64
  • github.com/imdario/mergo → dario.cat/mergo v1.0.2 (module path change)

Testing

  • make all passes (fix, vet, fmt, test, lint)

AI usage disclosure

  • AI assistance (Kiro CLI) was used to draft portions of this change, and this PR description.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 21, 2026

Deploy Preview for krm-function-catalog canceled.

Name Link
🔨 Latest commit d8f5cf5
🔍 Latest deploy log https://app.netlify.com/projects/krm-function-catalog/deploys/6a140b4869afe90008d4a706

Comment thread documentation/go.sum
Comment thread documentation/go.mod
@aravindtga aravindtga force-pushed the upgrade-go-1.26.3-20260521 branch from 43dfbe4 to 30523c3 Compare May 21, 2026 14:32
@aravindtga
Copy link
Copy Markdown
Contributor Author

This needs to be rebased on top #1245 for the documentation fix.

- Bumped Go version to 1.26.3
- Updated module dependencies
- Verified build passes for all modules

Signed-off-by: Aravindhan Ayyanathan <aravindhan.a@est.tech>
Signed-off-by: Aravindhan Ayyanathan <aravindhan.a@est.tech>
Signed-off-by: Aravindhan Ayyanathan <aravindhan.a@est.tech>
@aravindtga aravindtga force-pushed the upgrade-go-1.26.3-20260521 branch from 30523c3 to 603decc Compare May 21, 2026 16:53
@aravindtga aravindtga changed the title Upgrade Go to 1.26.3 Upgrade Go to 1.26.3 and update dependencies across functions May 21, 2026
@aravindtga aravindtga marked this pull request as ready for review May 21, 2026 17:06
@aravindtga aravindtga requested a review from liamfallon as a code owner May 21, 2026 17:06
Copilot AI review requested due to automatic review settings May 21, 2026 17:06
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the repository’s Go toolchain version and aligns a broad set of Go module dependencies across the catalog functions/scripts to reduce cross-repo/workspace version conflicts, including the kustomize/k8s dependency stack and the mergo module path change.

Changes:

  • Bump go directive across many modules to 1.26.3 and refresh dependency versions (kustomize, k8s.io, kpt, x/*, etc.).
  • Migrate github.com/imdario/mergo import usage to dario.cat/mergo where applicable.
  • Update several kyaml framework-based functions to use the newer ResourceList.Results patterns and refreshed dependency graph.

Reviewed changes

Copilot reviewed 27 out of 49 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/e2etest/go.mod Bumps Go version and refreshes e2e test module dependencies (kpt/k8s/kustomize stack).
scripts/generate_docs/main_test.go Formatting-only alignment in tests.
scripts/generate_docs/go.mod Bumps Go version and updates golang.org/x/text indirect dependency.
scripts/generate_docs/go.sum Updates checksums for refreshed dependencies.
scripts/generate_docs/generate_docs.go Formatting cleanup; minor whitespace fix in CutPrefix usage.
functions/go/upsert-resource/go.mod Bumps Go version and updates kyaml/testify and related indirect deps.
functions/go/upsert-resource/go.sum Updates checksums for refreshed dependencies.
functions/go/starlark/go.mod Bumps Go version and updates starlark/k8s/kustomize/kpt dependencies.
functions/go/sleep/go.mod Bumps Go version and updates kyaml to v0.21.1.
functions/go/sleep/go.sum Updates checksums for kyaml v0.21.1.
functions/go/set-namespace/transformer/namespace.go Refactors namespace pointer handling (currently introduces a compile error).
functions/go/set-namespace/go.mod Bumps Go version and updates k8s/kustomize/kpt dependency set.
functions/go/set-labels/go.mod Bumps Go version and updates k8s/kustomize/kpt dependency set.
functions/go/set-labels/go.sum Updates checksums for refreshed dependencies.
functions/go/set-image/go.mod Bumps Go version and updates k8s/kustomize/kpt dependency set.
functions/go/set-image/go.sum Updates checksums for refreshed dependencies.
functions/go/set-enforcement-action/main.go Updates kyaml framework result handling APIs/structures.
functions/go/set-enforcement-action/go.mod Bumps Go version and updates kyaml/testify and related indirect deps.
functions/go/set-annotations/go.mod Bumps Go version (dependency alignment for this function’s module).
functions/go/search-replace/main.go Updates kyaml framework result handling APIs/structures.
functions/go/search-replace/go.mod Bumps Go version and updates kyaml/doublestar/testify and related deps.
functions/go/render-helm-chart/third_party/sigs.k8s.io/kustomize/api/builtins/HelmChartInflationGenerator.go Switches mergo import path to dario.cat/mergo.
functions/go/render-helm-chart/go.mod Bumps Go version; updates mergo module path and dependency versions.
functions/go/remove-local-config-resources/main.go Updates kyaml framework result handling APIs/structures.
functions/go/remove-local-config-resources/main_test.go Updates tests to match new results return types.
functions/go/remove-local-config-resources/go.mod Bumps Go version and updates kyaml/testify and related indirect deps.
functions/go/no-op/go.mod Bumps Go version and updates k8s/kustomize/kpt dependency set.
functions/go/no-op/go.sum Updates checksums for refreshed dependencies.
functions/go/list-setters/go.mod Bumps Go version and updates kpt/kustomize dependency versions.
functions/go/kubeconform/go.mod Bumps Go version and updates cobra/kpt/kustomize dependency versions.
functions/go/kubeconform/go.sum Updates checksums for refreshed dependencies.
functions/go/generate-kpt-pkg-docs/go.mod Bumps Go version; updates some deps but leaves kpt/kyaml versions inconsistent with PR description.
functions/go/generate-kpt-pkg-docs/go.sum Updates checksums for refreshed dependencies.
functions/go/delete-annotations/go.mod Bumps Go version and updates k8s/kustomize/kpt dependency set.
functions/go/delete-annotations/go.sum Updates checksums for refreshed dependencies.
functions/go/apply-replacements/go.mod Bumps Go version and updates kustomize api/kyaml dependency versions.
functions/go/apply-replacements/go.sum Updates checksums for refreshed dependencies.
functions/go/annotate-apply-time-mutations/go.mod Bumps Go version and updates apimachinery/kyaml dependency versions.
functions/go/annotate-apply-time-mutations/go.sum Updates checksums for refreshed dependencies.
documentation/go.mod Updates doc toolchain dependency (docsy).
documentation/go.sum Updates checksums for refreshed doc dependencies.
Comments suppressed due to low confidence (3)

functions/go/set-namespace/transformer/namespace.go:240

  • new(NestedStringOrDie(...)) is invalid Go syntax because new expects a type, not a function call result. This will not compile. Use a local variable and take its address, or allocate new(string) and assign the nested value into it before calling the visitor.
    functions/go/set-namespace/transformer/namespace.go:265
  • new(o.GetNamespace()) is invalid Go syntax because new expects a type, not a value/expression. This will not compile. Allocate a string and assign the namespace, or revert to the previous namespace := o.GetNamespace(); nsPtr := &namespace pattern.
    functions/go/generate-kpt-pkg-docs/go.mod:11
  • PR description says kpt is being upgraded to v1.0.0-beta.63 and kustomize/kyaml to v0.21.1, but this module still pins github.com/kptdev/kpt v1.0.0-beta.62.1 and sigs.k8s.io/kustomize/kyaml v0.20.1. If the goal is to align versions to avoid workspace conflicts, please update these to match the rest of the repo (or clarify in the PR description why this module must remain on older versions).
require (
	github.com/kptdev/kpt v1.0.0-beta.62.1
	github.com/kptdev/krm-functions-catalog/functions/go/list-setters v0.0.0-20251006065330-cad54762e815
	github.com/olekukonko/tablewriter v0.0.5
	github.com/stretchr/testify v1.11.1
	sigs.k8s.io/kustomize/kyaml v0.20.1
)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread functions/go/set-namespace/transformer/namespace.go
Signed-off-by: Aravindhan Ayyanathan <aravindhan.a@est.tech>
@aravindtga aravindtga force-pushed the upgrade-go-1.26.3-20260521 branch from 3341d7f to 3771db3 Compare May 22, 2026 14:19
Signed-off-by: Aravindhan Ayyanathan <aravindhan.a@est.tech>
@aravindtga aravindtga force-pushed the upgrade-go-1.26.3-20260521 branch from 3771db3 to 08128cb Compare May 22, 2026 15:06
Comment thread functions/go/list-setters/go.mod Outdated
Signed-off-by: Aravindhan Ayyanathan <aravindhan.a@est.tech>
@liamfallon liamfallon merged commit ccb8b3c into kptdev:main May 25, 2026
12 checks passed
@liamfallon liamfallon deleted the upgrade-go-1.26.3-20260521 branch May 25, 2026 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants