eclipse-zenoh / zenoh

zenoh unifies data in motion, data in-use, data at rest and computations. It carefully blends traditional pub/sub with geo-distributed storages, queries and computations, while retaining a level of time and space efficiency that is well beyond any of the mainstream stacks.
https://zenoh.io
Other
1.36k stars 142 forks source link

fix: adminspace encodings #1182

Closed gabrik closed 1 week ago

gabrik commented 1 week ago

After the removal of Value the encoding of the Admin Space have been lost.

So for instance this:

{
        "key": "@/router/8f2aef5a89c14100b70184094f5bdea9/status/plugins/storage_manager/volumes/file-system-volume",
        "value": {"root":"/home/vscode/.zenoh/zenoh_backend_fs","version":"0.11.0-dev"},
        "encoding": "application/json",
        "time": null
    }

becomes this:

{
        "key": "@/router/8f2aef5a89c14100b70184094f5bdea9/status/plugins/storage_manager/volumes/file-system-volume",
        "value": "eyJyb290IjoiL2hvbWUvdnNjb2RlLy56ZW5vaC96ZW5vaF9iYWNrZW5kX2ZzIiwidmVyc2lvbiI6IjAuMTEuMC1kZXYifQ==",
        "encoding": "zenoh/bytes",
        "time": null
    }

This PR aims at solving this bug.

gabrik commented 1 week ago

There are still some Key that provide a base64 response:

still investigating why

gabrik commented 1 week ago

So a z_get gets them correct, the REST API does not...

gabrik commented 1 week ago

Updated the Encoding matching in the REST plugin.