You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "nastra (via GitHub)" <gi...@apache.org> on 2025/03/13 15:09:53 UTC

[PR] OpenAPI: Handle NamespaceNotEmptyException when dropping a namespace [iceberg]

nastra opened a new pull request, #12518:
URL: https://github.com/apache/iceberg/pull/12518

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] OpenAPI: Handle NamespaceNotEmptyException when dropping a namespace [iceberg]

Posted by "rdblue (via GitHub)" <gi...@apache.org>.
rdblue commented on code in PR #12518:
URL: https://github.com/apache/iceberg/pull/12518#discussion_r1995983897


##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -410,7 +410,17 @@ paths:
         204:
           description: Success, no content
         400:
-          $ref: '#/components/responses/BadRequestErrorResponse'
+          description:
+            A bad request error or a NamespaceNotEmptyException in case the namespace is not empty
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/IcebergErrorResponse'
+              examples:
+                BadRequestExample:
+                  $ref: '#/components/examples/BadRequestError'
+                NamespaceNotEmptyExample:

Review Comment:
   Why use 400 for this and not a better error code?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] OpenAPI: Handle NamespaceNotEmptyException when dropping a namespace [iceberg]

Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra commented on code in PR #12518:
URL: https://github.com/apache/iceberg/pull/12518#discussion_r1999268591


##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -410,7 +410,17 @@ paths:
         204:
           description: Success, no content
         400:
-          $ref: '#/components/responses/BadRequestErrorResponse'
+          description:
+            A bad request error or a NamespaceNotEmptyException in case the namespace is not empty
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/IcebergErrorResponse'
+              examples:
+                BadRequestExample:
+                  $ref: '#/components/examples/BadRequestError'
+                NamespaceNotEmptyExample:

Review Comment:
   @rdblue I've updated this to throw a 409 when a namespace isn't empty



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] OpenAPI: Handle NamespaceNotEmptyException when dropping a namespace [iceberg]

Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on code in PR #12518:
URL: https://github.com/apache/iceberg/pull/12518#discussion_r1995837165


##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -4744,6 +4764,16 @@ components:
           }
         }
 
+    NamespaceNotEmptyError:
+      summary: The requested namespace is not empty
+      value: {
+        "error": {
+          "message": "The given namespace is not empty",

Review Comment:
   nit: Summary says requested, the message says given. Just bugs me that they are different :)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] OpenAPI: Handle NamespaceNotEmptyException when dropping a namespace [iceberg]

Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra commented on code in PR #12518:
URL: https://github.com/apache/iceberg/pull/12518#discussion_r1995883250


##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -4744,6 +4764,16 @@ components:
           }
         }
 
+    NamespaceNotEmptyError:
+      summary: The requested namespace is not empty
+      value: {
+        "error": {
+          "message": "The given namespace is not empty",

Review Comment:
   I particularly aligned this with other examples that also use "requested" in the summary and "given" in the message



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] OpenAPI: Handle NamespaceNotEmptyException when dropping a namespace [iceberg]

Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra commented on PR #12518:
URL: https://github.com/apache/iceberg/pull/12518#issuecomment-2739376143

   thanks everyone for voting & reviewing


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] OpenAPI: Handle NamespaceNotEmptyException when dropping a namespace [iceberg]

Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra merged PR #12518:
URL: https://github.com/apache/iceberg/pull/12518


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] OpenAPI: Handle NamespaceNotEmptyException when dropping a namespace [iceberg]

Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra commented on code in PR #12518:
URL: https://github.com/apache/iceberg/pull/12518#discussion_r1996077379


##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -410,7 +410,17 @@ paths:
         204:
           description: Success, no content
         400:
-          $ref: '#/components/responses/BadRequestErrorResponse'
+          description:
+            A bad request error or a NamespaceNotEmptyException in case the namespace is not empty
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/IcebergErrorResponse'
+              examples:
+                BadRequestExample:
+                  $ref: '#/components/examples/BadRequestError'
+                NamespaceNotEmptyExample:

Review Comment:
   The current server behavior would be to return a 400 and the goal here was to document that behavior. Going forward we could add a new error code to indicate the `NamespaceNotEmptyException` but clients would still have to look at the error type of the 400 when talking to legacy REST servers



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org