Comments (10)
I believe that the selector parser is too lenient. Here, it doesn't found anything to parse, so it assumes that we want all channels. This should be pretty easy to fix.
from foxbox.
Ah, got it. So, the id
field in a ChannelSelector
is a constraint with the type Exactly<Id<Channel>>
. Passing null
where there is an Exactly<_>
is how we can specify "always match". So your selector means "Pick all the channels that have any id". So no bug here, just a confusing case.
I'll try and think of a way to make this less confusing/accident-prone. Since I'm planning on an evolution that will require us to provide the feature whenever we perform a fetch
or send
anyway, this might side-solve the problem.
from foxbox.
So no bug here
Yeah, no coding bug here in its classic sense! But rather the issue with too permissive API that can be too destructive and lead to unrecoverable consequences :)
from foxbox.
@azasypkin Not saying that it doesn't need to be fixed :)
Anyway, if you have a chance, could you test-drive the PR I just linked to and see if this solves the issue?
from foxbox.
Anyway, if you have a chance, could you test-drive the PR I just linked to and see if this solves the issue?
Sure, will give it a try today :)
from foxbox.
So, @azasypkin, does it help?
from foxbox.
Grrr, sorry completely forgot about this one. Looking...
from foxbox.
Hmm, is it correct PR (#525) @Yoric ?
I still see the same behavior with request like:
https://local.609aebe9f46a699f80d6e0284c3334ddf879e125.box.knilxof.org:3000/api/v1/channels/set' -X PUT -H ..... --data-binary '{"select":{"id":null},"value":null}'
- simulated bug in the app when Id of the selected camera is not available for some reason and we pass null
instead of take snapshot
channel id.
from foxbox.
Oops, right, I had forgotten part of the patch. This should now be fixed.
from foxbox.
Mm, latest PR fails to compile :) https://travis-ci.org/fxbox/foxbox/jobs/138305574
src/taxonomy_router.rs:235:40: 235:66 error: type name
ChannelSelectorWithFeatureis undefined or not in scope [E0412] src/taxonomy_router.rs:235 payload_api!(fetch_values, Vec<ChannelSelectorWithFeature>, ["channels", "get"], Method::Put, binary);
from foxbox.
Related Issues (20)
- Intermittent SSL linking failures on Mac OS X HOT 2
- Travis: Some components might not `cargo test` because dependencies are too recent HOT 4
- OpenZWave: Merge getter and setter maps
- Our env_logger configuration doesn't dispaly the location HOT 1
- HTTP API should leverage HTTP Cache (via Etag or Last-Modified-Since headers) HOT 4
- Add the ability to describe channels and services
- Taxonomy should offer a DELETE operation
- HTTP API should use HTTP Compression
- Use l10n on the UI
- `build.rs` doesn't spot wrong rustc version HOT 3
- Rename OpenClosed => IsOpen, OnOff => IsOn
- Thinkerbell rules should be delivered as JSON, not strings HOT 1
- Add a feature to turn on/off zwave support at build time. HOT 1
- API error response should be clearly distinguishable from the successful one
- Can't generate Let'sEncrypt certificates with outdated letsencrypt.sh script version (Ubuntu 16.04 LTS 64-bit) HOT 1
- Update readme
- Let users choose a friendly remote name.
- Fails to build on OSX HOT 1
- Fails to build on Debian 3.16.36-1+deb8u1 HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from foxbox.