-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
[Feature] check object properties (during object creation) #2509
Comments
As there has been some concern about performance impact (at telegram) I would like to state; The check should ONLY be performed when really creating or modifying a state - NOT at every access. As states should not be created over and over the impact should be acceptable. Its totally ok to miss modifications done by users to existing states - its not the goal to detect such changes, the goal is to give feeback to developers to write correct state definitions. As states are likely to be created dynamically, its impossible to check them by repo checker. |
So it is more like an extended object creation check, we already have them when objects are created or extended. We would need to extend that by a check which checks if We could maybe create a file which holds like |
Well I would suggest to check Type Against each other. And of course unknow roles must be allowed unless we can gurantte a very fast update of roles without explicit user action. Updating with js-controller releases would be to slow as users ste likely several releases behind. |
I fixed the wording in at least headline ... it is about objects ... not states |
Well - as the discussion continues outsides I would like to give this issue a push up. I really would suggest to check the roles whenever an object is created or extended. The list of valid state roles and other Info to check (R/W, type, ...) could be loaded using the same mechanism as we already use to load jsonConfig schema. This would guarantee a fast update if new roles are accepted. Failing should be reported as a log and if possible as a feedback at sentry so that we can create a Issue at the adapter an potentially check when releasing new versions. |
js controller should check state configuration when cretaing or extending a state.
Especially role shoul dbe checked against data type and read/write settings.
I.e. role indocator is incompatible with write=true or type=string
When checking ONLY during creation/extending the number od log entries should be acceptable.
Config could be either hardcoded or extendable by using a cached schema from online service. The later approach would allow to check if a role is defined at all too.
The text was updated successfully, but these errors were encountered: