feat!: migrate to Jackson 3 and rewrite transport as async/reactive#11
Merged
Conversation
…v0.5.0) Every network-calling method now returns CompletableFuture instead of blocking, and every paginated iterate(...)/paginateRequests(...) returns a java.util.concurrent.Flow.Publisher instead of a blocking Iterator, fetching pages only on subscriber demand. Jackson databind moves from com.fasterxml.jackson.core to tools.jackson.core (Jackson 3); java-time support is now built in, dropping the separate jackson-datatype-jsr310 dependency. Also fixes a null-for-primitive deserialization regression surfaced by this migration (Jackson 3 defaults stricter than Jackson 2 for a JSON null mapped to a primitive field) and a doc snippet compile error.
… comments request(n<=0) is now handled consistently by both AsyncPaginatedPublisher and ListPublisher: it no longer releases a drain guard it may not hold, and the drain loop now stops as soon as a reentrant invalid request() has terminated the subscription, instead of continuing to emit the rest of an already in-hand page after onError. Adds a regression test for both publishers. Also fixes a stale IOException reference in HttpTransport's javadoc (left over from before the transport contract became fully unchecked) and an incorrect "jackson-jr"-era reference in a pom.xml comment.
Collaborator
Author
|
Migration requested in #8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates the Java client from Jackson 2 to Jackson 3 (
com.fasterxml.jackson.core->tools.jackson.corefor databind/core; annotations package unchanged) and rewrites the transport layer to be fully asynchronous and reactive: every network-calling method now returnsCompletableFuture, and every paginatediterate(...)/paginateRequests(...)returns ajava.util.concurrent.Flow.Publisherinstead of a blockingIterator, fetching pages only on subscriber demand. This is a breaking change to the public API, bumping the client to0.5.0.Along the way it also fixes:
nullmapped onto a primitive field, e.g.ActorRunStatsbefore a run's stats are fully populated).AsyncPaginatedPublisher/ListPublisher: a reentrantrequest(n<=0)could allow furtheronNextafter termination and released a drain guard it did not own. Covered by two new regression tests.README.md.Verified: full unit and integration test suite passes against the live API, plus
spotless:checkandspotbugs:checkclean.