Repository navigation
chore!: Update relic to ^0.10.0 - #4160
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 WalkthroughWalkthroughThis PR migrates Serverpod's request handling from a Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Server as Server/WebServer
participant Route
participant Handler as Request Handler
participant Result as Result Chain
Note over Server,Result: Old Flow (RequestContext-based)
Client->>Server: HTTP Request
Server->>Server: Create RequestContext
Server->>Route: call(RequestContext)
Route->>Handler: handleCall(Session, RequestContext)
Handler->>Result: Build response via context.respond()
Result->>Server: Return HandledContext
Server->>Client: HTTP Response
Note over Server,Result: New Flow (Request-based)
Client->>Server: HTTP Request
Server->>Server: Create Request
Server->>Route: call(Request)
Route->>Handler: handleCall(Session, Request)
Handler->>Result: Build response directly
Result->>Result: Return EndpointResult
Result->>Server: Convert to Response
Server->>Client: HTTP Response
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes
Possibly related PRs
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (1 passed)
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. Comment |
|
@CodeRabbit review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (4)
modules/new_serverpod_auth/serverpod_auth_idp/serverpod_auth_idp_server/lib/src/providers/apple/business/routes/apple_server_notification_route.dart (1)
18-18: Consider renaming parameter for consistency.The parameter is typed as
Requestbut namedcontext, which is inconsistent with the migration away from Context-based APIs. Other files in this PR usereqorrequestfor Request parameters (e.g.,packages/serverpod/lib/src/server/server.dartusesreq,packages/serverpod_client/test/test_utils/test_http_server.dartusesreq).Apply this diff for consistency:
FutureOr<Result> handleCall( final Session _, - final Request context, + final Request req, ) { - return _utils.revokedNotificationHandler()(context); + return _utils.revokedNotificationHandler()(req); }packages/serverpod_client/test/test_utils/test_web_socket_server.dart (1)
33-35: Consider marking unused parameter.The
Request reqparameter is declared but not used in the handler body. While this may be intentional for a simple test utility, marking it as unused improves clarity.Apply this diff:
- FutureOr<Result> requestHandler(Request req) async { + FutureOr<Result> requestHandler(Request _) async { return WebSocketUpgrade(webSocketHandler); }packages/serverpod/lib/src/web_server/routes/static_route.dart (1)
65-66: Consider renaming parameter for consistency.The parameter is typed as
Requestbut namedcontext, which is inconsistent with the migration away from Context-based APIs. Other files in this PR consistently usereqorrequestfor Request parameters (e.g.,packages/serverpod/lib/src/server/server.dartusesreq).Apply this diff:
- FutureOr<Result> handleCall(Session session, Request context) => - _handler(context); + FutureOr<Result> handleCall(Session session, Request req) => + _handler(req);packages/serverpod/lib/src/web_server/web_server.dart (1)
214-225: Doc comment still references ContextThe extension now targets
Request, so the summary should referenceRequestinstead ofContextto avoid confusion for callers browsing the API docs. A quick wording tweak keeps the documentation aligned with the new signature.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (17)
examples/auth_example/auth_example_server/lib/server.dart(1 hunks)modules/new_serverpod_auth/serverpod_auth_idp/serverpod_auth_idp_server/lib/src/providers/apple/business/apple_idp_utils.dart(2 hunks)modules/new_serverpod_auth/serverpod_auth_idp/serverpod_auth_idp_server/lib/src/providers/apple/business/routes/apple_server_notification_route.dart(1 hunks)packages/serverpod/lib/serverpod.dart(1 hunks)packages/serverpod/lib/src/server/endpoint_dispatch.dart(7 hunks)packages/serverpod/lib/src/server/server.dart(7 hunks)packages/serverpod/lib/src/web_server/routes/static_route.dart(2 hunks)packages/serverpod/lib/src/web_server/web_server.dart(6 hunks)packages/serverpod/pubspec.yaml(1 hunks)packages/serverpod_client/pubspec.yaml(1 hunks)packages/serverpod_client/test/test_utils/test_http_server.dart(1 hunks)packages/serverpod_client/test/test_utils/test_web_socket_server.dart(1 hunks)templates/pubspecs/packages/serverpod/pubspec.yaml(1 hunks)templates/pubspecs/packages/serverpod_client/pubspec.yaml(1 hunks)templates/pubspecs/tests/serverpod_test_server/pubspec.yaml(1 hunks)tests/serverpod_test_server/pubspec.yaml(1 hunks)tests/serverpod_test_server/test/middleware_test.dart(1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.dart
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.dart: Format all Dart code usingdart format .before committing
Code must pass Dart analyzer in strict mode (util/run_tests_analyze or melos lint_strict)
Use descriptive variable and function names
Files:
modules/new_serverpod_auth/serverpod_auth_idp/serverpod_auth_idp_server/lib/src/providers/apple/business/routes/apple_server_notification_route.dartpackages/serverpod/lib/serverpod.dartpackages/serverpod/lib/src/web_server/routes/static_route.dartmodules/new_serverpod_auth/serverpod_auth_idp/serverpod_auth_idp_server/lib/src/providers/apple/business/apple_idp_utils.dartpackages/serverpod_client/test/test_utils/test_web_socket_server.darttests/serverpod_test_server/test/middleware_test.dartpackages/serverpod/lib/src/server/endpoint_dispatch.dartpackages/serverpod/lib/src/server/server.dartpackages/serverpod_client/test/test_utils/test_http_server.dartpackages/serverpod/lib/src/web_server/web_server.dartexamples/auth_example/auth_example_server/lib/server.dart
**/lib/**/*.dart
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Remove unnecessary comments from production code
Files:
modules/new_serverpod_auth/serverpod_auth_idp/serverpod_auth_idp_server/lib/src/providers/apple/business/routes/apple_server_notification_route.dartpackages/serverpod/lib/serverpod.dartpackages/serverpod/lib/src/web_server/routes/static_route.dartmodules/new_serverpod_auth/serverpod_auth_idp/serverpod_auth_idp_server/lib/src/providers/apple/business/apple_idp_utils.dartpackages/serverpod/lib/src/server/endpoint_dispatch.dartpackages/serverpod/lib/src/server/server.dartpackages/serverpod/lib/src/web_server/web_server.dartexamples/auth_example/auth_example_server/lib/server.dart
**/*_test.dart
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*_test.dart: Write test descriptions using the Given/When/Then pattern
Organize tests with passing/success cases first, group related cases using group(), then follow with error cases
Files:
tests/serverpod_test_server/test/middleware_test.dart
🧠 Learnings (17)
📓 Common learnings
Learnt from: nielsenko
Repo: serverpod/serverpod PR: 3980
File: templates/pubspecs/packages/serverpod/pubspec.yaml:31-34
Timestamp: 2025-09-17T16:08:02.694Z
Learning: When relic git dependencies with floating refs like "ref: merged" appear in Serverpod pubspecs, check for context about temporary measures for pending upstream PRs before flagging as supply chain risks.
Learnt from: SandPod
Repo: serverpod/serverpod PR: 4144
File: modules/new_serverpod_auth/serverpod_auth_idp/serverpod_auth_idp_server/lib/src/providers/passkey/endpoints/passkey_idp_base_endpoint.dart:0-0
Timestamp: 2025-11-03T15:40:41.827Z
Learning: In Serverpod authentication IDP endpoint files (modules/new_serverpod_auth/serverpod_auth_idp/serverpod_auth_idp_server), endpoint base classes should import `serverpod_auth_idp_server/core.dart` to access the Session type, rather than importing `package:serverpod_auth_core_server/session.dart` directly. This pattern is consistently used in Apple, Email, and Google endpoint files.
Learnt from: tp
Repo: serverpod/serverpod PR: 3747
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml:37-38
Timestamp: 2025-07-02T16:09:27.702Z
Learning: In Serverpod migration testing, it's appropriate for test servers like serverpod_new_auth_test_server to include dependencies on both legacy packages (e.g., serverpod_auth_server) and new modular packages to enable comprehensive testing of migration paths from old to new authentication systems.
📚 Learning: 2025-11-03T15:40:41.827Z
Learnt from: SandPod
Repo: serverpod/serverpod PR: 4144
File: modules/new_serverpod_auth/serverpod_auth_idp/serverpod_auth_idp_server/lib/src/providers/passkey/endpoints/passkey_idp_base_endpoint.dart:0-0
Timestamp: 2025-11-03T15:40:41.827Z
Learning: In Serverpod authentication IDP endpoint files (modules/new_serverpod_auth/serverpod_auth_idp/serverpod_auth_idp_server), endpoint base classes should import `serverpod_auth_idp_server/core.dart` to access the Session type, rather than importing `package:serverpod_auth_core_server/session.dart` directly. This pattern is consistently used in Apple, Email, and Google endpoint files.
Applied to files:
modules/new_serverpod_auth/serverpod_auth_idp/serverpod_auth_idp_server/lib/src/providers/apple/business/routes/apple_server_notification_route.dartpackages/serverpod/lib/serverpod.dartmodules/new_serverpod_auth/serverpod_auth_idp/serverpod_auth_idp_server/lib/src/providers/apple/business/apple_idp_utils.darttests/serverpod_test_server/test/middleware_test.dartpackages/serverpod/lib/src/server/endpoint_dispatch.dartpackages/serverpod/lib/src/server/server.dartpackages/serverpod/lib/src/web_server/web_server.dartexamples/auth_example/auth_example_server/lib/server.dart
📚 Learning: 2025-09-17T16:09:20.868Z
Learnt from: nielsenko
Repo: serverpod/serverpod PR: 3980
File: packages/serverpod/lib/src/web_server/web_server.dart:102-115
Timestamp: 2025-09-17T16:09:20.868Z
Learning: In Serverpod's web server authentication handling (packages/serverpod/lib/src/web_server/web_server.dart), query parameter authentication fallback (`authenticationKey ??= queryParameters['auth']`) is intentionally maintained for legacy compatibility reasons, even though it has security implications regarding credential leakage.
Applied to files:
modules/new_serverpod_auth/serverpod_auth_idp/serverpod_auth_idp_server/lib/src/providers/apple/business/routes/apple_server_notification_route.dartpackages/serverpod/lib/serverpod.dartmodules/new_serverpod_auth/serverpod_auth_idp/serverpod_auth_idp_server/lib/src/providers/apple/business/apple_idp_utils.dartpackages/serverpod/lib/src/server/server.dartpackages/serverpod/lib/src/web_server/web_server.dartexamples/auth_example/auth_example_server/lib/server.dart
📚 Learning: 2025-09-17T16:08:02.694Z
Learnt from: nielsenko
Repo: serverpod/serverpod PR: 3980
File: templates/pubspecs/packages/serverpod/pubspec.yaml:31-34
Timestamp: 2025-09-17T16:08:02.694Z
Learning: When relic git dependencies with floating refs like "ref: merged" appear in Serverpod pubspecs, check for context about temporary measures for pending upstream PRs before flagging as supply chain risks.
Applied to files:
templates/pubspecs/packages/serverpod/pubspec.yamltemplates/pubspecs/packages/serverpod_client/pubspec.yamlpackages/serverpod/pubspec.yamltests/serverpod_test_server/pubspec.yamltemplates/pubspecs/tests/serverpod_test_server/pubspec.yaml
📚 Learning: 2025-06-27T08:39:36.440Z
Learnt from: tp
Repo: serverpod/serverpod PR: 3721
File: util/pub_get_all:0-0
Timestamp: 2025-06-27T08:39:36.440Z
Learning: In the Serverpod project, `dart pub get` commands work fine on Flutter packages both locally and in CI environments, even when the package has `flutter: sdk: flutter` dependencies in pubspec.yaml. The technical constraint of Flutter SDK dependencies causing `dart pub` failures may not apply in all environments or recent Dart versions.
Applied to files:
packages/serverpod_client/pubspec.yamltemplates/pubspecs/packages/serverpod_client/pubspec.yamltests/serverpod_test_server/pubspec.yamltemplates/pubspecs/tests/serverpod_test_server/pubspec.yaml
📚 Learning: 2025-07-02T16:07:50.947Z
Learnt from: tp
Repo: serverpod/serverpod PR: 3747
File: modules/new_serverpod_auth/serverpod_auth_migration/serverpod_auth_migration_server/lib/src/business/migrating_email_endpoint_base.dart:4-4
Timestamp: 2025-07-02T16:07:50.947Z
Learning: In Serverpod, tp prefers importing the full package (e.g., 'package:serverpod_auth_migration_server/serverpod_auth_migration_server.dart') as a baseline rather than using smaller local imports, even within the same package where it might be considered a "self-import".
Applied to files:
packages/serverpod/lib/serverpod.darttemplates/pubspecs/packages/serverpod_client/pubspec.yamlpackages/serverpod/lib/src/server/server.darttests/serverpod_test_server/pubspec.yamltemplates/pubspecs/tests/serverpod_test_server/pubspec.yamlexamples/auth_example/auth_example_server/lib/server.dart
📚 Learning: 2025-07-24T13:01:52.743Z
Learnt from: tp
Repo: serverpod/serverpod PR: 3826
File: modules/new_serverpod_auth/serverpod_auth_apple/serverpod_auth_apple_client/lib/serverpod_auth_apple_client.dart:1-1
Timestamp: 2025-07-24T13:01:52.743Z
Learning: High-level serverpod_auth_* packages (like serverpod_auth_apple_client) should re-export their serverpod_auth_* dependencies so that consumers only need to import the high-level package and don't get warnings about importing from non-dependency packages. The re-exports should hide conflicting elements like 'Caller' and 'Protocol' to avoid naming conflicts. This pattern prevents users from needing to directly depend on multiple internal implementation packages.
Applied to files:
packages/serverpod/lib/serverpod.dartexamples/auth_example/auth_example_server/lib/server.dart
📚 Learning: 2025-07-01T13:01:27.054Z
Learnt from: exaby73
Repo: serverpod/serverpod PR: 3741
File: modules/serverpod_auth/serverpod_auth_server/analysis_options.yaml:14-16
Timestamp: 2025-07-01T13:01:27.054Z
Learning: In Serverpod, first-party packages like serverpod_auth_server can appropriately use blanket `invalid_use_of_internal_member: ignore` directives in their analysis_options.yaml since they use internal Database methods internally without exposing them in their public APIs to end users.
Applied to files:
packages/serverpod/lib/serverpod.dartexamples/auth_example/auth_example_server/lib/server.dart
📚 Learning: 2025-11-04T12:09:52.649Z
Learnt from: marcelomendoncasoares
Repo: serverpod/serverpod PR: 4150
File: examples/auth/auth_flutter/lib/widgets/profile_info.dart:23-30
Timestamp: 2025-11-04T12:09:52.649Z
Learning: In Serverpod example and testing projects (e.g., examples/auth/auth_flutter), prefer letting errors bubble up naturally rather than handling them gracefully with catchError or try-catch blocks. This helps developers see what went wrong during development and testing.
Applied to files:
packages/serverpod/lib/serverpod.dartexamples/auth_example/auth_example_server/lib/server.dart
📚 Learning: 2025-08-25T19:46:58.073Z
Learnt from: tp
Repo: serverpod/serverpod PR: 3917
File: modules/new_serverpod_auth/serverpod_auth_idp/serverpod_auth_idp_server/analysis_options.yaml:3-6
Timestamp: 2025-08-25T19:46:58.073Z
Learning: In Serverpod, test tool paths like `test/integration/test_tools/serverpod_test_tools.dart` are configured per project in the "generator.yaml" file and managed by a generator system, so they don't need to be updated manually across all files at once.
Applied to files:
packages/serverpod/lib/serverpod.dartpackages/serverpod/lib/src/server/server.darttests/serverpod_test_server/pubspec.yamltemplates/pubspecs/tests/serverpod_test_server/pubspec.yamlpackages/serverpod_client/test/test_utils/test_http_server.dartexamples/auth_example/auth_example_server/lib/server.dart
📚 Learning: 2025-06-27T07:44:09.048Z
Learnt from: tp
Repo: serverpod/serverpod PR: 3721
File: modules/new_serverpod_auth/serverpod_auth_session/serverpod_auth_session_flutter/test/serverpod_auth_session_flutter_test.dart:1-7
Timestamp: 2025-06-27T07:44:09.048Z
Learning: In Serverpod packages, the `uuid` package is re-exported through a chain: `serverpod_auth_session_client` re-exports `serverpod_client`, which re-exports `serverpod_serialization`, which re-exports `uuid`. This means `Uuid` class is available in files that import `serverpod_auth_session_client` without needing a direct `uuid` package import.
Applied to files:
packages/serverpod/lib/serverpod.dartexamples/auth_example/auth_example_server/lib/server.dart
📚 Learning: 2025-07-02T16:09:27.702Z
Learnt from: tp
Repo: serverpod/serverpod PR: 3747
File: tests/serverpod_new_auth_test/serverpod_new_auth_test_server/pubspec.yaml:37-38
Timestamp: 2025-07-02T16:09:27.702Z
Learning: In Serverpod migration testing, it's appropriate for test servers like serverpod_new_auth_test_server to include dependencies on both legacy packages (e.g., serverpod_auth_server) and new modular packages to enable comprehensive testing of migration paths from old to new authentication systems.
Applied to files:
packages/serverpod/lib/serverpod.darttests/serverpod_test_server/pubspec.yamlexamples/auth_example/auth_example_server/lib/server.dart
📚 Learning: 2025-08-06T06:58:47.019Z
Learnt from: tp
Repo: serverpod/serverpod PR: 3855
File: modules/new_serverpod_auth/serverpod_auth_apple_account/serverpod_auth_apple_account_server/lib/src/business/apple_accounts.dart:143-159
Timestamp: 2025-08-06T06:58:47.019Z
Learning: The `_siwa.decodeAppleServerNotification` method from the sign_in_with_apple_server package automatically performs signature verification against Apple's published keys, including JWT signature verification and certificate chain validation. This means webhook handlers using this method already have built-in security against spoofed notifications.
Applied to files:
modules/new_serverpod_auth/serverpod_auth_idp/serverpod_auth_idp_server/lib/src/providers/apple/business/apple_idp_utils.dart
📚 Learning: 2025-08-06T06:58:47.019Z
Learnt from: tp
Repo: serverpod/serverpod PR: 3855
File: modules/new_serverpod_auth/serverpod_auth_apple_account/serverpod_auth_apple_account_server/lib/src/business/apple_accounts.dart:143-159
Timestamp: 2025-08-06T06:58:47.019Z
Learning: In the sign_in_with_apple_server package, the `decodeAppleServerNotification` method performs complete JWT signature verification against Apple's published public keys. It fetches keys from https://appleid.apple.com/auth/keys, validates the audience and issuer, and cryptographically verifies the JWT signature. This means webhook handlers using this method already have proper security against spoofed notifications without needing additional signature verification code.
Applied to files:
modules/new_serverpod_auth/serverpod_auth_idp/serverpod_auth_idp_server/lib/src/providers/apple/business/apple_idp_utils.dart
📚 Learning: 2025-08-26T13:22:33.125Z
Learnt from: tp
Repo: serverpod/serverpod PR: 3829
File: modules/new_serverpod_auth/serverpod_auth_idp/serverpod_auth_idp_server/lib/src/providers/passkey/business/passkey_accounts.dart:0-0
Timestamp: 2025-08-26T13:22:33.125Z
Learning: The passkeys_server Dart library evolved from version 0.3.0 to 0.4.0, adding required parameters to verifyRegistration and verifyLogin methods for complete WebAuthn security validation including challenge, clientDataJSON, and attestationObject verification.
Applied to files:
modules/new_serverpod_auth/serverpod_auth_idp/serverpod_auth_idp_server/lib/src/providers/apple/business/apple_idp_utils.dartpackages/serverpod/lib/src/server/server.dart
📚 Learning: 2025-07-15T13:38:58.183Z
Learnt from: tp
Repo: serverpod/serverpod PR: 3787
File: modules/new_serverpod_auth/serverpod_auth_apple_account/serverpod_auth_apple_account_server/pubspec.yaml:18-18
Timestamp: 2025-07-15T13:38:58.183Z
Learning: For Sign in with Apple authentication, there are two distinct packages: `sign_in_with_apple` is the client-side package for mobile apps, while `sign_in_with_apple_server` is a server-side utility package for handling Sign in with Apple tokens and validation on Dart servers.
Applied to files:
modules/new_serverpod_auth/serverpod_auth_idp/serverpod_auth_idp_server/lib/src/providers/apple/business/apple_idp_utils.dart
📚 Learning: 2025-07-23T13:18:31.864Z
Learnt from: tp
Repo: serverpod/serverpod PR: 3820
File: modules/new_serverpod_auth/serverpod_auth_profile/serverpod_auth_profile_server/lib/src/endpoints/user_profile_base_endpoint.dart:8-8
Timestamp: 2025-07-23T13:18:31.864Z
Learning: Abstract Endpoint classes in Serverpod should end with the "BaseEndpoint" suffix in their name (e.g., UserProfileBaseEndpoint). This naming convention should be enforced consistently across the codebase.
Applied to files:
packages/serverpod/lib/src/server/endpoint_dispatch.dart
🔇 Additional comments (20)
examples/auth_example/auth_example_server/lib/server.dart (1)
5-5: LGTM! Correctly resolves naming conflict.Hiding the
Messagesymbol from serverpod prevents a clash with the mailer package'sMessageclass, which is used for email composition in this file.templates/pubspecs/packages/serverpod/pubspec.yaml (1)
31-31: LGTM: Relic version bump aligns with API migration.The upgrade to
^0.10.0is consistent across the codebase and supports the Request/Response-based API migration described in the PR objectives.packages/serverpod_client/pubspec.yaml (1)
23-23: LGTM: Consistent dev dependency update.The relic version bump to
^0.10.0as a dev dependency aligns with the broader migration.templates/pubspecs/packages/serverpod_client/pubspec.yaml (1)
22-22: LGTM: Template update consistent with generated files.The relic version bump matches the corresponding changes in generated client pubspecs.
templates/pubspecs/tests/serverpod_test_server/pubspec.yaml (1)
14-14: LGTM: Test server dependency update appropriate.The relic upgrade to
^0.10.0as a regular dependency is appropriate for test server code that directly uses routing and handler functionality.packages/serverpod/pubspec.yaml (1)
32-32: LGTM: Core dependency update enables new API.The relic upgrade to
^0.10.0in the main serverpod package correctly reflects the dependency needed for Request/Response-based routing.tests/serverpod_test_server/pubspec.yaml (1)
15-15: LGTM: Test server dependency consistent with template.The relic version bump matches the template configuration and supports the API migration testing.
packages/serverpod/lib/serverpod.dart (1)
18-18: Verify documentation of ExceptionHandler exposure.This change now publicly exports
ExceptionHandlerfrom relic, which was previously hidden. This expands the public API surface and could cause naming conflicts for consumers with their ownExceptionHandlertypes.Please confirm this API change is documented in the breaking changes section of the PR, specifically noting that
ExceptionHandleris now exported and may require consumers to handle naming conflicts if they have similarly named types.modules/new_serverpod_auth/serverpod_auth_idp/serverpod_auth_idp_server/lib/src/providers/apple/business/apple_idp_utils.dart (1)
203-215: LGTM: Handler correctly migrated to Request/Response pattern.The handler signature and implementation correctly follow the new API pattern:
- Accepts
Request reqparameter instead of Context- Reads body via
req.body.read()stream- Returns
Response.ok()directly instead of using context methodsThe migration preserves the notification decoding and handling logic while adapting to the new request/response flow.
packages/serverpod_client/test/test_utils/test_http_server.dart (1)
40-42: LGTM!The request handler signature correctly migrates to the new Request-based API, and the direct return of the
httpRequestHandlerresult aligns with the Result-based flow.tests/serverpod_test_server/test/middleware_test.dart (3)
102-104: LGTM!The route handler correctly migrates to the Request-based signature and properly accesses authentication info through the new Request extension.
109-111: LGTM!The extension correctly moves from Context to Request, maintaining the same property access pattern for authentication info.
114-121: LGTM!The middleware correctly adapts to the new Request-based flow, returning Response directly instead of using context.respond patterns.
packages/serverpod/lib/src/server/server.dart (7)
158-173: LGTM!The request handler correctly migrates to the Request-based API with proper error handling and fallback to internal server error response.
175-277: LGTM!The request handling flow correctly migrates to the Request-based API, with proper response construction throughout all paths (health checks, OPTIONS, error cases, and normal flow).
293-371: LGTM!The response conversion correctly handles all EndpointResult cases and constructs appropriate Response objects with proper status codes, headers, and body content.
373-407: LGTM!The WebSocket upgrade flow correctly migrates to the new WebSocketUpgrade pattern and Request-based API, maintaining proper error handling and connection tracking.
431-584: LGTM!The URI call handling correctly migrates to return EndpointResult types and uses the Request parameter appropriately throughout the authentication, session creation, and method invocation flow.
279-291: LGTM!The malformed call logging correctly adapts to the EndpointResult type while maintaining the same logging behavior.
602-625: LGTM!The framework exception reporting correctly accepts the optional Request parameter and creates appropriate diagnostic context.
593e780 to
c67fe71
Compare
Changes
relicdependency from^0.9.1to^0.10.0across all packages and templatesAPI Migration
The main breaking change in Relic 0.10.0 is the simplification of the request handling API:
Context,RequestContext,RespondableContext, andHandledContexthave been removed.Requestand returnResponse(or otherResultsub-types).context.connect()replaced withWebSocketUpgradeResulttype renamed toEndpointResultto avoid conflicts with Relic'sResultCode Changes
FutureOr<Result> handleCall(Session session, Request req)context.respond(response)with directreturn responseWebSocketUpgradeconstructorResulttype toEndpointResultto avoid naming conflictsRequestdirectly instead ofContexthide Messageclause to avoid conflicts with mailer package in auth_exampleFixes #?
Pre-launch Checklist
///), and made sure that the documentation follows the same style as other Serverpod documentation. I checked spelling and grammar.If you need help, consider asking for advice on the discussion board.
Breaking changes
This is a breaking change for users who have custom routes or middleware:
Route handlers must update their signature from:
to:
Response handling must change from:
to:
WebSocket upgrades must change from:
to:
Middleware must update to work with
Requestdirectly instead ofContext:Context properties now attach to
Requestinstead ofContext:Summary by CodeRabbit
Release Notes
Refactor
Chores