Skip to content

chore: update go version to 1.26.1#1932

Merged
Skarlso merged 3 commits into
open-component-model:mainfrom
Skarlso:update-go-version-1.26.1-2
Mar 10, 2026
Merged

chore: update go version to 1.26.1#1932
Skarlso merged 3 commits into
open-component-model:mainfrom
Skarlso:update-go-version-1.26.1-2

Conversation

@Skarlso

@Skarlso Skarlso commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it

Update the go version on the monorepo.

Which issue(s) this PR fixes

Testing

How to test the changes
Verification
  • I have tested the changes locally by running ocm

Summary by CodeRabbit

  • Chores

    • Upgraded the Go toolchain to 1.26.1 across modules and CI/build configs.
    • Updated builder base images to align with the new Go version.
    • Bumped lint tooling version in environment configuration.
  • Style

    • Added/adjusted lint annotations to address static analysis warnings.
  • No functional or API changes expected; builds now target the newer toolchain.

@Skarlso Skarlso requested a review from a team as a code owner March 9, 2026 15:15
@github-actions github-actions Bot added kind/chore chore, maintenance, etc. component/github-actions Changes on GitHub Actions or within `.github/` directory size/s Small labels Mar 9, 2026
@coderabbitai

coderabbitai Bot commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Updated Go toolchain from 1.25.7 → 1.26.1 across CI, many module go.mod files, and Docker builder images; bumped GOLANGCI_LINT_VERSION; added various //nolint annotations and small non-functional code formatting changes. No API or dependency changes.

Changes

Cohort / File(s) Summary
CI / Workflow
​.github/workflows/ci.yml
Update CI Go version from 1.25.71.26.1.
Bindings Go modules
bindings/go/*/go.mod, bindings/go/.../go.mod
Bumped go directive in many binding modules from 1.25.71.26.1; no changes to requires/replaces.
Other Go modules
cli/go.mod, cli/integration/go.mod, kubernetes/controller/go.mod, conformance/.../go.mod
Bumped go directive from 1.25.71.26.1.
Dockerfiles (builders)
kubernetes/controller/Dockerfile, conformance/.../Dockerfile
Replaced builder base images from golang:1.25.*golang:1.26.* (digests/tags updated).
Env / Tooling
.env
Updated GOLANGCI_LINT_VERSION v2.8.0v2.11.2.
Lint annotations & small source edits
bindings/go/cel/expression/fieldpath/builder.go, bindings/go/generator/ocmtypegen/main.go, bindings/go/oci/internal/lister/lister.go, bindings/go/oci/tar/oci_layout_tar_reader.go, bindings/go/plugin/..., cli/..., conformance/..., cli/internal/render/progress/*
Added/adjusted //nolint comments, normalized some file paths with filepath.Clean, changed some fmt.Sprintf→fmt.Fprintf calls, and minor error message formatting edits. No behavioral or API changes.

Sequence Diagram(s)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

size/l

Suggested reviewers

  • matthiasbruns
  • piotrjanik
  • fabianburth

Poem

🐰 I hopped from go-one-two-five to new,

Cleaned the paths and nudged a lint or two.
CI now hums a slightly newer song,
Modules march onward—steady and strong.
🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 77.78% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title 'chore: update go version to 1.26.1' directly and clearly summarizes the main change—updating the Go version across the monorepo from 1.25.7 to 1.26.1, as evidenced by the widespread updates across workflow files, go.mod files, and Dockerfiles.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)

369-369: Use the generator module’s version file instead of another hard-coded Go pin.

Within this PR, this is the one setup-go change that still hardcodes 1.26.1, so the next upgrade can leave code generation on a different toolchain than the module metadata. actions/setup-go supports go-version-file, and in v6 it will also honor a toolchain directive from go.mod, which keeps this job aligned with the generator module automatically. (github.com)

♻️ Suggested change
       - name: Setup Go (required by some generators)
         uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
         with:
-          go-version: '1.26.1'
+          go-version-file: '${{ github.workspace }}/bindings/go/generator/go.mod'
           cache-dependency-path: |
             ${{ github.workspace }}/bindings/go/generator/go.sum
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml at line 369, Replace the hard-coded setup for
actions/setup-go that uses go-version: '1.26.1' with the module-driven setting:
use the go-version-file (or allow v6 to pick up the toolchain from go.mod) so
the CI uses the generator module's version file automatically; locate the setup
step that includes the go-version key in the actions/setup-go invocation and
switch it to use go-version-file (pointing to the module's version file) or
remove the explicit go-version so the toolchain in go.mod is honored.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/ci.yml:
- Line 369: Replace the hard-coded setup for actions/setup-go that uses
go-version: '1.26.1' with the module-driven setting: use the go-version-file (or
allow v6 to pick up the toolchain from go.mod) so the CI uses the generator
module's version file automatically; locate the setup step that includes the
go-version key in the actions/setup-go invocation and switch it to use
go-version-file (pointing to the module's version file) or remove the explicit
go-version so the toolchain in go.mod is honored.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 08dd7965-a111-49d8-8266-8559e406fbd2

📥 Commits

Reviewing files that changed from the base of the PR and between 5b3f034 and ca2ea3f.

📒 Files selected for processing (29)
  • .github/workflows/ci.yml
  • bindings/go/blob/go.mod
  • bindings/go/cel/go.mod
  • bindings/go/configuration/go.mod
  • bindings/go/constructor/go.mod
  • bindings/go/credentials/go.mod
  • bindings/go/ctf/go.mod
  • bindings/go/dag/go.mod
  • bindings/go/descriptor/normalisation/go.mod
  • bindings/go/descriptor/runtime/go.mod
  • bindings/go/descriptor/v2/go.mod
  • bindings/go/generator/go.mod
  • bindings/go/helm/go.mod
  • bindings/go/input/dir/go.mod
  • bindings/go/input/file/go.mod
  • bindings/go/input/utf8/go.mod
  • bindings/go/oci/go.mod
  • bindings/go/oci/integration/go.mod
  • bindings/go/plugin/go.mod
  • bindings/go/repository/go.mod
  • bindings/go/rsa/go.mod
  • bindings/go/runtime/go.mod
  • bindings/go/signing/go.mod
  • bindings/go/transform/go.mod
  • cli/go.mod
  • cli/integration/go.mod
  • conformance/scenarios/sovereign/components/notes/go.mod
  • kubernetes/controller/Dockerfile
  • kubernetes/controller/go.mod

@Skarlso Skarlso force-pushed the update-go-version-1.26.1-2 branch from ca2ea3f to 077dfc4 Compare March 9, 2026 15:31

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)

366-371: LGTM with a minor observation.

The Go version update to 1.26.1 is correct. Note that this job hardcodes the Go version while other jobs use go-version-file to read from the module's go.mod. This creates a maintenance point that must be updated manually during future Go version bumps.

Consider referencing a go.mod file (e.g., bindings/go/generator/go.mod) via go-version-file for consistency, though this may not be feasible given the job's purpose.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml around lines 366 - 371, The workflow step "Setup Go
(required by some generators)" currently hardcodes go-version: '1.26.1'; update
this to use the actions/setup-go input go-version-file and point it to the
module's go.mod (e.g., bindings/go/generator/go.mod) so the Go version is read
from the file instead of being manually maintained, keeping the step that sets
cache-dependency-path intact and ensuring the uses: actions/setup-go@...
invocation remains unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 366-371: The workflow step "Setup Go (required by some
generators)" currently hardcodes go-version: '1.26.1'; update this to use the
actions/setup-go input go-version-file and point it to the module's go.mod
(e.g., bindings/go/generator/go.mod) so the Go version is read from the file
instead of being manually maintained, keeping the step that sets
cache-dependency-path intact and ensuring the uses: actions/setup-go@...
invocation remains unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b8a63d8f-7a11-4ec6-854e-76f0a5f069fc

📥 Commits

Reviewing files that changed from the base of the PR and between ca2ea3f and 077dfc4.

📒 Files selected for processing (30)
  • .github/workflows/ci.yml
  • bindings/go/blob/go.mod
  • bindings/go/cel/go.mod
  • bindings/go/configuration/go.mod
  • bindings/go/constructor/go.mod
  • bindings/go/credentials/go.mod
  • bindings/go/ctf/go.mod
  • bindings/go/dag/go.mod
  • bindings/go/descriptor/normalisation/go.mod
  • bindings/go/descriptor/runtime/go.mod
  • bindings/go/descriptor/v2/go.mod
  • bindings/go/generator/go.mod
  • bindings/go/helm/go.mod
  • bindings/go/input/dir/go.mod
  • bindings/go/input/file/go.mod
  • bindings/go/input/utf8/go.mod
  • bindings/go/oci/go.mod
  • bindings/go/oci/integration/go.mod
  • bindings/go/plugin/go.mod
  • bindings/go/repository/go.mod
  • bindings/go/rsa/go.mod
  • bindings/go/runtime/go.mod
  • bindings/go/signing/go.mod
  • bindings/go/transform/go.mod
  • cli/go.mod
  • cli/integration/go.mod
  • conformance/scenarios/sovereign/components/notes/Dockerfile
  • conformance/scenarios/sovereign/components/notes/go.mod
  • kubernetes/controller/Dockerfile
  • kubernetes/controller/go.mod
🚧 Files skipped from review as they are similar to previous changes (23)
  • cli/go.mod
  • bindings/go/descriptor/v2/go.mod
  • bindings/go/generator/go.mod
  • bindings/go/transform/go.mod
  • cli/integration/go.mod
  • bindings/go/oci/go.mod
  • bindings/go/credentials/go.mod
  • bindings/go/blob/go.mod
  • bindings/go/oci/integration/go.mod
  • bindings/go/helm/go.mod
  • kubernetes/controller/Dockerfile
  • bindings/go/configuration/go.mod
  • kubernetes/controller/go.mod
  • bindings/go/ctf/go.mod
  • bindings/go/descriptor/runtime/go.mod
  • bindings/go/descriptor/normalisation/go.mod
  • bindings/go/repository/go.mod
  • bindings/go/plugin/go.mod
  • bindings/go/runtime/go.mod
  • bindings/go/cel/go.mod
  • bindings/go/input/utf8/go.mod
  • bindings/go/signing/go.mod
  • bindings/go/dag/go.mod

@Skarlso Skarlso force-pushed the update-go-version-1.26.1-2 branch from 077dfc4 to 2a6be7e Compare March 9, 2026 15:36

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)

369-369: Avoid a second source of truth for the Go toolchain.

This hard-coded version can drift from the module metadata. actions/setup-go supports go-version-file and prefers a toolchain directive when one exists, so pointing this step at the generator module’s go.mod would keep CI aligned with the manifest used elsewhere. (github.com)

Suggested change
       - name: Setup Go (required by some generators)
         uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
         with:
-          go-version: '1.26.1'
+          go-version-file: '${{ github.workspace }}/bindings/go/generator/go.mod'
           cache-dependency-path: |
             ${{ github.workspace }}/bindings/go/generator/go.sum
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml at line 369, Replace the hard-coded go-version
value with the setup-go action's file-based/toolchain option so CI reads the Go
version from the module manifest; specifically, update the actions/setup-go step
(currently using the go-version key) to use go-version-file or toolchain
pointing at the generator module's go.mod so the workflow follows the module's
toolchain declaration instead of a separate literal version.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/ci.yml:
- Line 369: Replace the hard-coded go-version value with the setup-go action's
file-based/toolchain option so CI reads the Go version from the module manifest;
specifically, update the actions/setup-go step (currently using the go-version
key) to use go-version-file or toolchain pointing at the generator module's
go.mod so the workflow follows the module's toolchain declaration instead of a
separate literal version.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 88418a79-30f1-45d0-ba0f-154348959f93

📥 Commits

Reviewing files that changed from the base of the PR and between 077dfc4 and 2a6be7e.

📒 Files selected for processing (31)
  • .env
  • .github/workflows/ci.yml
  • bindings/go/blob/go.mod
  • bindings/go/cel/go.mod
  • bindings/go/configuration/go.mod
  • bindings/go/constructor/go.mod
  • bindings/go/credentials/go.mod
  • bindings/go/ctf/go.mod
  • bindings/go/dag/go.mod
  • bindings/go/descriptor/normalisation/go.mod
  • bindings/go/descriptor/runtime/go.mod
  • bindings/go/descriptor/v2/go.mod
  • bindings/go/generator/go.mod
  • bindings/go/helm/go.mod
  • bindings/go/input/dir/go.mod
  • bindings/go/input/file/go.mod
  • bindings/go/input/utf8/go.mod
  • bindings/go/oci/go.mod
  • bindings/go/oci/integration/go.mod
  • bindings/go/plugin/go.mod
  • bindings/go/repository/go.mod
  • bindings/go/rsa/go.mod
  • bindings/go/runtime/go.mod
  • bindings/go/signing/go.mod
  • bindings/go/transform/go.mod
  • cli/go.mod
  • cli/integration/go.mod
  • conformance/scenarios/sovereign/components/notes/Dockerfile
  • conformance/scenarios/sovereign/components/notes/go.mod
  • kubernetes/controller/Dockerfile
  • kubernetes/controller/go.mod
✅ Files skipped from review due to trivial changes (2)
  • bindings/go/descriptor/runtime/go.mod
  • .env
🚧 Files skipped from review as they are similar to previous changes (19)
  • bindings/go/repository/go.mod
  • bindings/go/transform/go.mod
  • bindings/go/oci/integration/go.mod
  • bindings/go/helm/go.mod
  • kubernetes/controller/Dockerfile
  • bindings/go/input/utf8/go.mod
  • conformance/scenarios/sovereign/components/notes/Dockerfile
  • bindings/go/plugin/go.mod
  • conformance/scenarios/sovereign/components/notes/go.mod
  • bindings/go/constructor/go.mod
  • cli/go.mod
  • bindings/go/generator/go.mod
  • bindings/go/cel/go.mod
  • bindings/go/oci/go.mod
  • bindings/go/input/dir/go.mod
  • bindings/go/configuration/go.mod
  • cli/integration/go.mod
  • bindings/go/rsa/go.mod
  • bindings/go/descriptor/v2/go.mod

@Skarlso Skarlso force-pushed the update-go-version-1.26.1-2 branch from 2a6be7e to 28a5c17 Compare March 9, 2026 16:11

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
bindings/go/cel/expression/fieldpath/builder.go (1)

19-19: Consider a more efficient alternative (optional).

The nolint:staticcheck suppresses a performance warning about using fmt.Sprintf for simple integer formatting. While the "consistency" justification is valid, using strconv.FormatInt or strconv.Itoa would be more efficient if this path is hot.

♻️ Optional: More efficient formatting
-			b.WriteString(fmt.Sprintf("[%d]", *segment.Index)) //nolint:staticcheck // leave it consistent with the rest
+			b.WriteByte('[')
+			b.WriteString(strconv.Itoa(*segment.Index))
+			b.WriteByte(']')

This eliminates the allocation from fmt.Sprintf. However, if consistency across the codebase is preferred, keeping the current approach with the nolint is acceptable.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@bindings/go/cel/expression/fieldpath/builder.go` at line 19, Replace the
fmt.Sprintf call inside the builder that currently does
b.WriteString(fmt.Sprintf("[%d]", *segment.Index)) to avoid the allocation:
build the bracketed integer more efficiently by converting *segment.Index with
strconv.Itoa (or strconv.FormatInt(int64(*segment.Index), 10) if the type is not
int) and writing the '[' + digits + ']' via b.WriteByte/WriteString calls;
update the call around segment.Index and b.WriteString to use strconv to improve
performance.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@bindings/go/signing/go.mod`:
- Line 3: The go.mod currently sets "go 1.26.1" which forces downstream modules
to require Go 1.26.1; if the intent was only to standardize the builder
toolchain, replace the "go 1.26.1" directive with a toolchain directive (e.g.,
add a "toolchain go1.26.1" line and revert "go" to the previously supported
version or a minimal compatible version) so published modules aren't constrained
— locate the "go 1.26.1" token in bindings/go/signing/go.mod and either lower
the "go" directive to the minimal required language version or add "toolchain
go1.26.1" to pin the builder while keeping the module's "go" version compatible.

---

Nitpick comments:
In `@bindings/go/cel/expression/fieldpath/builder.go`:
- Line 19: Replace the fmt.Sprintf call inside the builder that currently does
b.WriteString(fmt.Sprintf("[%d]", *segment.Index)) to avoid the allocation:
build the bracketed integer more efficiently by converting *segment.Index with
strconv.Itoa (or strconv.FormatInt(int64(*segment.Index), 10) if the type is not
int) and writing the '[' + digits + ']' via b.WriteByte/WriteString calls;
update the call around segment.Index and b.WriteString to use strconv to improve
performance.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 60eac404-3cfc-4ba1-ab69-5ba1bc996618

📥 Commits

Reviewing files that changed from the base of the PR and between 2a6be7e and 28a5c17.

📒 Files selected for processing (32)
  • .env
  • .github/workflows/ci.yml
  • bindings/go/blob/go.mod
  • bindings/go/cel/expression/fieldpath/builder.go
  • bindings/go/cel/go.mod
  • bindings/go/configuration/go.mod
  • bindings/go/constructor/go.mod
  • bindings/go/credentials/go.mod
  • bindings/go/ctf/go.mod
  • bindings/go/dag/go.mod
  • bindings/go/descriptor/normalisation/go.mod
  • bindings/go/descriptor/runtime/go.mod
  • bindings/go/descriptor/v2/go.mod
  • bindings/go/generator/go.mod
  • bindings/go/helm/go.mod
  • bindings/go/input/dir/go.mod
  • bindings/go/input/file/go.mod
  • bindings/go/input/utf8/go.mod
  • bindings/go/oci/go.mod
  • bindings/go/oci/integration/go.mod
  • bindings/go/plugin/go.mod
  • bindings/go/repository/go.mod
  • bindings/go/rsa/go.mod
  • bindings/go/runtime/go.mod
  • bindings/go/signing/go.mod
  • bindings/go/transform/go.mod
  • cli/go.mod
  • cli/integration/go.mod
  • conformance/scenarios/sovereign/components/notes/Dockerfile
  • conformance/scenarios/sovereign/components/notes/go.mod
  • kubernetes/controller/Dockerfile
  • kubernetes/controller/go.mod
✅ Files skipped from review due to trivial changes (2)
  • bindings/go/credentials/go.mod
  • kubernetes/controller/go.mod
🚧 Files skipped from review as they are similar to previous changes (20)
  • conformance/scenarios/sovereign/components/notes/Dockerfile
  • kubernetes/controller/Dockerfile
  • bindings/go/oci/go.mod
  • bindings/go/input/utf8/go.mod
  • .env
  • bindings/go/descriptor/normalisation/go.mod
  • bindings/go/descriptor/runtime/go.mod
  • bindings/go/generator/go.mod
  • bindings/go/plugin/go.mod
  • bindings/go/input/file/go.mod
  • bindings/go/constructor/go.mod
  • bindings/go/oci/integration/go.mod
  • cli/integration/go.mod
  • bindings/go/repository/go.mod
  • cli/go.mod
  • .github/workflows/ci.yml
  • bindings/go/helm/go.mod
  • bindings/go/ctf/go.mod
  • bindings/go/dag/go.mod
  • bindings/go/cel/go.mod

module ocm.software/open-component-model/bindings/go/signing

go 1.25.7
go 1.26.1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# Check the target file and nearby go.mod files
cat -n bindings/go/signing/go.mod

Repository: open-component-model/open-component-model

Length of output: 1247


🏁 Script executed:

# Find all go.mod files in the repository to understand versioning strategy
find . -name "go.mod" -type f | head -20

Repository: open-component-model/open-component-model

Length of output: 706


🏁 Script executed:

# Check if there are any other go.mod files in the bindings directory
cat -n bindings/go/go.mod 2>/dev/null || echo "No bindings/go/go.mod found"

Repository: open-component-model/open-component-model

Length of output: 112


🏁 Script executed:

# Search for any Go 1.26-specific features (generics, ranges on maps/int, etc.)
rg "range.*map|func\(.*\[.*\].*\)\(" bindings/go/signing/ || echo "No obvious Go 1.18+ generics found"

Repository: open-component-model/open-component-model

Length of output: 119


🌐 Web query:

Go 1.26 release notes toolchain directive go.mod minimum version

💡 Result:

  • Go 1.26 change (release notes): go mod init now writes a lower go version by default. If you run go mod init with Go 1.26.x, it creates go.mod with go 1.25.0; if you run it with a 1.26 pre-release (RC/beta), it uses go 1.24.0. This is meant to encourage new modules to remain compatible with currently supported Go versions. You can adjust afterward with go get go@version. [1]
  • What the go directive means (minimum version): The go line in go.mod sets the minimum Go version required to use/compile the module; since Go 1.21, this is mandatory/enforced (older toolchains refuse modules that require a newer Go version). [2]
  • What the toolchain directive means: The toolchain line declares a suggested toolchain to use when working in the main module; it can trigger automatic toolchain selection/switching when the default toolchain is older. It does not impose a requirement on dependent modules. If omitted, it’s treated as implicitly matching the go line (effectively toolchain go<version-from-go-line>). [2][3][4]

Sources: [1] Go 1.26 release notes; [2] go.mod file reference; [3] Go toolchains docs; [4] Go blog: toolchain management in Go 1.21.


🏁 Script executed:

# Check go directive versions across multiple go.mod files
for file in ./bindings/go/blob/go.mod ./bindings/go/cel/go.mod ./bindings/go/credentials/go.mod ./bindings/go/descriptor/v2/go.mod ./bindings/go/runtime/go.mod; do
  echo "=== $file ==="; head -3 "$file" 2>/dev/null | tail -1; done

Repository: open-component-model/open-component-model

Length of output: 322


🏁 Script executed:

# Check if go 1.26.1 appears in other binding modules
rg "^go 1\.26" bindings/go/ --type go

Repository: open-component-model/open-component-model

Length of output: 67


🏁 Script executed:

# Check if there's a root go.mod with version guidance
[ -f go.mod ] && head -5 go.mod || echo "No root go.mod"

Repository: open-component-model/open-component-model

Length of output: 99


Reconsider uniform go directive across published modules; use toolchain for builder version instead.

This appears to be a repo-wide change affecting all bindings modules. Setting go 1.26.1 as the minimum required version for each published module constrains all downstream consumers to Go 1.26.1, even if the code uses no Go 1.26-specific features. Go 1.26 release notes explicitly recommend lower minimum versions in new modules to avoid over-constraining compatibility.

If the intent is to standardize the build environment (CI/local development), use toolchain go1.26.1 without bumping the go directive. The toolchain directive only affects the main module's build, not dependent modules. If the intent is to genuinely require Go 1.26.1 for all consumers, that decision should be documented and applied intentionally across the project.

Suggested approach (if compatibility should be preserved)
-go 1.26.1
+go 1.25.0
+toolchain go1.26.1
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
go 1.26.1
go 1.25.0
toolchain go1.26.1
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@bindings/go/signing/go.mod` at line 3, The go.mod currently sets "go 1.26.1"
which forces downstream modules to require Go 1.26.1; if the intent was only to
standardize the builder toolchain, replace the "go 1.26.1" directive with a
toolchain directive (e.g., add a "toolchain go1.26.1" line and revert "go" to
the previously supported version or a minimal compatible version) so published
modules aren't constrained — locate the "go 1.26.1" token in
bindings/go/signing/go.mod and either lower the "go" directive to the minimal
required language version or add "toolchain go1.26.1" to pin the builder while
keeping the module's "go" version compatible.

@Skarlso Skarlso force-pushed the update-go-version-1.26.1-2 branch from 28a5c17 to 4dc1778 Compare March 9, 2026 16:38
@github-actions github-actions Bot added the size/m Medium label Mar 9, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (3)
cli/cmd/configuration/ocm_config.go (1)

165-166: Inconsistent path handling: cleaned path used for validation, but original returned.

The code applies filepath.Clean(env) for the os.Stat check but returns the original uncleaned env value. This could lead to inconsistent behavior if the environment variable contains non-canonical paths (e.g., with .. components or trailing slashes).

Consider returning the cleaned path for consistency:

 func getFromEnvironment() string {
 	if env := os.Getenv(OCMConfigEnvironmentKey); env != "" {
-		if _, err := os.Stat(filepath.Clean(env)); err == nil {
-			return env
+		cleanedPath := filepath.Clean(env)
+		if _, err := os.Stat(cleanedPath); err == nil {
+			return cleanedPath
 		}
 	}
 	return ""
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@cli/cmd/configuration/ocm_config.go` around lines 165 - 166, The code calls
filepath.Clean(env) when checking existence with os.Stat but returns the
original env, causing inconsistent path values; update the return to use the
cleaned path instead: compute cleaned := filepath.Clean(env), use cleaned in the
os.Stat call and return cleaned (reference symbols: filepath.Clean, os.Stat, env
variable) so callers always receive the canonicalized path.
bindings/go/generator/ocmtypegen/main.go (2)

234-234: Minor: goModPath is already cleaned.

The goModPath parameter originates from line 207 where it's already passed through filepath.Clean. This second call is redundant but doesn't affect correctness.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@bindings/go/generator/ocmtypegen/main.go` at line 234, The call to
filepath.Clean is redundant when opening the module file because goModPath has
already been cleaned earlier; update the os.Open invocation in main.go (where
file, err := os.Open(filepath.Clean(goModPath)) appears) to simply use
os.Open(goModPath) to remove the unnecessary second cleanup while keeping all
error handling and variable names (file, err) unchanged.

207-207: Minor: Redundant filepath.Clean after filepath.Join.

filepath.Join already normalizes the resulting path. However, the explicit filepath.Clean here is harmless and documents intent.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@bindings/go/generator/ocmtypegen/main.go` at line 207, The assignment to
goModPath uses filepath.Clean(filepath.Join(dir, "go.mod")), which redundantly
calls filepath.Clean because filepath.Join already normalizes paths; simplify by
removing the redundant Clean and assign goModPath := filepath.Join(dir,
"go.mod") (keep variable name goModPath and parameter dir intact) to make the
code clearer while preserving behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@bindings/go/plugin/manager/registries/input/registry.go`:
- Line 288: The nolint comment and call to plugins.StartLogStreamer(...) are
inconsistent: replace the passed context with the registry's manager context
(use r.ctx instead of context.TODO()) so log streaming uses the manager
lifecycle, i.e., update the call to plugins.StartLogStreamer(r.ctx, plugin) and
keep the existing comment; alternatively, if the intent is for an independent
context, update the comment to state that context.TODO() is intentional and why
(affecting plugins.StartLogStreamer and the registry variable r.ctx).

---

Nitpick comments:
In `@bindings/go/generator/ocmtypegen/main.go`:
- Line 234: The call to filepath.Clean is redundant when opening the module file
because goModPath has already been cleaned earlier; update the os.Open
invocation in main.go (where file, err := os.Open(filepath.Clean(goModPath))
appears) to simply use os.Open(goModPath) to remove the unnecessary second
cleanup while keeping all error handling and variable names (file, err)
unchanged.
- Line 207: The assignment to goModPath uses filepath.Clean(filepath.Join(dir,
"go.mod")), which redundantly calls filepath.Clean because filepath.Join already
normalizes paths; simplify by removing the redundant Clean and assign goModPath
:= filepath.Join(dir, "go.mod") (keep variable name goModPath and parameter dir
intact) to make the code clearer while preserving behavior.

In `@cli/cmd/configuration/ocm_config.go`:
- Around line 165-166: The code calls filepath.Clean(env) when checking
existence with os.Stat but returns the original env, causing inconsistent path
values; update the return to use the cleaned path instead: compute cleaned :=
filepath.Clean(env), use cleaned in the os.Stat call and return cleaned
(reference symbols: filepath.Clean, os.Stat, env variable) so callers always
receive the canonicalized path.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3781307e-3300-4147-878f-b5373a20f549

📥 Commits

Reviewing files that changed from the base of the PR and between 28a5c17 and 4dc1778.

📒 Files selected for processing (43)
  • .env
  • .github/workflows/ci.yml
  • bindings/go/blob/go.mod
  • bindings/go/cel/expression/fieldpath/builder.go
  • bindings/go/cel/go.mod
  • bindings/go/configuration/go.mod
  • bindings/go/constructor/go.mod
  • bindings/go/credentials/go.mod
  • bindings/go/ctf/go.mod
  • bindings/go/dag/go.mod
  • bindings/go/descriptor/normalisation/go.mod
  • bindings/go/descriptor/runtime/go.mod
  • bindings/go/descriptor/v2/go.mod
  • bindings/go/generator/go.mod
  • bindings/go/generator/ocmtypegen/main.go
  • bindings/go/helm/go.mod
  • bindings/go/input/dir/go.mod
  • bindings/go/input/file/go.mod
  • bindings/go/input/utf8/go.mod
  • bindings/go/oci/go.mod
  • bindings/go/oci/integration/go.mod
  • bindings/go/oci/internal/lister/lister.go
  • bindings/go/oci/tar/oci_layout_tar_reader.go
  • bindings/go/plugin/client/sdk/plugin.go
  • bindings/go/plugin/go.mod
  • bindings/go/plugin/manager/registries/input/registry.go
  • bindings/go/repository/go.mod
  • bindings/go/rsa/go.mod
  • bindings/go/runtime/go.mod
  • bindings/go/signing/go.mod
  • bindings/go/transform/go.mod
  • cli/cmd/configuration/ocm_config.go
  • cli/cmd/describe/types/render.go
  • cli/go.mod
  • cli/integration/go.mod
  • cli/internal/render/progress/bar/format.go
  • cli/internal/render/progress/tracker.go
  • conformance/scenarios/sovereign/components/notes/Dockerfile
  • conformance/scenarios/sovereign/components/notes/cmd/sovereign-notes-v1/main.go
  • conformance/scenarios/sovereign/components/notes/cmd/sovereign-notes/main.go
  • conformance/scenarios/sovereign/components/notes/go.mod
  • kubernetes/controller/Dockerfile
  • kubernetes/controller/go.mod
✅ Files skipped from review due to trivial changes (4)
  • conformance/scenarios/sovereign/components/notes/cmd/sovereign-notes/main.go
  • bindings/go/constructor/go.mod
  • conformance/scenarios/sovereign/components/notes/cmd/sovereign-notes-v1/main.go
  • bindings/go/cel/expression/fieldpath/builder.go
🚧 Files skipped from review as they are similar to previous changes (24)
  • bindings/go/plugin/go.mod
  • bindings/go/oci/integration/go.mod
  • bindings/go/runtime/go.mod
  • bindings/go/input/dir/go.mod
  • bindings/go/credentials/go.mod
  • .github/workflows/ci.yml
  • conformance/scenarios/sovereign/components/notes/go.mod
  • bindings/go/descriptor/v2/go.mod
  • bindings/go/generator/go.mod
  • bindings/go/dag/go.mod
  • bindings/go/configuration/go.mod
  • bindings/go/helm/go.mod
  • cli/integration/go.mod
  • bindings/go/blob/go.mod
  • kubernetes/controller/Dockerfile
  • conformance/scenarios/sovereign/components/notes/Dockerfile
  • bindings/go/descriptor/normalisation/go.mod
  • bindings/go/transform/go.mod
  • bindings/go/rsa/go.mod
  • bindings/go/input/utf8/go.mod
  • bindings/go/signing/go.mod
  • .env
  • cli/go.mod
  • bindings/go/ctf/go.mod

// start log streaming once the plugin is up and running.
// use the baseCtx here from the manager here so the streaming isn't stopped when the request is stopped.
go plugins.StartLogStreamer(context.TODO(), plugin)
go plugins.StartLogStreamer(context.TODO(), plugin) //nolint:gosec // G118 - using manager's base context so log streaming outlives the request

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Mismatch between nolint comment and actual code.

The comment states "using manager's base context" but the code passes context.TODO(). The registry has r.ctx available (the manager's base context from line 37). If the intent is to use the manager's context for proper lifecycle management:

-	go plugins.StartLogStreamer(context.TODO(), plugin) //nolint:gosec // G118 - using manager's base context so log streaming outlives the request
+	go plugins.StartLogStreamer(r.ctx, plugin) //nolint:gosec // G118 - using manager's base context so log streaming outlives the request

If context.TODO() is intentional (log streaming should be completely independent), update the comment to reflect the actual behavior.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
go plugins.StartLogStreamer(context.TODO(), plugin) //nolint:gosec // G118 - using manager's base context so log streaming outlives the request
go plugins.StartLogStreamer(r.ctx, plugin) //nolint:gosec // G118 - using manager's base context so log streaming outlives the request
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@bindings/go/plugin/manager/registries/input/registry.go` at line 288, The
nolint comment and call to plugins.StartLogStreamer(...) are inconsistent:
replace the passed context with the registry's manager context (use r.ctx
instead of context.TODO()) so log streaming uses the manager lifecycle, i.e.,
update the call to plugins.StartLogStreamer(r.ctx, plugin) and keep the existing
comment; alternatively, if the intent is for an independent context, update the
comment to state that context.TODO() is intentional and why (affecting
plugins.StartLogStreamer and the registry variable r.ctx).

@Skarlso

Skarlso commented Mar 9, 2026

Copy link
Copy Markdown
Contributor Author

The code generation will fail because it will not use the latest and right version until it's merged. :/

On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
@Skarlso Skarlso force-pushed the update-go-version-1.26.1-2 branch from 4dc1778 to 22dd6b2 Compare March 9, 2026 16:49
matthiasbruns
matthiasbruns previously approved these changes Mar 9, 2026
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
@Skarlso Skarlso merged commit bb60545 into open-component-model:main Mar 10, 2026
100 of 102 checks passed
frewilhelm pushed a commit to frewilhelm/open-component-model that referenced this pull request Mar 12, 2026
morri-son pushed a commit to morri-son/open-component-model that referenced this pull request Mar 18, 2026
Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/github-actions Changes on GitHub Actions or within `.github/` directory kind/chore chore, maintenance, etc. size/m Medium size/s Small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants