Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ledger-api-client: Rename maxInboundMessageSize to maxInboundMetadataSize. #7290

Merged

Conversation

ghost
Copy link

@ghost ghost commented Sep 1, 2020

Changelog

  • [Scala Bindings] Rename a field in the LedgerClientConfiguration to maxInboundMetadataSize, to match the builder Netty channel builder. It was incorrectly named maxInboundMessageSize, which is a different channel property that configures the maximum message size, not the header size.
  • [Scala Bindings] Replace the LedgerClientConfiguration.maxInboundMessageSize property with a new one that represents the maximum size of the response body.

Pull Request Checklist

  • Read and understand the contribution guidelines
  • Include appropriate tests
  • Set a descriptive title and thorough description
  • Add a reference to the issue this PR will solve, if appropriate
  • Include changelog additions in one or more commit message bodies between the CHANGELOG_BEGIN and CHANGELOG_END tags
  • Normal production system change, include purpose of change in description

NOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with /AzurePipelines run to
trigger the build.

CHANGELOG_BEGIN
- [Scala Bindings] Rename a field in the ``LedgerClientConfiguration``
  to ``maxInboundMetadataSize``, to match the builder Netty channel
  builder. It was incorrectly named ``maxInboundMessageSize``, which is
  a different channel property that configures the maximum message size,
  not the header size.
CHANGELOG_END
Copy link
Contributor

@stefanobaghino-da stefanobaghino-da left a comment

Choose a reason for hiding this comment

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

Having a look at this commit it appears that the actual fix should be to use the proper method, rather than renaming the configuration option.

@ghost
Copy link
Author

ghost commented Sep 1, 2020

I don't know what you mean, @stefanobaghino-da. I think the issue was that I copied the wrong name from the GrpcServer.Owner class, not that the method call is wrong.

On the client side, gRPC errors are sent as part of the headers, not the body, so this field makes the header size configurable to make it possible to send a larger error message.

@stefanobaghino-da
Copy link
Contributor

I don't know what you mean, @stefanobaghino-da. I think the issue was that I copied the wrong name from the GrpcServer.Owner class, not that the method call is wrong.

On the client side, gRPC errors are sent as part of the headers, not the body, so this field makes the header size configurable to make it possible to send a larger error message.

Then I would suggest you add a further option. We need to be able to set the message size.

@ghost
Copy link
Author

ghost commented Sep 1, 2020

Agreed. It turns out people already do this by passing an already-configured builder to LedgerClient.fromBuilder, which is how I discovered that there was an issue here. I wanted to fix the problem before introducing a new feature.

@stefanobaghino-da
Copy link
Contributor

The fix is so small and easy that I think it's fine to have them both in the same PR. Furthermore, I'd prefer if we could try to maintain the discipline to not break the API if we don't have to (which in Scala also means parameter names).

@ghost
Copy link
Author

ghost commented Sep 1, 2020

OK, cool, I'll get it in.

We use this a lot; easier if it's in the configuration.

CHANGELOG_BEGIN
- [Scala Bindings] Replace the
  ``LedgerClientConfiguration.maxInboundMessageSize`` property with a
  new one that represents the maximum size of the response body.
CHANGELOG_END
@leo-da
Copy link
Contributor

leo-da commented Sep 1, 2020

http-json and extractor changes look good. Thanks!

Copy link
Contributor

@stefanobaghino-da stefanobaghino-da left a comment

Choose a reason for hiding this comment

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

Looks excellent to me. 🙂

@ghost ghost added the automerge label Sep 2, 2020
@mergify mergify bot merged commit 2b3cf1b into master Sep 2, 2020
@mergify mergify bot deleted the samir/ledger/ledger-api-client/rename-configuration-property branch September 2, 2020 08:41
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.

3 participants