Skip to content

fix: remove trailing slash from Glue database location_uri - #338

Closed
hlegarda wants to merge 1 commit into
ExpediaGroup:masterfrom
hlegarda:fix/glue-db-location-trailing-slash
Closed

hlegarda wants to merge 1 commit into
ExpediaGroup:masterfrom
hlegarda:fix/glue-db-location-trailing-slash

Conversation

@hlegarda

@hlegarda hlegarda commented Sep 7, 2026

Copy link
Copy Markdown

Every Glue database this module creates has a trailing slash baked into location_uri. When a downstream Iceberg client creates a table without an explicit LOCATION, it concatenates this database location with "/" + tableName. Some client versions/code paths (Iceberg's HiveCatalog pre-1.11.0, Spark's own default-location resolution - see apache/iceberg#15908, still open) don't strip a trailing slash before doing that concatenation, producing s3://bucket//table instead of s3://bucket/table.

This has produced 1,586+ affected tables across data-dw, data-test, and data-corp, owned by 50+ different applications. Fixing each producing application's Iceberg/Spark version individually doesn't scale across that many independent producers. Removing the trailing slash here removes the material every one of those code paths needs to produce a double slash, regardless of which application or library version is creating the table.

This is a location_uri-only change (in-place Glue API update, not a resource replacement) and only affects the default location computed for new tables created without an explicit LOCATION going forward. It does not touch any existing table's location or data.

📝 Description

🔗 Related Issues

Every Glue database this module creates has a trailing slash baked
into location_uri. When a downstream Iceberg client creates a table
without an explicit LOCATION, it concatenates this database location
with "/" + tableName. Some client versions/code paths (Iceberg's
HiveCatalog pre-1.11.0, Spark's own default-location resolution -
see apache/iceberg#15908, still open) don't strip a trailing slash
before doing that concatenation, producing s3://bucket//table
instead of s3://bucket/table.

This has produced 1,586+ affected tables across data-dw, data-test,
and data-corp, owned by 50+ different applications. Fixing each
producing application's Iceberg/Spark version individually doesn't
scale across that many independent producers. Removing the trailing
slash here removes the material every one of those code paths needs
to produce a double slash, regardless of which application or
library version is creating the table.

This is a location_uri-only change (in-place Glue API update, not a
resource replacement) and only affects the default location computed
for new tables created without an explicit LOCATION going forward.
It does not touch any existing table's location or data.
@hlegarda
hlegarda requested a review from a team as a code owner September 7, 2026 21:19
@hlegarda hlegarda closed this Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant