bbiiaaoo commented on PR #10637: URL: https://github.com/apache/gravitino/pull/10637#issuecomment-4394023808
> In [`LanceNamespaceOperations`](https://github.com/apache/gravitino/blob/d8628d949/lance/lance-rest-server/src/main/java/org/apache/gravitino/lance/service/rest/LanceNamespaceOperations.java#L108-L115) this PR adds a new root route, `POST /v1/namespace/describe`, which forwards `ROOT_NAMESPACE_ID = ""` to `describeNamespaceInternal(...)`. > > However, the real backend still rejects empty namespace ids in [`GravitinoLanceNameSpaceOperations.describeNamespace`](https://github.com/apache/gravitino/blob/d8628d949/lance/lance-common/src/main/java/org/apache/gravitino/lance/common/ops/gravitino/GravitinoLanceNameSpaceOperations.java#L129-L155), because it requires `nsId.levels() > 0`. > > So the new route cannot succeed against the actual backend. The mock-based Jersey test passes only because `namespaceOps.describeNamespace(any(), any())` is stubbed to return success for all inputs, including `""`: [`TestLanceNamespaceOperations`](https://github.com/apache/gravitino/blob/d8628d949/lance/lance-rest-server/src/test/java/org/apache/gravitino/lance/service/rest/TestLanceNamespaceOperations.java#L219-L246) > > This also matches the integration test, which still expects empty-id describe to fail: [`LanceRESTServiceIT`](https://github.com/apache/gravitino/blob/d8628d949/lance/lance-rest-server/src/test/java/org/apache/gravitino/lance/integration/test/LanceRESTServiceIT.java#L183-L190) @FANNG1 Thanks for catching this. You're right that the root describe route was not valid because the real backend still rejects an empty namespace id. I've fixed this by removing the unsupported `POST /v1/namespace/describe` root endpoint and the corresponding mock-based Jersey test expectation. The behavior is now aligned with the integration test, where describing the root namespace with an empty id is still expected to fail against the real backend. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
