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

[FLINK-12781] [Runtime/REST] include the whole stack trace in response payload #8665

Closed
wants to merge 1 commit into from

Conversation

stevenzwu
Copy link

No description provided.

@flinkbot
Copy link
Collaborator

flinkbot commented Jun 8, 2019

Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.

Automated Checks

Last check on commit f01bf7b (Tue Aug 06 16:02:23 UTC 2019)

Warnings:

  • No documentation files were touched! Remember to keep the Flink docs up to date!

Mention the bot in a comment to re-run the automated checks.

Review Progress

  • ❓ 1. The [description] looks good.
  • ❓ 2. There is [consensus] that the contribution should go into to Flink.
  • ❓ 3. Needs [attention] from.
  • ❓ 4. The change fits into the overall [architecture].
  • ❓ 5. Overall code [quality] is good.

Please see the Pull Request Review Guide for a full explanation of the review process.


The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commands
The @flinkbot bot supports the following commands:

  • @flinkbot approve description to approve one or more aspects (aspects: description, consensus, architecture and quality)
  • @flinkbot approve all to approve all aspects
  • @flinkbot approve-until architecture to approve everything until architecture
  • @flinkbot attention @username1 [@username2 ..] to require somebody's attention
  • @flinkbot disapprove architecture to remove an approval you gave earlier

@stevenzwu
Copy link
Author

stevenzwu commented Jun 10, 2019

test failed due to this change. increased max content length in test code

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
content-length: 6469 Try to raise [rest.client.max-content-length]```

@stevenzwu
Copy link
Author

latest travis build seems to fail with build timeout

@stevenzwu stevenzwu closed this Jun 14, 2019
@stevenzwu stevenzwu reopened this Jun 14, 2019
@stevenzwu stevenzwu closed this Jun 28, 2019
@stevenzwu stevenzwu reopened this Jun 28, 2019
@StephanEwen
Copy link
Contributor

Having the stack trace is indeed helpful.

The response can however still fail due to messages with a stack trace longer than the content length.
I think we need to cut the stack trace to be below the max contents length. That may loose some parts of the stack trace in the end, but otherwise the whole response can fail.

@stevenzwu stevenzwu closed this Jul 3, 2019
@stevenzwu stevenzwu reopened this Jul 3, 2019
@stevenzwu
Copy link
Author

stevenzwu commented Jul 3, 2019

@StephanEwen that is a great point. I should have looked into what the test failure really means, instead of just increase the max content length in the test class. there are already a few test methods verify the max content length.

I can get the maxContentLength config from FlinkHttpObjectAggregator ChannelHandler. However, I found it tricky to determine the truncation size, because there are some other byte overhead in the payload. e.g. for the RestServerEndpointITCase, the magic number seems to be 81. I will update PR with a 1 KB overhead buffer. Let me know if you have any other suggestion.

FlinkHttpObjectAggregator flinkHttpObjectAggregator = ctx.pipeline().get(FlinkHttpObjectAggregator.class);
String stackTrace = Ascii.truncate(ExceptionUtils.stringifyException(rhe), flinkHttpObjectAggregator.maxContentLength() - 81, "...");

Also note that default maxContent length is 100 MB
https://ci.apache.org/projects/flink/flink-docs-stable/ops/config.html#rest-server-max-content-length

@stevenzwu stevenzwu force-pushed the FLINK-12781 branch 2 times, most recently from 5d0de1b to 0ceb0dd Compare July 3, 2019 19:53
@flinkbot
Copy link
Collaborator

flinkbot commented Jul 6, 2019

CI report for commit f01bf7b: ERROR Build

@flinkbot
Copy link
Collaborator

flinkbot commented Jul 22, 2019

CI report:

@StephanEwen
Copy link
Contributor

This looks good. Will rebase and test this...

StephanEwen pushed a commit to StephanEwen/flink that referenced this pull request Aug 2, 2019
StephanEwen pushed a commit to StephanEwen/flink that referenced this pull request Aug 6, 2019
@asfgit asfgit closed this in 584d890 Aug 6, 2019
becketqin pushed a commit to becketqin/flink that referenced this pull request Aug 17, 2019
becketqin pushed a commit to becketqin/flink that referenced this pull request Aug 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants