Repository navigation
chore(rest): Avoid fatal assertions in test handlers - #2103
Merged
laskoviymishka merged 6 commits intoOct 5, 2026
Merged
Conversation
alessandro-nori
force-pushed
the
anori/rest-test-handler-hygiene
branch
from
October 2, 2026 20:26
b4792c2 to
24fe2ad
Compare
alessandro-nori
marked this pull request as ready for review
October 2, 2026 20:37
zeroshade
approved these changes
Oct 2, 2026
zeroshade
left a comment
Member
There was a problem hiding this comment.
LGTM. The handler conversions are correct, and the a b+c test catches an encoded body name in all four write paths. There are two leftover fatal calls in handlers (inline); please fix them here or in a quick follow-up.
This review was drafted by an AI-assisted tool and
confirmed by an Apache Iceberg maintainer. The maintainer
approving this PR has read the findings and signed off. If
something feels off, please reply on the PR and a maintainer
will follow up.More on how Apache Iceberg handles maintainer review:
CONTRIBUTING.md.
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.
Changes
requireandFailNowassertions reachable fromcatalog/restHTTP handler goroutines with non-fatal assertionsMotivation
Fatal assertions call
FailNowandruntime.Goexit. When invoked from anhttptesthandler goroutine, they terminate HTTP request processing rather than the test goroutine. That can close the connection before a response is completed and surface a misleading transport EOF in the client.Non-fatal assertions preserve the original handler failure while allowing
net/httpto finish request cleanup normally.The expanded request test also pins that
a b+cremains raw in JSON bodies while object-name path segments are encoded asa%20b%2Bc, addressing follow-up feedback from #2074.Testing
make lintgo test ./catalog/...go test -race ./catalog/rest