[#9736][followup] feat(iceberg-rest): Add ETag header to registerTable response#10641
Merged
roryqi merged 6 commits intoapache:mainfrom Apr 6, 2026
Merged
Conversation
…erTable response Include ETag header in the registerTable response for consistency with createTable and updateTable, which already include ETags. This ensures clients can reuse ETags across all endpoints that return LoadTableResponse, as specified by the Iceberg REST spec.
bharos
reviewed
Apr 1, 2026
Collaborator
Author
|
bharos
reviewed
Apr 2, 2026
roryqi
reviewed
Apr 2, 2026
roryqi
reviewed
Apr 2, 2026
roryqi
reviewed
Apr 2, 2026
roryqi
reviewed
Apr 2, 2026
…te constants - Return Optional<EntityTag> instead of null from generateETag methods - Use DEFAULT_SNAPSHOTS instead of null in single-arg generateETag - Move SNAPSHOTS_REFS constant to IcebergRESTUtils alongside DEFAULT_SNAPSHOTS - Update all callers to handle Optional properly
Code Coverage Report
Files
|
roryqi
reviewed
Apr 2, 2026
roryqi
reviewed
Apr 3, 2026
bbiiaaoo
pushed a commit
to bbiiaaoo/gravitino
that referenced
this pull request
Apr 7, 2026
…erTable response (apache#10641) ### What changes were proposed in this pull request? Add ETag header to the `registerTable` response for consistency with `createTable` and `updateTable`, which already include ETags. This was identified by @roryqi in [apache#10536 (comment)](apache#10536 (comment)). ### Why are the changes needed? The `registerTable` endpoint returns a `LoadTableResponse` but did not include an ETag header, unlike `createTable` and `updateTable`. This meant clients could not reuse ETags from `registerTable` for subsequent conditional `loadTable` requests (`If-None-Match`), breaking ETag consistency across all endpoints that return `LoadTableResponse`. ### Does this PR introduce _any_ user-facing change? No user-facing API changes. The `registerTable` response now includes an `ETag` header when the table metadata has a metadata file location. ### How was this patch tested? - Added `testRegisterTableReturnsETag` test verifying ETag presence in `registerTable` response. - Updated test mock (`CatalogWrapperForTest`) to return `TableMetadata` with a `metadataFileLocation` so ETag can be generated. - All existing ETag and namespace tests pass.
babumahesh
pushed a commit
to babumahesh/gravitino
that referenced
this pull request
Apr 9, 2026
…erTable response (apache#10641) ### What changes were proposed in this pull request? Add ETag header to the `registerTable` response for consistency with `createTable` and `updateTable`, which already include ETags. This was identified by @roryqi in [apache#10536 (comment)](apache#10536 (comment)). ### Why are the changes needed? The `registerTable` endpoint returns a `LoadTableResponse` but did not include an ETag header, unlike `createTable` and `updateTable`. This meant clients could not reuse ETags from `registerTable` for subsequent conditional `loadTable` requests (`If-None-Match`), breaking ETag consistency across all endpoints that return `LoadTableResponse`. ### Does this PR introduce _any_ user-facing change? No user-facing API changes. The `registerTable` response now includes an `ETag` header when the table metadata has a metadata file location. ### How was this patch tested? - Added `testRegisterTableReturnsETag` test verifying ETag presence in `registerTable` response. - Updated test mock (`CatalogWrapperForTest`) to return `TableMetadata` with a `metadataFileLocation` so ETag can be generated. - All existing ETag and namespace tests pass.
babumahesh
added a commit
to babumahesh/gravitino
that referenced
this pull request
Apr 9, 2026
…o registerTable response (apache#10641)" This reverts commit 14f4b1d.
babumahesh
added a commit
to babumahesh/gravitino
that referenced
this pull request
Apr 9, 2026
…o registerTable response (apache#10641)" This reverts commit 14f4b1d.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Add ETag header to the
registerTableresponse for consistency withcreateTableandupdateTable, which already include ETags. This was identified by @roryqi in #10536 (comment).Why are the changes needed?
The
registerTableendpoint returns aLoadTableResponsebut did not include an ETag header, unlikecreateTableandupdateTable. This meant clients could not reuse ETags fromregisterTablefor subsequent conditionalloadTablerequests (If-None-Match), breaking ETag consistency across all endpoints that returnLoadTableResponse.Does this PR introduce any user-facing change?
No user-facing API changes. The
registerTableresponse now includes anETagheader when the table metadata has a metadata file location.How was this patch tested?
testRegisterTableReturnsETagtest verifying ETag presence inregisterTableresponse.CatalogWrapperForTest) to returnTableMetadatawith ametadataFileLocationso ETag can be generated.