pjfanning opened a new pull request, #1934:
URL: https://github.com/apache/pekko-connectors/pull/1934

   ### Motivation
   The connector only knew about `ApiVersion.V5` and `V7`, so users on 
Elasticsearch 8 or 9 had to declare `V7` and hope. Neither server line was 
covered by any test.
   
   ### Modification
   **Main source**
   - Added `V8` and `V9` to `ApiVersion`, with matching 
`ElasticsearchParams.V8` / `V9` factories that take an index name only (mapping 
types are gone).
   - Both dispatch to the existing V7 REST implementation in 
`ElasticsearchSimpleFlowStage` and `ElasticsearchSourceStage`. That 
implementation is already type-less: `RestBulkApiV7` never emits `_type`, the 
search endpoint is `/<index>/_search`, and hit parsing reads only `_id`, 
`_source` and `_version` — all of which survive the removal of mapping types.
   
   **Tests**
   - New `elasticsearch8` (8.19.21, port 9205) and `elasticsearch9` (9.5.3, 
port 9206) compose services, with `xpack.security.enabled=false` and a 512m 
heap so the two extra nodes do not blow up the CI footprint; both started by 
the `elasticsearch` CI job.
   - Both Scala and Java `constructElasticsearchParams` helpers learn the new 
versions.
   - `ElasticsearchSpec` runs the full `ElasticsearchConnectorBehaviour` suite 
against each new server, and `ElasticsearchParameterizedTest` covers ports 
9205/9206.
   - `createStrictMapping` declares mappings without the `_doc` type and 
without `include_type_name` for V8/V9 — Elasticsearch 8 removed both.
   - The two strict-mapping error assertions now match the stable part of the 
reason instead of the trailing `within [_doc]`, which is server-internal and 
varies by major version.
   
   **Docs**
   - `elasticsearch.md` documents `V8`/`V9` in both settings tables and in the 
supported-API-versions section.
   
   No existing signature changed; `elasticsearch/mimaReportBinaryIssues` is 
clean.
   
   ### Result
   Elasticsearch 8 and 9 users can name their actual server version, and both 
lines are exercised by the full connector behaviour suite in Scala and by the 
parameterized test in Java.
   
   `V8` and `V9` behave identically today — they are separate constants so the 
setting keeps its meaning if the two lines diverge, the same way 
`OpensearchApiVersion.V1` maps onto the V7 shape.
   
   ### Tests
   - `sbt "elasticsearch/Test/compile"` — success
   - `sbt "++3.3.8 elasticsearch/Test/compile"` — success (Scala 3)
   - `sbt "elasticsearch/mimaReportBinaryIssues"` — success, no issues
   - `sbt "elasticsearch/scalafmtAll" "elasticsearch/javafmtAll"` — success
   - Integration run not done locally (no Docker on this machine); relying on 
the `elasticsearch` CI job to exercise 8.19.21 and 9.5.3.
   
   ### References
   None — Elasticsearch 8 and 9 server support


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to