-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TEST: adopt new rest catalog image and enable tableExists tests #1389
Conversation
The image is published, including the fix around the |
Hmm, still an issue with the
|
:) @Fokko I'm on my way to the office, but will take a look at this in a few minutes |
@Fokko - it looks like the issue is because the rest-fixture is returning a 200 response. I've put in edits to allow PyIceberg to infer a 200 response as being successful. The proposed solution deviates from the REST Catalog Spec, but this is already the behavior of PyIceberg when handles the success codes of the other endpoints that are also meant to return 204 response: iceberg-python/pyiceberg/catalog/rest.py Lines 422 to 448 in df804c4
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
woot! LGTM
@@ -887,7 +887,7 @@ def table_exists(self, identifier: Union[str, Identifier]) -> bool: | |||
|
|||
if response.status_code == 404: | |||
return False | |||
elif response.status_code == 204: | |||
elif response.status_code in (200, 204): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we upstream this to the spec?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the reviews @Fokko and @kevinjqliu ! |
…he#1389) * test new rest catalog image * Point to `iceberg-rest-fixture` * allow 200 response in table_exists * be graceful in handling 200 response in table_exists --------- Co-authored-by: Fokko Driesprong <[email protected]>
…he#1389) * test new rest catalog image * Point to `iceberg-rest-fixture` * allow 200 response in table_exists * be graceful in handling 200 response in table_exists --------- Co-authored-by: Fokko Driesprong <[email protected]>
…he#1389) * test new rest catalog image * Point to `iceberg-rest-fixture` * allow 200 response in table_exists * be graceful in handling 200 response in table_exists --------- Co-authored-by: Fokko Driesprong <[email protected]>
NOTE: the test is failing because tableExists endpoint isn't exposed on the adapter. Related fix: apache/iceberg#11678