Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Reintroduce autocompletion in Python command line client for GRPC #411

Closed
SebastianSchildt opened this issue Nov 22, 2022 · 9 comments
Closed
Labels
Client Issues related to kuksa-client

Comments

@SebastianSchildt
Copy link
Contributor

SebastianSchildt commented Nov 22, 2022

kuksa_(viss)_client used to support tab-automcompletion for VSS Paths in the VISS (websocket) side. This does not work in GRPC side.

For usability reasons (as the cmdline client really is about exploring/debugging) we should add this feature for GRPC connections.

It can probably not be a direct port of the VISS side, because that makes use of the KUKSA VISS getMetadata call (which basically gives you verbatim excerpts from the VSS json tree)

@SebastianSchildt SebastianSchildt added the Client Issues related to kuksa-client label Nov 23, 2022
@romainletendart
Copy link
Contributor

I don't know how this should work with the unified API.
Since the switch to that new API, here is what the client gets back from databroker when querying a wildcard:

Test Client> getMetaData *
{
    "error": {
        "code": 404,
        "reason": "not_found",
        "message": "Path '*' not found"
    },
    "errors": [
        {
            "path": "*",
            "error": {
                "code": 404,
                "reason": "not_found",
                "message": "Path '*' not found"
            }
        }
    ]
}

I think wildcards are only supported with the query syntax of the former databroker API.
@argerus any thoughts?

@SebastianSchildt
Copy link
Contributor Author

Do we have a specific way to query the childs of a node? Like a Metadata Field we can query?

@lukasmittag
Copy link
Contributor

lukasmittag commented Feb 21, 2023

One option could be to use the newest vss release json file. Would then not be backwards compatible though. Or another file which could be given through cmd line argument.

@SebastianSchildt
Copy link
Contributor Author

I think the only "good way" is, when this is done via API, e.g. requesting the children of any Node.

I do however not think that also adding the (functionlity-wise overlapping) sdv API is the solutions, and I think kuksa.val.v1 can not yet do it, it would at least need something liuke StringArray children in Metadata. Which is only one but may or may not be the best way to do it

@lukasmittag
Copy link
Contributor

Is there a reason why not handling it like in sdv API?

@argerus
Copy link
Contributor

argerus commented Feb 22, 2023

I think it would make sense to add a List( "wildcard pattern", [fields] ) to the kuksa.val.v1 API that would return all matching VSS entries. The syntax of "wildcard pattern" should be the same as what the authorization scope uses.

@SebastianSchildt
Copy link
Contributor Author

That makes sense to me, but thinking of authorization, would it returns everything where you possess a read scope? Would you "see" the existence of a Child if you have no access?

And what would we expect this to return. An array of all metadata?

@rafaeling
Copy link
Contributor

Here is the draft PR for autocompletion: #605

@SebastianSchildt
Copy link
Contributor Author

Done in #653

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Client Issues related to kuksa-client
Projects
None yet
Development

No branches or pull requests

5 participants