chovy-3012 opened a new pull request, #13435:
URL: https://github.com/apache/seatunnel/pull/13435
### Purpose of this pull request
Fixes #13431
`lance.write.storage.options` was only consumed by `Dataset.create`, so
every other dataset operation — the writer's `Dataset.open` calls, the fragment
write path and the catalog's namespace connection — ran without the configured
credentials and failed with `CredentialsNotLoaded` on `s3://` dataset paths.
The option now lives in `LanceCommonConfig` (shared by sink and catalog) with
`toReadOptions()` / `toWriteParams()` helpers, `LanceSinkWriter` opens through
a single credentialed `openDataset()` path, `FragmentConverter.reconvert`
passes the options into `Fragment.create`, and `LanceCatalogLoader` forwards
them to the directory namespace with the `aws_*` → OpenDAL property-key
translation.
### Does this PR introduce _any_ user-facing change?
Yes. Before this PR, writing to an `s3://` dataset path failed with
`CredentialsNotLoaded` on any node without ambient `AWS_*` credentials — the
underlying library only falls back to the environment, so behavior depended on
each node's setup; now the credentials configured in
`lance.write.storage.options` are used for every dataset operation, so such
jobs succeed without ambient variables. No option name, default value, or
semantics changed, and the `lance.write.storage.options` documentation (EN/ZH)
was updated to describe the behavior. This changes behavior relative to the
released 3.1.0 version.
### How was this patch tested?
Unit tests cover the option plumbing and the key translation; a
deterministic MinIO regression (`LanceS3IT`, as requested in #13431) provides
credentials only through `lance.write.storage.options` with no ambient `AWS_*`
variables, covering a fresh-dataset write and an existing-dataset reopen+append
with row-count readback.
```shell
./mvnw test -pl seatunnel-connectors-v2/connector-lance
# Tests run: 43, Failures: 0, Errors: 0, Skipped: 4
```
`LanceS3IT` (in
`seatunnel-e2e/seatunnel-connector-v2-e2e/connector-lance-e2e`) uses
`batch-size 30` over 100 rows so each job performs multiple
`Fragment.create`/flush cycles; with unfixed code both scenarios fail at an
unconfigured open or fragment path. The same scenario matrix was additionally
verified end to end against a live MinIO with the jar as the only variable:
before the fix the jobs failed (misdiagnosed `already exists` / `was not found`
errors, orphan dataset versions), after it they succeed with rows appended
exactly once.
### 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)
* [x] If necessary, please update the documentation to describe the new
feature. https://github.com/apache/seatunnel/tree/dev/docs
* [x] If necessary, please update `incompatible-changes.md` to describe the
incompatibility caused by this PR.
* [x] If you are contributing the connector code, please check that the
following files are updated:
1. Update
[plugin-mapping.properties](https://github.com/apache/seatunnel/blob/dev/plugin-mapping.properties)
and add new connector information in it
2. Update the pom file of
[seatunnel-dist](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/pom.xml)
3. Add ci label in
[label-scope-conf](https://github.com/apache/seatunnel/blob/dev/.github/workflows/labeler/label-scope-conf.yml)
4. Add e2e testcase in
[seatunnel-e2e](https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/)
5. Update connector
[plugin_config](https://github.com/apache/seatunnel/blob/dev/config/plugin_config)
Notes on the check list: item 1 is n/a — no new jar binary ships with the PR
(the two `connector-lance-e2e` additions are test-scoped dependencies); item 3
is n/a — no option name, default or semantics changed, so there is no
incompatibility to document; the Lance connector already exists, so its
`plugin-mapping.properties`, `seatunnel-dist` pom, `plugin_config` and labeler
entries predate this PR and need no update (items 4.1/4.2/4.3/4.5 n/a; the ci
label entry for lance is tracked by #13394); this PR adds the e2e testcase
`LanceS3IT` (item 4.4).
--
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]