rose icon indicating copy to clipboard operation
rose copied to clipboard

rose edit - handle optional configurations

Open hjoliver opened this issue 9 years ago • 6 comments

We discussed this a little via email several months ago, but there doesn't seem to be an issue for it.

@hjoliver:

Is there a way to select and edit optional configs in "rose edit, or a plan to implement that? If not, doesn't that effectively render app metadata (which is displayed and actioned by the editor) useless for any inputs held in optional configs?

@benfitzpatrick:

There isn’t a way to do that at the moment, and we find it pretty difficult to visualize a nice way to do it.

We’re going to handle optional configurations in rose app-upgrade and rose macro: https://github.com/metomi/rose/issues/1334 (which may touch on rose edit code as well) and then we can go from there.

I think that optional configurations are evil when your configurations are still under development (configuring as opposed to running). The cost of having a couple of very similar rose-app.conf files is pretty minimal.

hjoliver avatar Sep 03 '15 01:09 hjoliver

I see the editor does display each optional value with the option name, in a tooltip, which is a nice partial solution.

Could we eventually have something like this: for an item with optional configs, select by drop-down list which option to make "active", load the corresponding value into editor (and write it to the correct file if changed), and re-action any metadata triggers etc. that might affect the item? (I suppose that might be the difficult bit?)

hjoliver avatar Sep 03 '15 02:09 hjoliver

I think we could, given that we have an approach for doing this in the command line tools. That looked difficult too until we thought hard about it.

benfitzpatrick avatar Sep 03 '15 06:09 benfitzpatrick

A related suggestion from a user here, to allow creation of optional configs via the GUI: some way to specify that all changes from this point on (or perhaps from GUI start-up) should be saved to a named optional config file rather than to the main config file.

hjoliver avatar Oct 20 '15 22:10 hjoliver

I like that.

benfitzpatrick avatar Oct 21 '15 08:10 benfitzpatrick

We really could also do with proper optional configuration validation, as we now do by default on the command line in rose macro.

benfitzpatrick avatar Nov 17 '15 13:11 benfitzpatrick

I was going to suggest this as an enhancement, then found it had already been done. This would be a very useful feature, especially with the bells and whistles mentioned above (drop-downs to change optional config, saving as optional config, and macros for checking configs). To "view" an optional config at the moment, I append its settings to the main rose-app.conf and then undo this when I'm done, which feels a bit clunky.

markmuetz avatar Jan 06 '22 09:01 markmuetz