You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Keeping in mind our versioning and compatibility scheme, clients are better off interrogating a set of capabilities rather than performing version number checks.
I'm proposing that we augment the version command so that it outputs something like this:
Including the capabilities list in the version command allows clients to query the version number and obtain the capability set in a single round trip. If we were to add a separate command just for capabilities, clients would need to query the version number to determine if they could then query for capabilities.
As part of this we should define the capabilities. I'm inclined to just have relative-roots as the first and only listed capability initially. All other functionality is effectively and implicitly available if the capabilities field is present in the version output.
I'd like to define relative-roots as complete support for watch-project with the relative_root parameter for the query, trigger and subscription subsystems.
An additional command that we can add would be to help check compatibility, so for example, the client would do:
If any of the capability names in the required field are missing, the capabilities command would add an error field listing the missing capabilities, causing the command to error out. The capabilities map has boolean values that indicate whether a given capability is supported.
Thoughts?
The text was updated successfully, but these errors were encountered:
Summary:
to make it easier for clients to optionally take advantage of new
features, this diff introduces the concept of capability names.
We add an optional second parameter to the `version` command that allows the
client to specify a list of optional and/or a list of required capability
names. It is desirable to piggy back this on a version number check to allow
just one request/response round-trip to be issued to determine version
compatibility. Thankfully, the version command from older servers doesn't
perform any rigorous checks on the number of parameters, so the extended
capabilities argument will be silently ignored.
The `version` command response will include a `capabilities` hash keyed by the
requested capability names with boolean values set to indicate whether the
server supports the named capability.
If a capability name is listed in the required set and the server does not
support it, an error response is returned.
The python and node clients are extended to add a `capabilityCheck` method.
The implementation adds some simple support for use against a server that does
not support capabilities; for a handful of capability names we know which
versions introduced them. This allows clients to transition to using
capabilities before all servers have been upgraded.
Refs: #116
Test Plan: `make integration`
Reviewers: amasad, sid0
Reviewed By: sid0
Subscribers: stefanpenner
Differential Revision: https://reviews.facebook.net/D43935
Keeping in mind our versioning and compatibility scheme, clients are better off interrogating a set of capabilities rather than performing version number checks.
I'm proposing that we augment the version command so that it outputs something like this:
Including the capabilities list in the version command allows clients to query the version number and obtain the capability set in a single round trip. If we were to add a separate command just for capabilities, clients would need to query the version number to determine if they could then query for capabilities.
As part of this we should define the capabilities. I'm inclined to just have
relative-roots
as the first and only listed capability initially. All other functionality is effectively and implicitly available if thecapabilities
field is present in theversion
output.I'd like to define
relative-roots
as complete support forwatch-project
with therelative_root
parameter for the query, trigger and subscription subsystems.An additional command that we can add would be to help check compatibility, so for example, the client would do:
The response would look something like:
If any of the capability names in the
required
field are missing, thecapabilities
command would add an error field listing the missing capabilities, causing the command to error out. Thecapabilities
map has boolean values that indicate whether a given capability is supported.Thoughts?
The text was updated successfully, but these errors were encountered: