Repository navigation
Fix 471: wrong status code on success - #472
Conversation
adutra
left a comment
There was a problem hiding this comment.
LGTM. It's sad though that we don't have tests that check these statuses, but 🤷♂️
Thanks for the review. Yes, it is. I can raise another PR to close those gaps and add the missing test cases. |
|
@eric-maynard / @adutra I have the test cases ready. I can either port those changes into current PR or wait for current PR to get merge first. Let me know which route is preferred? |
kevinjqliu
left a comment
There was a problem hiding this comment.
thanks for fixing this! had multiple issues raised with pyiceberg due to this bug
|
@MonkeyCanCode let's merge this one right now, as people have been waiting for this fix. The you can add the test cases in a follow-up PR. |
Description
According to https://polaris.apache.org/in-dev/unreleased/polaris-management-service and https://polaris.apache.org/in-dev/unreleased/rest-catalog-open-api, there are couple endpoints where their success status is 204 instead of 200 (not all of them). As reported by #471, check table existed is one of them where the target status code on success should be 204 instead of 200. While going through IcebergCatalogAdapter.java, I noticed we have couple places where we are using the wrong status code. This PR updated those to reflect the right status code.
Also, there are many places where we are using the following to get status code:
With above, it will always be 200 instead of 204, thus, I changed the code to the following:
Fixes #471
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Other than our standard test suit, I also used the examples ref by 471:
Checklist:
Please delete options that are not relevant.