cylc-ui icon indicating copy to clipboard operation
cylc-ui copied to clipboard

Query template variables for Play form on restart

Open hjoliver opened this issue 11 years ago • 6 comments

[!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.

hjoliver avatar Nov 02 '13 10:11 hjoliver

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

hjoliver avatar Feb 12 '15 09:02 hjoliver

[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)?

hjoliver avatar Jun 16 '16 13:06 hjoliver

Currently:

  • Both cylc run and cylc 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 in cylc 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 after cylc run.
  • We can't override or unset original --set=NAME=VALUE in cylc reload.

Considerations:

  • Should cylc restart load original processed suite.rc (i.e. the one in log/suiterc/*-run.rc) by default?
    • A pure restart should not require the user to re-enter --set=NAME=VALUE and --set-file=FILE settings.
  • We can then add options to cylc restart and cylc reload to reload a newsuite.rcwith or without the old--set=NAME=VALUEand--set-file=FILE` settings.

matthewrmshin avatar Jul 15 '16 15:07 matthewrmshin

This is done, except for entry via the GUI: https://github.com/cylc/cylc/pull/1965#issuecomment-241339465

hjoliver avatar Aug 29 '16 00:08 hjoliver

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?)

kinow avatar Mar 10 '19 21:03 kinow

The up-to-date solution for this would be to query the workflow's template vars to automatically populate them in the Play form:

image

MetRonnie avatar Mar 12 '24 16:03 MetRonnie