cylc-ui
cylc-ui copied to clipboard
Query template variables for Play form on restart
[!NOTE] The original discussion here is out of date. See the bottom
The GUI needs somewhere for users to enter Jinja2 var=value
pairs for use with any spawned command that takes the --set
option. As of https://github.com/cylc/cylc/pull/745 this can be achieved for cylc run
and cylc restart
with a new "other options" entry in the suite start popup, but not for validation etc.
It might be worth having suite daemons record any --set
options used at start-up, then the GUI could ask for them, and automatically re-use them for any suite-parsing commands it spawns.
[UPDATE:] save Jinja2 input parameters in the suite DB
[meeting] @matthewrmshin to look at this after the state-dump replacement #1827 and rose suite-run issues https://github.com/cylc/cylc/issues/1885 are done. Things to consider:
- currently only simple values can be entered this way
- record such suite inputs in the run-DB so they persist
- what about the
rose suite-run
approach (write Jinja2 defs to the top of the suite at install time)?
Currently:
- Both
cylc run
andcylc restart
have the options--set=NAME=VALUE
and--set-file=FILE
. - These settings are stored in memory and
cylc reload
re-uses them.
Problems:
- We want
cylc restart
to reuse what is specified incylc run
automatically.- What happens if we want to override or unset original entries?
-
FILE
defined by--set-file=FILE
may be changed or even deleted aftercylc run
. - We can't override or unset original
--set=NAME=VALUE
incylc reload
.
Considerations:
- Should
cylc restart
load original processedsuite.rc
(i.e. the one inlog/suiterc/*-run.rc
) by default?- A pure restart should not require the user to re-enter
--set=NAME=VALUE
and--set-file=FILE
settings.
- A pure restart should not require the user to re-enter
- We can then add options to
cylc restart
andcylc reload to reload a new
suite.rcwith or without the old
--set=NAME=VALUEand
--set-file=FILE` settings.
This is done, except for entry via the GUI: https://github.com/cylc/cylc/pull/1965#issuecomment-241339465
Notes from discussion about moving it to cylc-web:
- (Matt) Yes. Values are stored in the runtime SQLite file. We need to be able to enable read/write from the web UI.
- (Hilary) Agreed. (BUT it might be good to require that such input values are stored in a file on disk - the to-be-migrated rose-suite.conf - and rather than specified dynamically in the UI, and allow that file to be edited via the UI?)
The up-to-date solution for this would be to query the workflow's template vars to automatically populate them in the Play form: