Deleting an analytics bucket never purges its remote Iceberg tables
Bug
Deleting an analytics bucket leaves its Iceberg tables and namespaces in the remote catalog. The DeleteIcebergResources job still reports success.
Remote namespaces are created and addressed by a tenant-scoped name, ${tenantId}_${namespaceId} with - replaced by _ (TenantCatalog.getTenantNamespaceName). In src/storage/events/iceberg/delete-iceberg-resources.ts, restCatalog.listTables uses that scoped name. restCatalog.dropTable and restCatalog.dropNamespace pass the user-facing ns.name instead.
What happens
dropTable({ namespace: ns.name, purgeRequested: true })targets a namespace that doesn't exist remotely and gets a 404.- The job swallows that 404 as "table not found", deletes the table metadata and frees the shard slot.
listTableson the scoped name still finds the table, sodropNamespaceis skipped.- The catalog is deleted and the job succeeds.
Expected
The remote tables are purged and the remote namespace is dropped before the metadata is removed.
Actual
The remote table data and namespace stay in the warehouse. The freed shard slot no longer matches what is stored remotely, and the reconciler later finds the leftover tables as orphans.
Duplicate of #1528, which #1531 fixes.