chovy-3012 opened a new issue, #13431: URL: https://github.com/apache/seatunnel/issues/13431
### Search before asking - [x] I had searched in the [issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22) and found no similar issues. ### What happened **Expected**: `lance.write.storage.options` is the documented way to pass storage parameters, including credentials, to Lance. With valid credentials configured there, a sink job whose `dataset_path` points to S3-compatible object storage (e.g. `s3://...`) should write the data and finish successfully. **Actual**: The job fails with `Failed to get AWS credentials: CredentialsNotLoaded` even though the configured credentials are valid — whether the job can authenticate depends on the node's ambient `AWS_*` environment variables rather than on the configured option, so the same job's outcome varies from node to node and the problem looks intermittent across a cluster. The failed job leaves no data: only an empty dataset version appears in the bucket, and the reported error contradicts the actual storage state (e.g. `Dataset at path ... was not found` for a dataset the job itself just created). The Lance catalog fails against the same storage as well, reporting `region is missing` even though the region is configured in the same option. ### SeaTunnel Version 3.1.0 (also present on current dev) ### SeaTunnel Config **Precondition**: an S3-compatible object storage (e.g. MinIO) reachable from the SeaTunnel node, with valid credentials; the target dataset does not exist yet. The job below passes the credentials only via `lance.write.storage.options` (no `AWS_*` environment variables are set on the node): ```hocon env { parallelism = 1 job.mode = "BATCH" } source { FakeSource { row.num = 100 schema = { fields { c_int = int c_bigint = bigint c_string = string } } plugin_output = "fake" } } sink { Lance { dataset_path = "s3://my-bucket/lance/fresh_table" namespace_type = "dir" table = "fresh_table" "lance.write.storage.options" = { aws_endpoint_url = "http://minio.example.com:9000" aws_access_key_id = "<your-access-key-id>" aws_secret_access_key = "<your-secret-access-key>" allow_http = "true" aws_default_region = "us-east-1" } } } ``` ### Running Command **Step**: submit the job with the config above: ```shell sh bin/seatunnel.sh --config config/lance_s3.conf -e local ``` ### Error Exception **Expected**: the job writes the 100 rows to `s3://my-bucket/lance/fresh_table` and finishes successfully. **Actual**: the job fails with: ```log org.apache.seatunnel.connectors.seatunnel.lance.exception.LanceConnectorException: ErrorCode:[LANCE-03], ErrorDescription:[DataSet path open exception] - Failed to create dataset: Dataset at path lance/fresh_table was not found: LanceError(IO): Generic N/A error: Encountered internal error. Please file a bug report at https://github.com/lancedb/lance/issues. Failed to get AWS credentials: CredentialsNotLoaded(CredentialsNotLoaded { source: Some("no providers in chain provided credentials") }), /workspace/rust/lance-io/src/object_store/providers/aws.rs:299:31, /workspace/rust/lance-io/src/object_store.rs:512:92, /workspace/rust/lance/src/dataset/builder.rs:349:35 at org.apache.seatunnel.connectors.seatunnel.lance.sink.LanceSinkWriter.initializeDataset(LanceSinkWriter.java:115) ... Caused by: java.lang.IllegalArgumentException: Dataset at path lance/fresh_table was not found: LanceError(IO): Generic N/A error: Encountered internal error. Please file a bug report at https://github.com/lancedb/lance/issues. Failed to get AWS credentials: CredentialsNotLoaded(CredentialsNotLoaded { source: Some("no providers in chain provided credentials") }), /workspace/rust/lance-io/src/object_store/providers/aws.rs:299:31, /workspace/rust/lance-io/src/object_store.rs:512:92, /workspace/rust/lance/src/dataset/builder.rs:349:35 at com.lancedb.lance.Dataset.openNative(Native Method) ... ``` The bucket actually shows an empty dataset version (no data files) created by the job before it failed, so the `was not found` message contradicts the actual storage state. ### Zeta or Flink or Spark Version Zeta (local mode) ### Java or Scala Version Java 11 ### Are you willing to submit PR? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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]
