Skip to content

Conversation

@KodaiD
Copy link
Contributor

@KodaiD KodaiD commented Dec 8, 2025

Description

This PR fixes the upper limit value displayed in the error message. The current implementation does not account for Base64 encoding.

Related issues and/or PRs

Changes made

  • Updated the limit value.

Checklist

  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation to reflect the changes.
  • I have considered whether similar issues could occur in other products, components, or modules if this PR is for bug fixes.
  • Any remaining open issues linked to this PR are documented and up-to-date (Jira, GitHub, etc.).
  • Tests (unit, integration, etc.) have been added for the changes.
  • My changes generate no new warnings.
  • Any dependent changes in other PRs have been merged and published.

Additional notes (optional)

N/A

Release notes

Updated the upper limit value displayed in the error message for data size limitation in Object Storage adapter.

@KodaiD KodaiD self-assigned this Dec 8, 2025
@KodaiD KodaiD added the bugfix label Dec 8, 2025
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @KodaiD, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a minor but important bug in the Object Storage adapter where the error message for exceeding blob size limits displayed an incorrect maximum length. The fix updates the error message to correctly reflect the allowedLength, which properly accounts for the overhead introduced by Base64 encoding. This ensures that users receive accurate information when encountering data size limitations, improving the clarity and helpfulness of error reporting.

Highlights

  • Error Message Correction: The pull request fixes an issue where the upper limit value displayed in an error message for blob size limitations was incorrect.
  • Base64 Encoding Consideration: The previous error message did not account for Base64 encoding, leading to an inaccurate representation of the allowed data size. This change ensures the displayed limit is correct.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly fixes an issue where the error message for an oversized blob displayed an incorrect size limit. By passing allowedLength to buildMessage, the error message now accurately reflects the pre-Base64 encoding size limit, making it much clearer for users. The change is correct and addresses the issue described. For future robustness, consider enhancing the corresponding unit test (check_PutGiven_WhenBlobColumnExceedsLimit_ShouldThrowIllegalArgumentException) to assert the content of the exception message. This would verify that the correct limit is being displayed and prevent potential regressions.

@KodaiD KodaiD marked this pull request as ready for review December 8, 2025 12:14
Copilot AI review requested due to automatic review settings December 8, 2025 12:14
@KodaiD KodaiD requested a review from brfrn169 December 8, 2025 12:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes an incorrect error message in the Object Storage adapter's blob size validation. The error message was displaying the raw maximum string length (Integer.MAX_VALUE) instead of the actual allowed blob size, which must account for Base64 encoding overhead.

Key Changes:

  • Updated the error message parameter from Serializer.MAX_STRING_LENGTH_ALLOWED to allowedLength to correctly reflect the Base64-adjusted limit

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@brfrn169 brfrn169 left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

@brfrn169 brfrn169 requested a review from komamitsu December 9, 2025 00:08
Copy link
Contributor

@komamitsu komamitsu left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants