Skip to content

chore: Upgrade serverpod to relic 0.13.0 - #4382

Merged
nielsenko merged 4 commits into
serverpod:mainfrom
nielsenko:update-relic-0.13.0
Dec 8, 2025
Merged

nielsenko merged 4 commits into
serverpod:mainfrom
nielsenko:update-relic-0.13.0

Conversation

@nielsenko

@nielsenko nielsenko commented Dec 8, 2025 •

Copy link
Copy Markdown
Collaborator

Bump relic to ^0.13.0 and use Request.readAsString for body reading.

Also fixes file upload by awaiting both pipe and send concurrently, then draining the response. This is an alternative (/better) fix for #3213 that avoid draining the too large request server side.

Pre-launch Checklist

  • I read the Contribute page and followed the process outlined there for submitting PRs.
  • This update contains only one single feature or bug fix and nothing else.
  • I read and followed the Dart Style Guide and formatted the code with dart format.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making.
  • All existing and new tests are passing.
  • Any breaking changes are documented below.

Fixes: #3213 (again, but client-side)

Breaking changes

None.

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Improved handling and error reporting for oversized HTTP request bodies across the server.
    • Enhanced file upload reliability through improved concurrent stream and request handling with proper cleanup.
  • Chores

    • Updated relic dependency from 0.12.0 to 0.13.0 across packages and templates.

✏️ Tip: You can customize this high-level summary in your review settings.

@nielsenko nielsenko self-assigned this Dec 8, 2025
@nielsenko
nielsenko force-pushed the update-relic-0.13.0 branch from 6c1e90a to 5e3b352 Compare December 8, 2025 11:10
@nielsenko

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Dec 8, 2025

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@nielsenko
nielsenko marked this pull request as ready for review December 8, 2025 11:19
@coderabbitai

coderabbitai Bot commented Dec 8, 2025 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Request body reading in the server has been refactored to use req.readAsString with MaxBodySizeExceeded exception handling, replacing a private _readBody method. The client file uploader now concurrently pipes request streams and waits on both operations. The relic dependency is bumped from ^0.12.0 to ^0.13.0 across multiple packages.

Changes

Cohort / File(s) Summary
Server request body handling
packages/serverpod/lib/src/server/server.dart
Refactored endpoint request body reading to call req.readAsString(maxLength: serverpod.config.maxRequestSize) directly. Removed the private _readBody method and _RequestTooLargeException class. Updated oversized request handling to catch MaxBodySizeExceeded and return 413 with a generic message.
Client file upload streaming
packages/serverpod_client/lib/src/file_uploader.dart
Changed binary upload to concurrently pipe the stream into the request sink and send the request, then drain the response stream before evaluating the status code, replacing the previous fire-and-forget pipe with explicit await.
Relic dependency updates
packages/serverpod/pubspec.yaml,
packages/serverpod_client/pubspec.yaml,
templates/pubspecs/packages/serverpod/pubspec.yaml,
templates/pubspecs/packages/serverpod_client/pubspec.yaml,
templates/pubspecs/tests/serverpod_test_server/pubspec.yaml,
tests/serverpod_test_server/pubspec.yaml
Updated relic dependency constraint from ^0.12.0 to ^0.13.0 across six pubspec files.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • packages/serverpod/lib/src/server/server.dart: Exception handling and body-reading mechanism refactoring requires verification that MaxBodySizeExceeded is properly caught and error message formatting is preserved.
  • packages/serverpod_client/lib/src/file_uploader.dart: Stream concurrency and drainage pattern warrants careful review to ensure response handling is correct and no streams are left in inconsistent states.
  • Dependency updates: Homogeneous changes across multiple files; review relic v0.13.0 changelog for breaking changes or required code adjustments.

Possibly related PRs

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description lacks the required issue listing. While the title and main description are clear, and the pre-launch checklist is mostly complete, the critical requirement to explicitly list issues in the description section is unfulfilled. Add an explicit 'Fixes:' or 'Issues:' section in the main description above the pre-launch checklist listing the GitHub issue(s) this PR addresses, not just in the checklist items.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: upgrading the relic dependency to version 0.13.0 across the repository, which is the primary focus of this PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@nielsenko
nielsenko requested a review from SandPod December 8, 2025 11:24

@SandPod SandPod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One comment that seemed strange to me.

@nielsenko
nielsenko requested a review from SandPod December 8, 2025 13:00

@SandPod SandPod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚀

@nielsenko
nielsenko merged commit 4f14297 into serverpod:main Dec 8, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ByteData Serialization Bug (Image Upload)

2 participants