-
Notifications
You must be signed in to change notification settings - Fork 787
Add CRITICAL flag to config parameters #2258
Conversation
I think this enhancement makes sense ... Only a few questions / remarks:
|
Probably, but I don't think the two flags are linked in any way. You might have a parameter that is 'critical', but part of 'normal work' so might not be marked as advanced. In general I would think most 'critical' parameters would likely be advanced as well, but it doesn't preclude non-advanced parameters.
That's fine by me.
Of course - I just didn't do this yet ;) |
This sounds to me as if those parameters are not used for the handler configuration, but rather for device configuration or do you see any possibility to damage the system just by having a wrong handler configuration...? |
Maybe "damage the system" is the wrong term as there's probably no such thing as "damage". But for example to reset the handler might want a confirmation to avoid having to type in a whole load of additional reconfiguration. I believe that this should be a general flag - not just for device configuration. |
I'm ok with that. Just still wondering about a better name; in general, the config description should specify the purpose, but have no direct relation to what a UI makes out of that, so "confirmation" feels a bit to UI-related, while "critical" sounds too critical ;-) How about something like "verify=true"? This would also leave the possibility to have other verification mechanisms than the user through the UI. |
|
Also fine by me. I’ll look to turn this into a proper PR. |
@cdjackson Do you still consider to finish this PR? |
Yes - I will look at this over the next few days. |
68ae4e6
to
83ab3c1
Compare
I've updated this - tests seem to be failing at the moment but they are running ok locally here and the problem appears to be timeouts or something unrelated to this... |
Signed-off-by: Chris Jackson <chris@cd-jackson.com>
Signed-off-by: Chris Jackson <chris@cd-jackson.com>
I've rebased this again to fix the recent merge conflicts. |
As the last discussion has been only about the name and the name has been changed, I will merge this one. |
@cdjackson The HIPP and the Travis builds fail now. Do you think it could be related to this changes?
|
Tests were passing here when I ran them at the time I did the change a couple of months back - I’ll pull in the latest and check.
|
I wouldn’t like to state that it’s unconnected, but I can’t work out where the issue is if it is. The exceptions are pointing to something in the SyntheticBundleInstaller where bundleContext is apparently null.
|
relates to eclipse-archived#2258 Signed-off-by: Simon Kaufmann <simon.kfm@googlemail.com>
Are you sure the above comment was meant to go here? I can't see any relation of the SyntheticBundleInstaller to the test failure above. I just looked into the test failure. And I'm sorry to say, but to me it looks like it is absolutely related to this PR. You forgot to adapt the ConfigI18nLocalizationService. It doesn't copy over the As I'm on it anyway, I will quickly created a PR to fix this. |
When I tried running the tests in the IDE, it gave an NPE due to bundleContext being null. Maybe this was unrelated and there's some inconsistency with my environment, but it was stopping me from debugging this last night - hence the comment. |
ah, I see. The launch config worked ootb for me, that's why I got confused. But good that you left the comment, so I took a look. Btw, a |
relates to #2258 Signed-off-by: Simon Kaufmann <simon.kfm@googlemail.com>
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/recovering-from-hard-reset/74848/8 |
This adds a
critical
flag to config parameters. This flag should indicate that a parameter is considered critical, or dangerous in that it could damage the system if used incorrectly. A GUI might provide an "Are you sure" prompt when a user changes such a parameter to provide a degree of protection against inadvertent misuse.(note this isn't fully tested - I wanted to get feedback first)
Signed-off-by: Chris Jackson chris@cd-jackson.com