sundapeng commented on code in PR #10599:
URL: https://github.com/apache/paimon/pull/10599#discussion_r4292685454
##########
paimon-python/pypaimon/api/auth/dlf_openapi_actions.py:
##########
@@ -71,6 +71,8 @@
("POST", "/v1/{prefix}/views/rename", "RenameView"),
("GET", "/v1/{prefix}/databases/{database}/functions", "ListFunctions"),
("POST", "/v1/{prefix}/databases/{database}/functions", "CreateFunction"),
+ ("GET", "/v1/{prefix}/databases/{database}/function-details",
"ListFunctionDetails"),
+ ("GET", "/v1/{prefix}/functions", "ListFunctionsGlobally"),
Review Comment:
Thanks for catching this. #8023 retired the `renameBranch` REST endpoint
because the server-side rename relies on a non-atomic object-store rename. The
Java `RESTApi` no longer sends it, so pypaimon's `rename_branch` was a
leftover, and the spec still listed the route as well.
Rather than map it, this PR now removes it and keeps the four definitions
aligned in CI, using `docs/static/rest-*-open-api.yaml` as the contract:
- pypaimon drops the REST `rename_branch`, so `RESTCatalog.rename_branch`
raises `NotImplementedError` like Java. The spec drops `renameBranch` and gains
`replaceTable`, `listSchemas` and `getSchema`, which Java already sends.
- Java `RESTApiCoverageTest` fails when a request is not in the spec, when a
spec operation is never sent, or when a request lacks `x-acs-action`.
`DLFOpenApiActionsTest` fails unless the action table matches the spec.
- pypaimon `rest_api_coverage_test.py` covers every public pypaimon
`RESTApi` method, as you suggested. It fails when a request is not in the spec
or lacks `x-acs-action`, and `dlf_signer_test.py` fails when pypaimon's action
table differs from Java's.
- `tools/ci/plan.py` runs both the Java and Python checks when the spec or
the Java action table changes.
--
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]