goutamadwant opened a new pull request, #12193:
URL: https://github.com/apache/seatunnel/pull/12193
### Purpose of this pull request
Closes #12190.
The `AMAZON` branch of `EmbeddingTransform` creates `BedrockModel` without
the configured invocation options. It falls back to one SeaTunnel attempt even
when `model_retry_max_attempts` is greater than 1.
This follow-up to #10863 passes the options through the existing client
factory and model constructor, allowing the common runtime to use the
configured retry and backoff settings. No public API or dependency is added.
### Does this PR introduce _any_ user-facing change?
Yes. Amazon embedding honors configured SeaTunnel retry and backoff
settings. With three configured attempts, two retryable model errors followed
by a successful response now succeed; previously the transform failed on the
first response.
The default remains one SeaTunnel attempt. Configured additional attempts
can incur additional model charges. The AWS SDK may retry HTTP calls within
each SeaTunnel attempt; its existing retry policy is unchanged.
Existing constructors, credentials, endpoint handling, batching, output
schema and client ownership are preserved. SDK timeout behavior is also
unchanged: `model_request_timeout_ms` is not currently applied to Bedrock
calls. Timeout enforcement is outside this patch. English and Chinese
documentation and upgrade notes describe the correction and limitation.
### How was this patch tested?
Added eight regressions through the actual transform: retry recovery and
exhaustion, default single attempt, authentication failure, malformed JSON,
missing vectors, external-interrupt preservation without additional HTTP
requests, and configuration validation before client construction. HTTP
fixtures use the real AWS SDK with synthetic local responses; no AWS account or
model service is required. HTTP 424 fixtures distinguish SeaTunnel retries from
SDK internal HTTP retries.
The retry regression fails on the original code on Java 8 and Java 11. The
complete transform unit suite passes on both runtimes: 1,117 tests, zero
failures, errors or skips.
```shell
./mvnw -B -ntp -pl seatunnel-transforms-v2 -Dskip.spotless=true clean test
```
Run with Java 8 and Java 11. Repository-wide `./mvnw spotless:apply` and
`./mvnw -q -DskipTests verify` also pass, with the latter run on Java 11. The
full-repository build skips tests; it is separate from the transform unit-suite
results above.
### Check list
* [x] If any new Jar binary package adding in your PR, please add License
Notice according
[New License
Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/developer/new-license.md)
— No new dependency.
* [x] If necessary, please update the documentation to describe the new
feature. https://github.com/apache/seatunnel/tree/dev/docs — English and
Chinese embedding documentation updated.
* [x] If necessary, please update `incompatible-changes.md` to describe the
incompatibility caused by this PR. — English and Chinese upgrade notes added.
* [x] If you are contributing the connector code, please check that the
following files are updated: — Not applicable; this changes an existing
transform.
1. Update
[plugin-mapping.properties](https://github.com/apache/seatunnel/blob/dev/plugin-mapping.properties)
and add new connector information in it — Not applicable.
2. Update the pom file of
[seatunnel-dist](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/pom.xml)
— Not applicable.
3. Add ci label in
[label-scope-conf](https://github.com/apache/seatunnel/blob/dev/.github/workflows/labeler/label-scope-conf.yml)
— Not applicable.
4. Add e2e testcase in
[seatunnel-e2e](https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/)
— Local SDK/transform regression fixtures cover the changed path; no new
connector.
5. Update connector
[plugin_config](https://github.com/apache/seatunnel/blob/dev/config/plugin_config)
— Not applicable.
--
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]