Skip to content

chore: Update to v4#549

Merged
Azorlogh merged 1 commit into
mainfrom
chore/v4
Feb 20, 2026
Merged

chore: Update to v4#549
Azorlogh merged 1 commit into
mainfrom
chore/v4

Conversation

@Azorlogh
Copy link
Copy Markdown
Contributor

@Azorlogh Azorlogh commented Feb 19, 2026

release go-libs v4 since #546 is a breaking change

@Azorlogh Azorlogh requested a review from a team as a code owner February 19, 2026 13:24
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 19, 2026

Walkthrough

This pull request performs a comprehensive library version upgrade across the entire codebase, updating all import paths from go-libs/v3 to go-libs/v4. Over 100 files have been updated to reference the newer library versions without any changes to functional logic or behavior.

Changes

Cohort / File(s) Summary
API Package
api/handler_info_test.go, api/idempotency_test.go, api/link_test.go, api/logging_chi.go, api/logging_chi_test.go, api/query_test.go, api/response.go, api/response_test.go, api/response_utils.go, api/utils.go, api/utils_test.go
Import paths updated from v3 to v4 for api, logging, and bunpaginate packages. No functional changes to test logic or public APIs.
Auth Package
auth/additional_checks.go, auth/additional_checks_test.go, auth/auth.go, auth/auth_test.go, auth/control_plane_agent.go, auth/control_plane_agent_test.go, auth/middleware.go, auth/middleware_test.go, auth/module.go, auth/module_test.go, auth/scopes.go
Import paths updated from v3 to v4 for oidc, logging, and collectionutils. No changes to authentication logic or exported signatures.
Bun Database Packages
bun/bunconnect/..., bun/bundebug/..., bun/bunmigrate/..., bun/bunpaginate/...
Import paths updated from v3 to v4 for logging, bunconnect, bundebug, bunpaginate, migrations, and time packages. Tracer initialization strings updated to reference v4 paths. No database logic changes.
Collection & Error Utilities
collectionutils/*_test.go, errorsutils/errors_test.go
Import paths updated from v3 to v4 for collectionutils and errorsutils. Test logic remains unchanged.
Server & Health Packages
grpcserver/serverport.go, health/controller_test.go, httpclient/debug.go, httpserver/middlewares.go, httpserver/serverport.go
Import paths updated from v3 to v4 for logging, serverport, and httpserver. Middleware and server configuration logic preserved.
Licence Package
licence/cli.go, licence/cli_test.go, licence/licence.go, licence/licence_test.go
Import paths updated from v3 to v4 for errorsutils and logging. No changes to licensing logic.
Logging & Migrations
logging/adapter_hclog_test.go, migrations/migrator.go, migrations/migrator_test.go, migrations/versions.go
Import paths updated from v3 to v4 for logging, otlp, platform/postgres, and time. Migration execution and tracer initialization patterns unchanged.
OIDC Package
oidc/client/device.go, oidc/client/discover.go, oidc/client/introspect.go, oidc/client/jwks.go, oidc/client/relying_party.go, oidc/client/signing.go, oidc/client/token.go, oidc/client/token_code_exchange.go, oidc/client/token_exchange.go, oidc/client/token_refresh.go, oidc/client/user_info.go, oidc/client/verifier.go, oidc/http/http.go, oidc/*.go
Import paths updated from v3 to v4 for oidc, oidc/http, and time packages. Token flow and verification logic remains unchanged.
OTLP Package
otlp/otlpmetrics/cli.go, otlp/otlpmetrics/module.go, otlp/otlptraces/...
Import paths updated from v3 to v4 for otlp and logging. Metrics and trace initialization logic preserved.
Platform & Pointer
platform/postgres/errors_test.go, pointer/utils_test.go, profiling/module.go, s3bucket/module.go
Import paths updated from v3 to v4 for postgres, pointer, httpserver, and aws/iam packages. No logic changes.
Publish Package
publish/circuit_breaker/..., publish/cli.go, publish/logging.go, publish/logging_test.go, publish/module.go, publish/module_test.go, publish/nats.go, publish/sns.go, publish/sqs.go
Import paths updated from v3 to v4 for logging, aws/iam, circuit_breaker, topic_mapper, and service. Publisher and circuit breaker implementations unchanged.
Queue Package
queue/listener.go, queue/listener_test.go, queue/localstack_integration_test.go
Import paths updated from v3 to v4 for logging and queue. Listener and message handling logic preserved.
Service & Temporal
service/app.go, temporal/client_module.go, temporal/logger.go, temporal/worker.go
Import paths updated from v3 to v4 for errorsutils, logging, otlp/otlptraces, and service. Application initialization and temporal worker logic unchanged.
Testing Utilities
testing/api/..., testing/deferred/..., testing/docker/..., testing/migrations/..., testing/platform/..., testing/testservice/...
Import paths updated from v3 to v4 across testing helpers, fixtures, and instrumentation. All test infrastructure functionality preserved.
Time Package
time/time_test.go
Import path updated from v3 to v4 for time utilities. Test assertions and behavior unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Whiskers twitching with delight,
We hop from v3 to v4 with all our might!
Import paths refreshed, dependencies aligned,
One hundred files, a upgrade well-designed! 🚀

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive No description was provided by the author, making it impossible to assess whether it relates to the changeset. Add a brief description explaining the purpose of upgrading to v4 and any compatibility considerations.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'chore: Update to v4' directly summarizes the main change—updating all dependencies from v3 to v4 throughout the codebase.

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

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/v4

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

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

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 28.80%. Comparing base (28afbaf) to head (2590d19).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #549   +/-   ##
=======================================
  Coverage   28.80%   28.80%           
=======================================
  Files         175      175           
  Lines        7062     7062           
=======================================
  Hits         2034     2034           
  Misses       4911     4911           
  Partials      117      117           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
temporal/logger.go (1)

29-31: ⚠️ Potential issue | 🔴 Critical

Fix Warn to call Warn instead of Errorf.

The Warn method currently escalates warnings to error level. The temporal SDK's log.Logger interface uses structured logging with a Warn(msg string, keyvals ...interface{}) method—not Warnf. Update the call accordingly:

Fix
 func (l logger) Warn(msg string, keyvals ...interface{}) {
-	l.logger.WithFields(keyvalsToMap(keyvals...)).Errorf(msg)
+	l.logger.WithFields(keyvalsToMap(keyvals...)).Warn(msg)
 }

Note: The internal logging.Logger interface also lacks a Warnf method, so this change requires either adding Warn to that interface or temporarily mapping warnings to errors until the underlying logger is updated.

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

In `@temporal/logger.go` around lines 29 - 31, The Warn method currently escalates
warnings by calling l.logger.Errorf; change it to call the underlying logger's
Warn (not Warnf/Errorf) so warnings are logged at the correct level—update the
implementation in function logger.Warn (and the call that uses keyvalsToMap) to
invoke Warn on the embedded logging.Logger; if logging.Logger does not yet
declare a Warn method, either add Warn(msg string, keyvals ...interface{}) to
that interface or document/implement a temporary mapping that forwards Warn to
an appropriate existing method without using Errorf.
🧹 Nitpick comments (2)
queue/listener_test.go (1)

4-4: Misplaced //nolint: gosec on a stdlib context import.

gosec has no rule that fires on a bare "context" import. This suppression is a no-op and is likely a copy-paste artifact from a file that suppresses gosec on a crypto import (e.g., crypto/md5 as seen in localstack_integration_test.go line 5). Safe to remove.

🧹 Proposed cleanup
-	"context" //nolint: gosec
+	"context"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@queue/listener_test.go` at line 4, Remove the unnecessary gosec suppression
on the standard library context import in queue/listener_test.go by deleting the
"//nolint: gosec" comment next to the "context" import; the import of "context"
does not trigger any gosec rule so simply keep the import as "context" without
the nolint annotation to clean up the file.
migrations/migrator.go (1)

378-384: Pre-existing dead code: second if err != nil is unreachable.

After the first if err != nil { return err } (line 378), err is guaranteed to be nil at line 381, making the second guard block permanently unreachable. The second block also silently swallows the error (returns nil), which differs from the first block's behaviour. Consider removing it.

♻️ Proposed cleanup
  _, err = conn.Exec(ctx, `
      update `+m.getVersionsTable()+`
      set actual_counter = coalesce(actual_counter, 0) + $1
      where version_id = $2
  `, increment, lastVersion+1)
  if err != nil {
      return err
  }
- if err != nil {
-     logging.FromContext(ctx).Debugf("failed to update actual counter: %v", err)
-     return nil
- }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@migrations/migrator.go` around lines 378 - 384, The second `if err != nil`
block after the first `if err != nil { return err }` is unreachable and silently
swallows errors; remove that second guard and consolidate error handling for the
`err` variable — either log the error using
logging.FromContext(ctx).Debugf("failed to update actual counter: %v", err) and
then return err, or simply keep the existing `return err` behavior from the
first check; ensure no duplicate `if err != nil` remains around the "failed to
update actual counter" log statement.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@temporal/logger.go`:
- Around line 29-31: The Warn method currently escalates warnings by calling
l.logger.Errorf; change it to call the underlying logger's Warn (not
Warnf/Errorf) so warnings are logged at the correct level—update the
implementation in function logger.Warn (and the call that uses keyvalsToMap) to
invoke Warn on the embedded logging.Logger; if logging.Logger does not yet
declare a Warn method, either add Warn(msg string, keyvals ...interface{}) to
that interface or document/implement a temporary mapping that forwards Warn to
an appropriate existing method without using Errorf.

---

Nitpick comments:
In `@migrations/migrator.go`:
- Around line 378-384: The second `if err != nil` block after the first `if err
!= nil { return err }` is unreachable and silently swallows errors; remove that
second guard and consolidate error handling for the `err` variable — either log
the error using logging.FromContext(ctx).Debugf("failed to update actual
counter: %v", err) and then return err, or simply keep the existing `return err`
behavior from the first check; ensure no duplicate `if err != nil` remains
around the "failed to update actual counter" log statement.

In `@queue/listener_test.go`:
- Line 4: Remove the unnecessary gosec suppression on the standard library
context import in queue/listener_test.go by deleting the "//nolint: gosec"
comment next to the "context" import; the import of "context" does not trigger
any gosec rule so simply keep the import as "context" without the nolint
annotation to clean up the file.

@Azorlogh Azorlogh added this pull request to the merge queue Feb 20, 2026
Merged via the queue into main with commit 026c610 Feb 20, 2026
8 checks passed
@Azorlogh Azorlogh deleted the chore/v4 branch February 20, 2026 14:05
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