Skip to content

Fixes vertx can not receive the request body#2241

Merged
eolivelli merged 9 commits intoapache:masterfrom
zymap:fix-can-not-read-body
Mar 9, 2020
Merged

Fixes vertx can not receive the request body#2241
eolivelli merged 9 commits intoapache:masterfrom
zymap:fix-can-not-read-body

Conversation

@zymap
Copy link
Copy Markdown
Member

@zymap zymap commented Jan 13, 2020


Motivation

Vertx can not receive the request body so that the REST API
can not work well if you have a request with body.

Modifications

  • Add body handler for the vertx http service

Verify this change

  • Pass the test testHttpMethodsWithBody

Descriptions of the changes in this PR:

Motivation

(Explain: why you're making that change, what is the problem you're trying to solve)

Changes

(Describe: what changes you have made)

Master Issue: #


In order to uphold a high standard for quality for code contributions, Apache BookKeeper runs various precommit
checks for pull requests. A pull request can only be merged when it passes precommit checks. However running all
the precommit checks can take a long time, some trivial changes don't need to run all the precommit checks. You
can check following list to skip the tests that don't need to run for your pull request. Leave them unchecked if
you are not sure, committers will help you:

  • [skip bookkeeper-server bookie tests]: skip testing org.apache.bookkeeper.bookie in bookkeeper-server module.
  • [skip bookkeeper-server client tests]: skip testing org.apache.bookkeeper.client in bookkeeper-server module.
  • [skip bookkeeper-server replication tests]: skip testing org.apache.bookkeeper.replication in bookkeeper-server module.
  • [skip bookkeeper-server tls tests]: skip testing org.apache.bookkeeper.tls in bookkeeper-server module.
  • [skip bookkeeper-server remaining tests]: skip testing all other tests in bookkeeper-server module.
  • [skip integration tests]: skip docker based integration tests. if you make java code changes, you shouldn't skip integration tests.
  • [skip build java8]: skip build on java8. ONLY skip this when ONLY changing files under documentation under site.
  • [skip build java11]: skip build on java11. ONLY skip this when ONLY changing files under documentation under site.


Be sure to do all of the following to help us incorporate your contribution
quickly and easily:

If this PR is a BookKeeper Proposal (BP):

  • Make sure the PR title is formatted like:
    <BP-#>: Description of bookkeeper proposal
    e.g. BP-1: 64 bits ledger is support
  • Attach the master issue link in the description of this PR.
  • Attach the google doc link if the BP is written in Google Doc.

Otherwise:

  • Make sure the PR title is formatted like:
    <Issue #>: Description of pull request
    e.g. Issue 123: Description ...
  • Make sure tests pass via mvn clean apache-rat:check install spotbugs:check.
  • Replace <Issue #> in the title with the actual Issue number.

---

*Motivation*

Vertx can not receive the request body so that the REST API
can not work well if you have a request with body.

*Modifications*

- Add body handler for the vertx http service

*Verify this change*

- Pass the test `testHttpMethodsWithBody`
@eolivelli
Copy link
Copy Markdown
Contributor

Thank you.
We should port this to 4.10 branch

@zymap
Copy link
Copy Markdown
Member Author

zymap commented Jan 14, 2020

@eolivelli my pleasure.

All ci has been passed. PTAL. Thanks.

@eolivelli
Copy link
Copy Markdown
Contributor

@jiazhai can you please take a look ?

@zymap zymap force-pushed the fix-can-not-read-body branch from c9ddfa3 to 6d68332 Compare January 17, 2020 15:10
@eolivelli
Copy link
Copy Markdown
Contributor

eolivelli commented Jan 21, 2020

Travis did not pass please check

@zymap
Copy link
Copy Markdown
Member Author

zymap commented Jan 22, 2020

The Travis failed with this The job exceeded the maximum time limit for jobs, and has been terminated.. It seems not related to this PR. How can I retrigger this?

@eolivelli
Copy link
Copy Markdown
Contributor

sure, just click on "Restart Job" Button

@sijie
Copy link
Copy Markdown
Member

sijie commented Jan 24, 2020

@zymap Can you please fix the style issues?

[ERROR] src/test/java/org/apache/bookkeeper/discover/TestZkRegistrationManager.java:[30] (imports) ImportOrder: Import org.junit.Assert.assertTrue appears after other imports that it should precede
[ERROR] src/test/java/org/apache/bookkeeper/discover/TestZkRegistrationManager.java:[58,95] (whitespace) WhitespaceAfter: ',' is not followed by whitespace.
[ERROR] src/test/java/org/apache/bookkeeper/discover/TestZkRegistrationManager.java:[58,103] (whitespace) ParenPad: ')' is preceded with whitespace.
[ERROR] src/test/java/org/apache/bookkeeper/discover/TestZkRegistrationManager.java:[60,51] (whitespace) WhitespaceAfter: ',' is not followed by whitespace.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.0.0:check (default-cli) on project bookkeeper-server: You have 4 Checkstyle violations. -> [Help 1]
[ERROR] 

@eolivelli
Copy link
Copy Markdown
Contributor

@sijie I would like to merge this change, can you please take a look ?

@eolivelli
Copy link
Copy Markdown
Contributor

@zymap can you please rebase to current master ?
we have fixed a problem with github actions and checkout

@eolivelli eolivelli added this to the 4.11.0 milestone Mar 9, 2020
@eolivelli eolivelli merged commit 92f75da into apache:master Mar 9, 2020
Ghatage pushed a commit to Ghatage/bookkeeper that referenced this pull request Jun 19, 2020
---

*Motivation*

Vertx can not receive the request body so that the REST API
can not work well if you have a request with body.

*Modifications*

- Add body handler for the vertx http service

*Verify this change*

- Pass the test `testHttpMethodsWithBody`

Descriptions of the changes in this PR:



### Motivation

(Explain: why you're making that change, what is the problem you're trying to solve)

### Changes

(Describe: what changes you have made)

Master Issue: #<master-issue-number>




Reviewers: Enrico Olivelli <eolivelli@gmail.com>, Sijie Guo <sijie@apache.org>

This closes apache#2241 from zymap/fix-can-not-read-body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants