-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subscribe to wildcard #688
Subscribe to wildcard #688
Conversation
6f89dc3
to
dcda394
Compare
9d53465
to
62d213a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
If someone can run another hands on test, that would be good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get and subscribe are inconsistent, if get is missing access to any datapoint it fails, while subscribe doesn't
Test Client> getValue Vehicle
{
"error": {
"code": 403,
"reason": "forbidden",
"message": "Permission denied for some entries"
},
"errors": [
{
"path": "Vehicle",
"error": {
"code": 403,
"reason": "forbidden",
"message": "Permission denied for some entries"
}
}
]
}
Test Client> subscribe Vehicle
{
"subscriptionId": "7cdc6447-6bbd-4693-8e32-76bce9976d5c"
}
I think wildcard subscribe should only work of all datapoints can be read and compeltely fail otherwise. If there are reasons, why this is not the case, the behaviour still is not ideal. When I did the subscribe with a token that only allows to read Vehicle.Speed
, setting this value works, however setting any other value, we are not allwoed to read, still triggers a response on the subscribe channel. That is defintely wrong, see how it looks in Client, when after subscribe setting Vehicle.Speed
, and then some values in Vehicle.CurrentLocation
Doing this
"Authenticated"
Test Client> setValue Vehicle.Speed 22
OK
Test Client> setValue Vehicle.CurrentLocation.Latitude 27
OK
Test Client> setValue Vehicle.CurrentLocation.Latitude 24
OK
yields
Test Client> subscribe Vehicle
{
"subscriptionId": "7cdc6447-6bbd-4693-8e32-76bce9976d5c"
}
[
{
"entry": {
"path": "Vehicle.Speed",
"value": {
"value": 22.0,
"timestamp": "2023-10-24T06:42:16.499781+00:00"
}
},
"fields": [
"VALUE"
]
}
]
[]
[]
Test Client>
541c32a
to
dd0ecff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Behaves as expected. Checked wildcards and vanilla subscriptions and handling authorisation.
Output after setting Vehicle.PowerOptimizeLevel and Vehicle.IsMoving signals: