Conversation
There was a problem hiding this comment.
Pull request overview
Adds client-side support for InfluxDB v3 partial writes by introducing a structured PartialWriteError and aligning write routing defaults with the v3 /api/v3/write_lp contract, while preserving v2 compatibility via an explicit option.
Changes:
- Introduces
PartialWriteError(with per-line error details) and updatesHttpErrormessage formatting for v3 write errors. - Switches default write routing to
/api/v3/write_lp, addsacceptPartial/useV2Apioptions, and wires them through connection string + env parsing. - Updates unit/integration tests and documentation to cover partial-write behavior and v2 compatibility mode.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/client/src/errors.ts | Adds PartialWriteError + parsing utilities; adjusts v3 write error message formatting. |
| packages/client/src/impl/WriteApiImpl.ts | Routes writes to v3 by default; adds accept_partial=false + useV2Api routing + validation; converts HttpError → PartialWriteError when applicable. |
| packages/client/src/options.ts | Adds acceptPartial/useV2Api to WriteOptions, defaults, and parses new connection/env keys. |
| packages/client/src/InfluxDBClient.ts | Documents new connection string and env configuration keys. |
| packages/client/test/unit/errors.test.ts | Adds coverage for new v3 error formatting and PartialWriteError.fromHttpError. |
| packages/client/test/unit/Write.test.ts | Updates expected write endpoints; adds tests for acceptPartial, useV2Api, validation, and PartialWriteError behavior. |
| packages/client/test/unit/Influxdb.test.ts | Adds tests for connection string and env parsing of new write options; updates expected default write path in mocks. |
| packages/client/test/integration/e2e.test.ts | Adds E2E assertions for partial-write structured errors and v2 compatibility behavior. |
| packages/client/test/unit/impl/node/NodeHttpTransport.test.ts | Increases wait time / improves diagnostics for a cancellation-related timing assertion. |
| packages/client/test/unit/impl/browser/FetchTransport.test.ts | Same timing stabilization for fetch transport test. |
| README.md | Documents partial write defaults, PartialWriteError, and v2 compatibility option. |
| CHANGELOG.md | Notes breaking change: v3 write defaults + partial write support. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5bca69d to
abca1d0
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
7b44b57 to
e9ab584
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
karel-rehor
left a comment
There was a problem hiding this comment.
Partial review encountered a minor problem with comments that needs to be addressed.
karel-rehor
left a comment
There was a problem hiding this comment.
I tried the steps in PR description and in new README.md section with a local client and setup with Influxdb3 Core (with node v20.19.6 and latest v25.9). Everything works as documented.
Tests also run locally without issue.
Looks good to me. 🚴 🏁
Proposed Changes
Adds partial-write support with structured error details in
PartialWriteError, including per-linelineNumber,errorMessage, andoriginalLineso callers can decide whether to drop/retry/fix specific lines in a batch.This also aligns write routing with the rollout contract:
/api/v3/write_lpacceptPartialdefaults totrue(server default behavior)accept_partial=falseis sent only when partial writes are explicitly disableduseV2Apiroutes writes to/api/v2/writefor Clustered/v2-compatible backendsConfiguration surfaces now include:
acceptPartial,useV2ApiwriteAcceptPartial,writeUseV2ApiINFLUX_WRITE_ACCEPT_PARTIAL,INFLUX_WRITE_USE_V2_APIValidation:
useV2Api=truewithnoSync=trueis rejected before request dispatch.See Partial writes in InfluxDB documentation.
Example:
Optional v2 compatibility mode:
Checklist