Skip to content

feat: upgrade platform-go to v10.0.0 - #1

Merged
verygoodsoftwarenotvirus merged 1 commit into
mainfrom
v10
Aug 13, 2026
Merged

verygoodsoftwarenotvirus merged 1 commit into
mainfrom
v10

Conversation

@verygoodsoftwarenotvirus

Copy link
Copy Markdown
Contributor

Upgrades github.com/primandproper/platform-go from v7.1.1 → v10.0.0.

Breaking API changes

  1. config.LoadFromJSONFile now takes a context.Context. LoadFromFile threads its existing ctx through.
  2. logging.LevelsEqual is gone. Level is now a string-backed value type, so == compares the level directly — the six assertions it backed become assert.Equal/assert.Equalf.

Behavior change worth a look

v10 relaxed logging validation, which invalidated the premise of two tests:

  • ServiceName is now required only for providers that export telemetry (otelslog).
  • The empty provider remains the documented opt-out into noop logging.
  • An unrecognized provider is now a hard error instead of silently disabling logging.

So neither a slog config omitting a service name nor a zero Config fails validation any more. Both tests now use an unrecognized provider (which v10 rejects outright), and a new test pins the permissive behavior so it stays deliberate rather than accidental. The LoadFromFile doc comment no longer promises the old rule.

⚠️ Deployment note: a mounted config file that previously failed fast on a missing service name will now boot with an empty one. Nothing committed here is affected — both config/*.json specify a service name — but it's worth knowing before rolling out.

Regenerated configs

config/localdev.json and config/production.json shrink because v10 marks the pillar sub-configs omitempty, so zero-valued tracing/metrics/profiling blocks stop serializing. Semantically identical: empty pillars still resolve to noop.

Drive-by lint fix

Render's two loops now index instead of copying the 40-byte Environment per iteration, satisfying gocritic's rangeValCopy against the repo's configured 32-byte threshold. This was already failing on main before this upgrade (verified by linting the v7 baseline); fixed here so the branch lands lint-clean.

Verification

  • make build, make test — pass
  • make lint — 0 issues, shellcheck clean
  • make configs — idempotent
  • Smoke-tested the binary: version bare, with --config config/localdev.json (debug logs), and with --config config/production.json (quiet at info); confirmed TEMPLATE_GO_OBSERVABILITY_LOGGING_LEVEL still overrides the file.

🤖 Generated with Claude Code

Bump github.com/primandproper/platform-go from v7.1.1 to v10.0.0 and
adapt to the two breaking API changes:

- config.LoadFromJSONFile now takes a context.Context as its first
  argument; LoadFromFile threads its existing ctx through.
- logging.LevelsEqual is gone. Level is now a string-backed value type,
  so == compares the level directly; the assertions it backed become
  assert.Equal.

v10 also relaxed logging validation, which invalidated the premise of
two tests. ServiceName is now required only for the providers that
export telemetry (otelslog), and the empty provider remains the
documented opt-out into noop logging -- so neither a slog config
omitting a service name nor a zero Config fails validation any more.
Both tests now use an unrecognized provider, which v10 rejects outright
rather than silently disabling logging, and a new test pins the
permissive behavior so it stays deliberate. The LoadFromFile doc comment
no longer promises the old rule.

The regenerated config/*.json shrink because v10 marks the pillar
sub-configs omitempty, so zero-valued tracing/metrics/profiling blocks
stop serializing. Both files still round-trip through LoadFromFile and
the env-var overlay still wins over file values.

Also switch Render's two loops to indexing. gocritic's rangeValCopy
flagged the 40-byte Environment copy against the configured 32-byte
threshold; this was failing on main before this upgrade and is fixed
here so the build lands lint-clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@verygoodsoftwarenotvirus
verygoodsoftwarenotvirus merged commit dd5185e into main Aug 13, 2026
5 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.

1 participant