Skip to content

Update Go to 1.27 and refresh dependencies - #385

Merged
alexellis merged 2 commits into
openfaas:masterfrom
welteki:update-go127-dependencies
Oct 23, 2026
Merged

alexellis merged 2 commits into
openfaas:masterfrom
welteki:update-go127-dependencies

Conversation

@welteki

@welteki welteki commented Oct 22, 2026

Copy link
Copy Markdown
Member

Description

Update CI to Go 1.27 and current released GitHub Actions, refresh Go dependencies and vendoring, and adapt Compose loading to preserve architecture suffix interpolation, service dependency ordering, bind mounts, and published port ranges. Dynamic errors are printed without interpreting them as format strings, as required by the newer Go vet checks.

Keep these dependencies at compatible versions for the containerd 1.7 integration:

  • github.com/opencontainers/runtime-spec v1.2.1: v1.3 changes LinuxPids.Limit to a pointer, which containerd 1.7 cannot compile against.
  • github.com/containerd/cgroups/v3 v3.1.0 and github.com/Microsoft/hcsshim v0.14.1: newer releases require runtime-spec v1.3.
  • github.com/containerd/containerd/api v1.11.1: v1.12 adds UpdateSandbox to an interface that containerd 1.7 does not implement.

Motivation and Context

Bring build tooling and dependencies up to date while preserving the existing containerd and Compose integration.

  • I have raised an issue to propose this change this is required

How Has This Been Tested?

On Linux amd64 with Go 1.27.3 (GOTOOLCHAIN=go1.27.3, GOMAXPROCS=2, GOFLAGS=-p=1):

  • make test: passed all unit tests, including Compose interpolation, dependency/port mappings, published ranges, and invalid port regression checks.
  • go mod verify: passed.
  • make dist hashgen: passed for the complete release matrix, Linux amd64 and arm64. file confirmed statically linked x86-64 and AArch64 ELF executables; sha256sum -c verified both binary checksums.
  • Native bin/faasd version and bin/faasd --help: passed. Arm64 was cross-compiled, not executed.
  • go test -race ./...: detects a proxy race involving http.DefaultClient in Test_Proxy_ToPrivateServer (pkg/proxy.go:46, pkg/proxy_test.go:57). The same race reproduces on upstream 13f03f3 with go test -vet=off -race ./pkg -run Test_Proxy_ToPrivateServer -count=1.
  • go vet ./...: reports IPv6-unsafe address formatting in unchanged pkg/proxy.go:62. The same command reports the identical finding on upstream 13f03f3.

No Dockerfile or Docker release matrix exists. Live containerd/CNI integration and make prepare-test/make test-e2e were not run because they install and start services and deploy a function. Registry image verification was not run.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

Commits:

  • I've read the CONTRIBUTION guide
  • My commit message has a body and describe how this was tested and why it is required.
  • I have signed-off my commits with git commit -s for the Developer Certificate of Origin (DCO)

Code:

  • My code follows the code style of this project.
  • I have added tests to cover my changes.

Docs:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Use Go 1.27 for builds and refresh checkout, setup, and release actions. Print dynamic errors without treating them as format strings.

Signed-off-by: Han Verstraete (OpenFaaS Ltd) <han@openfaas.com>
Refresh modules and vendored dependencies. Adapt Compose loading to retain architecture interpolation, dependency ordering, bind mounts and port ranges.

Retain runtime-spec v1.2.1 because v1.3 changes LinuxPids.Limit to a pointer that containerd 1.7 cannot compile against. Keep cgroups/v3 v3.1.0 and hcsshim v0.14.1 because newer releases require runtime-spec v1.3.

Retain containerd/api v1.11.1 because v1.12 adds UpdateSandbox to an interface that containerd 1.7 does not implement.

Signed-off-by: Han Verstraete (OpenFaaS Ltd) <han@openfaas.com>
@reviewfn

reviewfn Bot commented Oct 22, 2026

Copy link
Copy Markdown

AI Pull Request Overview

Disclaimer: This review was generated by automated AI and may contain errors. Do not trust its outputs without human verification.

Summary

  • Raises the module and CI toolchain baseline to Go 1.27.
  • Refreshes direct and transitive dependencies while retaining explicit containerd 1.7 compatibility pins.
  • Migrates Compose loading to the newer project model with interpolation and resolved bind-mount paths.
  • Preserves dependency ordering and adds validated support for published port ranges.
  • Updates dynamic error printing to avoid treating error text as a format string.
  • Both new commit messages were inspected and contain no AI authorship or assistance attribution prohibited by the review policy.

Approval rating (1-10)

9/10. The migration is coherent, compatibility constraints are documented, and focused regression coverage addresses the changed Compose behavior.

Summary per file

Summary per file
File path Summary
.github/workflows/build.yaml Updates checkout, Go setup, and the CI Go version.
.github/workflows/publish.yaml Updates build tooling and release asset upload action versions.
.github/workflows/verify-images.yaml Updates checkout and Arkade setup action versions.
go.mod Raises the Go baseline and refreshes dependencies with compatibility pins.
go.sum Refreshes checksums for the updated module graph.
main.go Prints command errors without interpreting them as format strings.
pkg/cninetwork/cni_network_test.go Uses non-formatting fatal assertions for dynamic errors.
pkg/supervisor.go Migrates Compose loading and preserves dependencies, mounts, interpolation, and port ranges.
pkg/supervisor_test.go Expands regression coverage for Compose migration and port handling.

Overall Assessment

The final state is internally consistent and preserves the faasd-specific behavior affected by the Compose dependency upgrade. No concrete correctness, security, compatibility, or maintainability issue was identified in the scoped non-vendored changes.

Detailed Review

Detailed Review

No actionable findings.

AI agent details.

Agent processing time: 3m52.846s
Environment preparation time: 3.586s
Total time from webhook: 4m4.253s

@welteki
welteki marked this pull request as ready for review October 22, 2026 17:07
@alexellis
alexellis merged commit 422c5dd into openfaas:master Oct 23, 2026
2 checks passed
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.

2 participants