Skip to content

Close e2e gaps and require OTP 27+#211

Merged
benoitc merged 1 commit into
masterfrom
fix/e2e-gaps-otp27
Jun 10, 2026
Merged

Close e2e gaps and require OTP 27+#211
benoitc merged 1 commit into
masterfrom
fix/e2e-gaps-otp27

Conversation

@benoitc

@benoitc benoitc commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Follow-up addressing the gaps found after the e2e work.

CI gates on e2e

The integration job was continue-on-error: true, so the suite could fail without blocking. Removed it; the CouchDB e2e run now gates the build.

Multipart open_doc coverage

The multipart open_doc reader (open_doc(Db, Id, [{attachments, true}]) -> {ok, {multipart, State}} -> stream_doc) had no end-to-end test, despite being the most heavily reworked hackney-4.x path. Added doc_multipart_stream, which saves a doc with two attachments, opens it as a multipart stream, and drives stream_doc/1 to reassemble the document and each attachment byte-for-byte. Verified against CouchDB 3.3. (Note: non-compressible content types are used so CouchDB returns the bytes verbatim; text/* attachments come back gzip-encoded in multipart, which is expected.)

Require OTP 27+

Dropped the {platform_define, "^(2[3-9])", 'USE_CRYPTO_MAC'} shim and the crypto:hmac/3 fallback. couchbeam requires OTP 27+, where crypto:mac/4 is always present. This also removes the footgun where the version regex stopped at 29 and would have fallen back to the removed crypto:hmac/3 on OTP 30.

Verification

rebar3 eunit (32), dialyzer (clean), and make e2e (all 15 groups, 65 tests against CouchDB 3.3) pass.

- CI: integration job now gates the build (was continue-on-error)
- add e2e coverage for the multipart open_doc/stream_doc path (the most
  reworked hackney 4.x code, previously untested end-to-end)
- drop the OTP-version crypto shim: require OTP 27+ and always use
  crypto:mac/4 (removes the platform_define that broke on OTP 30)
- CHANGELOG: note OTP 27+ requirement and e2e testing
@benoitc benoitc merged commit 8a1fe21 into master Jun 10, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant