embucket-labs
embucket-labs copied to clipboard
s3tables create table inconsistency bug
When s3table bucket has no assigned s3tables:PutTableData permission and user runs CREATE TABLE sql - it fails, but accidentally creates table artifact in s3table bucket. Then Embucket fails on subsequent start.
Reproducible by e2e test: tests::e2e::tests_e2e::test_e2e_memory_store_s3_tables_volumes_create_table_inconsistency_bug
CREATE TABLE sql fails
Error: SnowflakeExecution { query: "CREATE TABLE IF NOT EXISTS database_in_s3tables.public.table_ro(amount number, name string, c5 VARCHAR)", source: Custom { message: "Iceberg error: The operation lacked the necessary privileges to complete for path metadata/00000-a30d0a01-f127-4e62-ae50-af02a95e4f62.metadata.json: Error performing PUT https://s3.us-east-2.amazonaws.com/fde67b04-a4ea-4a75-g18w759ein6sgizbicmgg5y4s36b6use2b--table-s3/metadata/00000-a30d0a01-f127-4e62-ae50-af02a95e4f62.metadata.json in 599.351665ms - Server returned non-2xx status code: 403 Forbidden: <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>EPS6HZFSMVV5D2CJ</RequestId><HostId>Clkp/CI0aKHO7z92EgrMb8009mhiYeOmHdSTpEMjwOIwfo5GbWgA9Xh45qB3UQiNCgEOtWts1ks=</HostId></Error>", internal: InternalMessage(""), location: Location { file: "crates/core-executor/src/snowflake_error.rs", line: 149, column: 62 } }, location: Location { file: "crates/core-executor/src/tests/e2e_common.rs", line: 583, column: 26 } }
Embucket fails on subsequent refresh_catalog
Upon next refresh cataloh it fails with:
thread 'tests::tests_e2e::test_e2e_s3_store_s3_tables_volumes' panicked at crates/core-executor/src/tests/e2e_common.rs:536:6:
Failed to create execution service: 0: Cannot refresh catalog list: DataFusion error: External error: Table table_ro not found., at crates/core-executor/src/service.rs:85:14
1: DataFusion error: External error: Table table_ro not found., at /home/yaroslav/git/embucket/crates/df-catalog/src/catalog_list.rs:437:34
2: External(Iceberg(External(Text("Table table_ro not found."))))