Uh oh!
There was an error while loading. Please reload this page.
OpenAPI: Express server capabilities via /config endpoint - #9940
Conversation
| tags: | ||
| - name: remote-signing | ||
| description: Requires server to support remote signing |
There was a problem hiding this comment.
@danielcweeks, @nastra, @jackye1995, if we add some form of capabilities to express what a REST service supports, then maybe we should merge the signer spec into the main REST catalog spec. Then everything is in one place and options are clear.
There was a problem hiding this comment.
I agree, I think it's probably good to merge those 2 specs together
There was a problem hiding this comment.
I commented elsewhere. It makes sense to merge them to me, but let's not do it in this PR. We can take care of it in a follow up.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
rdblue
commented
Mar 12, 2024
@nastra, this is a great start. I think we also want to add a section in the overall API description that covers how tags are used when there is a matching capability. That is, capability tags represent optional functionality that must be declared by the service from the config route. To support a capability, all tagged routes must be implemented. @jackye1995, for context, we are exploring ways to express optional parts of the API so that we can evolve it by adding new functionality and letting callers know about it. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
81dc9d2 to
c9492b3CompareAfter some discussions, the capablities that we'd like to currently support are:
For |
rahil-c
commented
Mar 20, 2024
I would assume since the server is doing work on behalf of the client for both scan
@nastra Also was wondering what you meant by this, did you want me to pick up these changes and include them into the preplan/plan pr? |
nastra
commented
Mar 20, 2024
snazy
left a comment
There was a problem hiding this comment.
I've got strong concerns about using enum here - special handling here and there, I think, that complicates things for adopters of any OpenAPI spec.
Uh oh!
There was an error while loading. Please reload this page.
geruh
commented
Mar 27, 2024
If I'm correct this approach provides a way to group catalog functionalities, and allow the server to explicitly define the support or not. This is kind of similar to what both the append and scan API's were trying to do with the feature flag configs. On that note if the server specifies no support for a feature, and we failing early on the client side? |
nastra
commented
Mar 28, 2024
In this case here we don't set feature flags with true/false. The existence of a capability in For views there are cases where a client wouldn't call the endpoint (e.g. when renaming a table, it wouldn't also check if a view with the same name exists). In other cases the client would fail early, indicating that the server doesn't support X. |
@snazy we use |
snazy
commented
Apr 2, 2024
The issue at hand is that an enum cannot (by default) handle unknown values - which is generally fine. But here we have to expect that endpoints to return values that are not known by a client. (Not only generated) client's that did not handle this rather special case will fail to parse the result, which is a problem. I'm still in favor of just using a string. |
3f70b55 to
cfa7918Compare
snazy
left a comment
There was a problem hiding this comment.
Using strings instead of an enum looks much better.
However, I've got concerns about the backwards compatibility stated in this specification.
It would also be good to have something written on the website how capabilities are meant to work, covering backwards compatibility - basically at least starting with a written documentation about Iceberg-REST (there is none on the website yet at all).
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
findepi
commented
Jun 20, 2024
73cc54f to
898ae59Comparedecf5ca to
eaef2c6CompareUh oh!
There was an error while loading. Please reload this page.
| tags: | ||
| - Catalog API | ||
| - tables | ||
| - views |
There was a problem hiding this comment.
hmm, this seems like a problem to me. I want to avoid overlapping tags if possible, because when this happens, you need to know "if I support tables, not views, do I support this API?". The answer here might be a simple yes, but for complex capabilities, it might become a case by case analysis and things become really complex. What do you think?
There was a problem hiding this comment.
to be more clear, I am okay with for example LoadTable having both a tag for tables and credentials-vending since the second tag is dedicated to a specific feature in the API. But here, tables and views requires exactly the same thing, which is that this API exists. That is the problem.
There was a problem hiding this comment.
Having tables/ views here simply means that if a catalog supports tablesorviews then it needs to support this endpoint as you won't be able to do something with tables if namespaces aren't supported. See also #9940 (comment).
Also I probably wouldn't tag any endpoint with credentials-vending, since that capability doesn't require to implement certain endpoints.
Uh oh!
There was an error while loading. Please reload this page.
4c76fa6 to
abb7ed5Compare| - views | ||
| - remote-signing | ||
| - vended-credentials | ||
| - multi-table-commit |
There was a problem hiding this comment.
We discussed in the last sync meeting that the capability is useful when it impacts the client's fallback behavior. In that case, it seems to me that only views is a necessary capability. What other capabilities here would impact fallback behavior?
a03195d to
582aab0Comparenastra
commented
Sep 11, 2024
closing this in favor of #10928 |
This introduces a
capabilitiesfield to the response of the/configendpoint, signaling what is being supported by the server.The current capabilities that come to mind are:
Capabilities like
scan-planning/views/remote-signing/oauth2would indicate that certain endpoints are implemented by the server and can be safely called by clients. Other capabilities would reflect using a certain query param or sending a particular header by a client to the server.Using
tagsallows to group endpoints in the Swagger UI:For
scan-planningit's not clear yet whether whether we'd like to only havescan-planningor whether there should also bescan-pre-planning, so it's best to introduce this capability as part of #9695 (cc @rahil-c)