Port to OTP 28/29 and hackney 4.2.2#209
Merged
Merged
Conversation
- replace deprecated standalone catch with try/catch (OTP 29) - migrate to hackney 4.2.2: eager response bodies, drop skip_body/1 - rework pull-based streaming downloads (multipart open_doc, fetch_attachment/stream_attachment, stream_doc) onto hackney async mode - bump meck to 1.2.0 for OTP 29, update test mocks to eager-body shapes - add OTP 29 to CI matrix, bump version to 2.1.0
- couchbeam_view: gate {async, once} streaming on the owner's stream_next
so the stream process stays alive until the first batch is consumed
(it was racing to exit, which broke stream_next/1)
- integration suite: drop removed hackney:skip_body/1 in create_mango_index
- FreeBSD CI: pkg upgrade before install to fix the git/pcre2 ABI mismatch
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.
Finishes the port to Erlang/OTP 28 and 29 with the latest hackney and the stdlib
jsonmodule.OTP 28/29
catchexpressions withtry ... catch ... end(thecase catch decodebecomestry ... of ... catch), clearing the new OTP 29 deprecated-catchwarnings.hackney 2.0.1 to 4.2.2
hackney 4.x changes the response model, so this is more than a version bump:
{ok, Status, Headers, Body}(4th element is the body binary, not a connection pid).db_resp/2,json_body/1, and the call sites are updated accordingly.hackney:skip_body/1was removed; those calls are dropped since the body is read directly.open_doc,fetch_attachment/stream_attachmentwithstream, andstream_docare reworked onto hackney's async ({async, once}) mode via a small pull shim incouchbeam_httpc(stream_request/5,stream_body/1,stream_body_all/1). The public streaming API is unchanged.skip_bodycleanups were replaced withhackney:close/1.Tests
Verification
xrefclean,dialyzerclean, all 32 eunit tests pass.Version bumped to 2.1.0.