Skip to content

datafusion-cli tests fails locally #17458

@2010YOUY01

Description

@2010YOUY01

Describe the bug

datafusion-cli tests are failing on the latest main (see the below commit hash)

yongting@Yongtings-MacBook-Pro-2 ~/C/datafusion (main=) [SIGINT]> git rev-parse --short HEAD
6a21b675a
yongting@Yongtings-MacBook-Pro-2 ~/C/datafusion (main=)> cargo test --package datafusion-cli
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.14s
     Running unittests src/lib.rs (target/debug/deps/datafusion_cli-98327d75a8e65845)

running 42 tests

... PASSED TESTS...

test catalog::tests::query_http_location_test ... ok
test exec::tests::create_object_store_table_s3 ... ok
test catalog::tests::query_gs_location_test ... ok
test object_storage::tests::s3_object_store_builder_default ... FAILED
test object_storage::tests::s3_object_store_builder_resolves_region_when_none_provided ... FAILED
test object_storage::tests::s3_object_store_builder_overrides_region_when_resolve_region_enabled ... FAILED
test exec::tests::copy_to_external_object_store_test ... FAILED
test catalog::tests::query_s3_location_test ... FAILED

failures:

---- object_storage::tests::s3_object_store_builder_default stdout ----
Error: ObjectStore(Generic { store: "S3", source: "Error getting credentials from provider: an error occurred while loading credentials: failed to load IMDS session token" })

---- object_storage::tests::s3_object_store_builder_resolves_region_when_none_provided stdout ----
Error: ObjectStore(Generic { store: "S3", source: "Error getting credentials from provider: an error occurred while loading credentials: failed to load IMDS session token" })

---- object_storage::tests::s3_object_store_builder_overrides_region_when_resolve_region_enabled stdout ----
Error: ObjectStore(Generic { store: "S3", source: "Error getting credentials from provider: an error occurred while loading credentials: failed to load IMDS session token" })

---- exec::tests::copy_to_external_object_store_test stdout ----
Error: ObjectStore(Generic { store: "S3", source: "Error getting credentials from provider: an error occurred while loading credentials: failed to load IMDS session token" })

---- catalog::tests::query_s3_location_test stdout ----
Error: ObjectStore(Generic { store: "S3", source: "Error getting credentials from provider: an error occurred while loading credentials: failed to load IMDS session token" })


failures:
    catalog::tests::query_s3_location_test
    exec::tests::copy_to_external_object_store_test
    object_storage::tests::s3_object_store_builder_default
    object_storage::tests::s3_object_store_builder_overrides_region_when_resolve_region_enabled
    object_storage::tests::s3_object_store_builder_resolves_region_when_none_provided

test result: FAILED. 37 passed; 5 failed; 0 ignored; 0 measured; 0 filtered out; finished in 32.21s

error: test failed, to rerun pass `-p datafusion-cli --lib`

To Reproduce

No response

Expected behavior

It's better to let them pass without extra settings.

I checked they require certain env vars to be set in order to pass:

RUST_BACKTRACE: 1
AWS_ENDPOINT: http://127.0.0.1:9000
AWS_ACCESS_KEY_ID: TEST-DataFusionLogin
AWS_SECRET_ACCESS_KEY: TEST-DataFusionPassword
TEST_STORAGE_INTEGRATION: 1
AWS_ALLOW_HTTP: true

Perhaps we should skip those test if the env var is not set?

Additional context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions