Skip to content

Move to Go 1.27 for v0.2.0 - #280

Merged
thushan merged 17 commits into
mainfrom
chore/go-1.27
Nov 22, 2026
Merged

thushan merged 17 commits into
mainfrom
chore/go-1.27

Conversation

@thushan

@thushan thushan commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

Summary

Moves Olla to Go 1.27 for v0.2.0. Go 1.24 is end of life and the build reached stdlib vulnerabilities, the golang.org/x/* and atomicgo.dev/keyboard pins existed only for 1.24, and the old tool versions fail on 1.27.

Type of change

  • Bug fix
  • New feature
  • Backend / integration support
  • Documentation
  • Refactor / internal (no behaviour change)

Also includes one security fix: malformed endpoint URL errors echoed credentials.

What changed

  • go.mod has go 1.27.0 and toolchain go1.27.4; ci.yml, release.yml and release-dryrun.yml use go-version-file: go.mod, with checkout before setup-go.
  • Pins lifted and expr, testify, gjson and pterm refreshed.
  • golangci-lint v2.15.0 and betteralign v0.16.1; .golangci.yml sets run.go: 1.27, gomodguard_v2 and goconst tuning.
  • staticcheck, unused, ineffassign and prealloc enabled, with their fixes and the dead code removed.
  • .goreleaser.yml deprecated keys fixed and pinned ~> v2; dockers_v2 with Dockerfile.goreleaser publishes the same 12 ghcr.io/thushan/olla refs, and prereleases still publish nothing. The root Dockerfile stays for make docker-build-local.
  • internal/adapter/discovery/repository.go redacts userinfo in malformed endpoint URL errors; covered by repository_malformed_url_test.go.
  • Docs, CLAUDE.md and the v0.2.0 release notes updated.

Compatibility

  • Building Olla needs Go 1.27.
  • macOS 13 is the minimum.
  • Unbracketed IPv6 endpoint URLs are rejected.

How was this tested?

  • make ready at 7ac815a, exit 0 (the later fbe6679 is a docs-only release-note trim)
  • /olla-validate --nightly at 7ac815a: 175 pass, 0 fail
  • /claude-code-e2e at 7ac815a: 20/20, both legs
  • /test-sticky-sessions at 7ac815a: 103 pass, 0 fail
  • IPv6 listen on ::1, [::1] and :: at 7ac815a: 3/3
  • pterm terminal output compared with main at 7ac815a; binary built with go1.27.4
  • govulncheck -mode=binary on a go1.27.4 build: no vulnerabilities
  • Local goreleaser publish to a throwaway registry: 12 refs, prerelease tag publishes nothing
  • Cross-review by two independent reviewers: ready

Not yet checked: the real arm64 build of Dockerfile.goreleaser; release-dryrun.yml covers it.

Checklist

  • make ready passes (test-short + test-race + fmt + vet + lint + align)
  • Tests added or updated for the change
  • Documentation updated (./docs) if behaviour or config changed
  • No new dependencies added (or called out and justified below)

Summary by CodeRabbit

  • New Features
    • Release container builds now support multi-platform images for amd64 and arm64.
    • Malformed endpoint URL errors redact embedded credentials.
  • Bug Fixes
    • Health checks retry network errors only when they time out, and backoff is capped consistently.
    • Security metrics now include all available statistics.
  • Documentation
    • Updated release notes and development guidance to reflect Go 1.27 requirements.

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The pull request updates the project to Go 1.27 and changes CI and release packaging. It redacts userinfo in malformed endpoint URL errors, adjusts retry and proxy handling, and consolidates repeated constants. It also removes unused helpers and updates code patterns.

Changes

Go toolchain and releases

Layer / File(s) Summary
Go version, dependencies and CI
.github/dependabot.yml, .github/workflows/ci.yml, .golangci.yml, go.mod, CLAUDE.md, docs/content/development/*, docs/content/api-reference/system.md, docs/content/configuration/practices/security.md
The module and CI use Go 1.27. Dependency update rules, linter settings and Go-version guidance are updated.
Release image and GoReleaser configuration
.github/workflows/release*.yml, .goreleaser.yml, Dockerfile, Dockerfile.goreleaser, docs/content/about/release-notes.md
Release workflows use Go from go.mod and GoReleaser v2. Docker builds use a dedicated release Dockerfile and dockers_v2 entries.

Endpoint URL error redaction

Layer / File(s) Summary
Malformed URL errors and credential redaction
internal/adapter/discovery/repository.go, internal/adapter/discovery/repository_malformed_url_test.go, docs/content/about/release-notes.md
Discovery redacts userinfo in applicable malformed URL errors. Tests cover credential leakage, parser details and redaction cases.

Request handling and retries

Layer / File(s) Summary
Health and proxy backoff
internal/core/constants/retry.go, internal/adapter/health/*, internal/adapter/proxy/core/retry.go, internal/util/backoff.go
Backoff uses the renamed DefaultMaxBackoff duration. Health checks retry network errors only when they report a timeout.
Proxy filtering, logging and metrics
internal/app/handlers/handler_proxy.go, internal/app/handlers/handler_common.go, internal/app/handlers/handler_provider_generic.go, internal/app/handlers/server.go, internal/app/handlers/server_routes.go, internal/app/services/proxy.go, internal/adapter/security/metrics.go, internal/app/handlers/handler_translation.go, internal/app/handlers/handler_translation_alias_test.go
Proxy handling extracts platform filtering and successful-request logging. Proxy startup obtains its metrics extractor through a helper, and security metrics return the complete stats value.

Shared constants and code maintenance

Layer / File(s) Summary
Protocol and profile constants
internal/adapter/converter/*, internal/adapter/registry/profile/loader.go, internal/adapter/translator/anthropic/*, test/cmd/ollamock/streaming.go
Converters, profiles, Anthropic translation and mock responses use shared constants for repeated response values, routes and roles.
Model-family and capability constants
internal/adapter/unifier/model_config.go, internal/adapter/unifier/metadata_extractor.go, internal/adapter/unifier/default_unifier.go, internal/adapter/registry/unified_memory_registry.go
Model-family and embedding capability values use shared constants. Capability iteration variables are renamed without changing matching behaviour.
Go idioms and test cleanup
internal/config/unknown_keys.go, pkg/pool/lite_pool.go, internal/core/domain/filter.go, internal/logger/*, internal/version/version.go, main.go, internal/adapter/*, internal/app/handlers/handler_stats_translators_test.go, test/cmd/ollamock/handlers.go
The changes update pointer-kind checks and allocation patterns, and remove unused fields, helpers and commented-out tests.

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Other

Suggested reviewers: ghostdevv

Merge Risk: Minimal · up to fbe66

This PR moves the build and release tooling to Go 1.27, redacts credentials in malformed endpoint URL errors, and makes small code-maintenance changes without intended behaviour changes. No merge-blocking issue was found. Confirm the release dry-run workflow passes, since it exercises the arm64 image build, before tagging v0.2.0.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "Move to Go 1.27 for v0.2.0" matches the main change. The changeset sets go 1.27.0 and toolchain go1.27.4 in go.mod, updates CI, release and docs to Go 1.27, and adds the v0.2.0 release note…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "Move to Go 1.27 for v0.2.0" matches the main change. The changeset sets go 1.27.0 and toolchain go1.27.4 in go.mod, updates CI, release and docs to Go 1.27, and adds the v0.2.0 release notes. The title is short, specific and free of noise. Some changes (malformed endpoint URL redaction, GoReleaser dockers_v2 migration, new linters) are not in the title, but the title does not need to cover every detail.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 51e39a5 and fbe6679.

Files ignored due to path filters: 1

  • go.sum is excluded by !**/*.sum
Files selected for processing: 79

  • .github/dependabot.yml
  • .github/workflows/ci.yml
  • .github/workflows/release-dryrun.yml
  • .github/workflows/release.yml
  • .golangci.yml
  • .goreleaser.yml
  • CLAUDE.md
  • Dockerfile
  • Dockerfile.goreleaser
  • docs/content/about/release-notes.md
  • docs/content/api-reference/system.md
  • docs/content/configuration/practices/security.md
  • docs/content/development/benchmarking.md
  • docs/content/development/contributing.md
  • docs/content/development/setup.md
  • docs/content/development/testing.md
  • go.mod
  • internal/adapter/balancer/factory_test.go
  • internal/adapter/converter/base_converter.go
  • internal/adapter/converter/docker_model_runner_converter.go
  • internal/adapter/converter/lemonade_converter.go
  • internal/adapter/converter/llamacpp_converter.go
  • internal/adapter/converter/lmdeploy_converter.go
  • internal/adapter/converter/lmstudio_converter.go
  • internal/adapter/converter/openai_converter.go
  • internal/adapter/converter/sglang_converter.go
  • internal/adapter/converter/unified_converter.go
  • internal/adapter/converter/vllm_converter.go
  • internal/adapter/converter/vllm_mlx_converter.go
  • internal/adapter/discovery/repository.go
  • internal/adapter/discovery/repository_malformed_url_test.go
  • internal/adapter/health/checker_test.go
  • internal/adapter/health/client.go
  • internal/adapter/health/client_backoff_test.go
  • internal/adapter/health/types.go
  • internal/adapter/proxy/benchmark_refactor_test.go
  • internal/adapter/proxy/core/retry.go
  • internal/adapter/proxy/core/retry_safety_test.go
  • internal/adapter/proxy/olla/streaming_helpers.go
  • internal/adapter/proxy/proxy_olla_test.go
  • internal/adapter/proxy/sherpa/service_retry_test.go
  • internal/adapter/registry/profile/factory_test.go
  • internal/adapter/registry/profile/loader.go
  • internal/adapter/registry/unified_memory_registry.go
  • internal/adapter/security/metrics.go
  • internal/adapter/security/rejection_log_test.go
  • internal/adapter/stats/percentile_tracker.go
  • internal/adapter/translator/anthropic/request.go
  • internal/adapter/translator/anthropic/response.go
  • internal/adapter/translator/anthropic/streaming.go
  • internal/adapter/translator/anthropic/streaming_parse_test.go
  • internal/adapter/translator/anthropic/streaming_test_helpers.go
  • internal/adapter/translator/anthropic/types.go
  • internal/adapter/unifier/circuit_breaker.go
  • internal/adapter/unifier/default_unifier.go
  • internal/adapter/unifier/lifecycle_unifier_test.go
  • internal/adapter/unifier/metadata_extractor.go
  • internal/adapter/unifier/model_config.go
  • internal/app/handlers/handler_common.go
  • internal/app/handlers/handler_provider_generic.go
  • internal/app/handlers/handler_proxy.go
  • internal/app/handlers/handler_stats_translators_test.go
  • internal/app/handlers/handler_translation.go
  • internal/app/handlers/handler_translation_alias_test.go
  • internal/app/handlers/server.go
  • internal/app/handlers/server_routes.go
  • internal/app/services/proxy.go
  • internal/config/unknown_keys.go
  • internal/core/constants/retry.go
  • internal/core/domain/filter.go
  • internal/logger/styled_plain.go
  • internal/logger/styled_pretty.go
  • internal/util/backoff.go
  • internal/version/version.go
  • main.go
  • makefile
  • pkg/pool/lite_pool.go
  • test/cmd/ollamock/handlers.go
  • test/cmd/ollamock/streaming.go
Files with no reviewable changes: 13

  • .github/dependabot.yml
  • internal/adapter/balancer/factory_test.go
  • internal/adapter/health/checker_test.go
  • internal/adapter/proxy/core/retry_safety_test.go
  • internal/adapter/proxy/proxy_olla_test.go
  • internal/adapter/proxy/sherpa/service_retry_test.go
  • internal/adapter/registry/profile/factory_test.go
  • internal/adapter/security/rejection_log_test.go
  • internal/adapter/translator/anthropic/streaming_parse_test.go
  • internal/adapter/translator/anthropic/streaming_test_helpers.go
  • internal/adapter/unifier/circuit_breaker.go
  • internal/app/handlers/handler_provider_generic.go
  • internal/app/handlers/server.go

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@thushan thushan self-assigned this Nov 22, 2026
@thushan
thushan merged commit a8fe186 into main Nov 22, 2026
9 checks passed
@thushan
thushan deleted the chore/go-1.27 branch November 22, 2026 10:32
@coderabbitai coderabbitai Bot mentioned this pull request Nov 24, 2026
4 tasks done
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.

1 participant