Skip to content

Conversation

@andythsu
Copy link
Member

Description

byte[] cannot get logged. Changing it to actual String type for logging

Additional context and related issues

Release notes

(X) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text:

* Fix some things. ({issue}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label Dec 21, 2024
@ebyhr ebyhr requested a review from oneonestar December 21, 2024 02:42
Copy link
Contributor

@willmostly willmostly left a comment

Choose a reason for hiding this comment

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

Looks good % @oneonestar 's comment

@andythsu andythsu force-pushed the fix_log branch 3 times, most recently from 8a7b688 to 601ef5b Compare January 11, 2025 04:47
Copy link
Contributor

@willmostly willmostly left a comment

Choose a reason for hiding this comment

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

Almost there

@andythsu andythsu force-pushed the fix_log branch 2 times, most recently from f864013 to a99357f Compare January 15, 2025 20:32
@willmostly willmostly merged commit 40337f6 into trinodb:main Jan 21, 2025
2 checks passed
@github-actions github-actions bot added this to the 14 milestone Jan 21, 2025
private final List<String> statementPaths;
private final boolean includeClusterInfoInResponse;
private final TrinoRequestUser.TrinoRequestUserProvider trinoRequestUserProvider;
private final ProxyResponseConfiguration proxyResponseConfiguration;
Copy link
Member

Choose a reason for hiding this comment

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

Please avoid putting mutable objects in fields.

{
try {
return new ProxyResponse(response.getStatusCode(), response.getHeaders(), response.getInputStream().readAllBytes());
return new ProxyResponse(response.getStatusCode(), response.getHeaders(), new String(response.getInputStream().readNBytes((int) responseSize.toBytes()), StandardCharsets.UTF_8));
Copy link
Member

Choose a reason for hiding this comment

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

Static import UTF_8.

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

Development

Successfully merging this pull request may close these issues.

4 participants