Skip to content
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

Minor doc tweak for cylc play and -s option (and others?) #5965

Closed
ColemanTom opened this issue Feb 12, 2024 · 2 comments
Closed

Minor doc tweak for cylc play and -s option (and others?) #5965

ColemanTom opened this issue Feb 12, 2024 · 2 comments

Comments

@ColemanTom
Copy link
Contributor

Problem

help doc for vr (and others?) should perhaps tell you that an option can only be used when a workflow is stopped.

$ cylc vr -s JINJA_VAR=12 --pause basic-workflow
2024-02-12T04:32:28Z WARNING - Template variables (from --set/--set-file) can only be changed if the workflow is stopped.
$ cylc help vr
... <snip> ...
  -s NAME=VALUE, --set=NAME=VALUE
                        Set the value of a Jinja2 template variable in the
                        workflow definition. Values should be valid Python
                        literals so strings must be quoted e.g.
                        'STR="string"', INT=43, BOOL=True. This option can be
                        used multiple times on the command line. NOTE: these
                        settings persist across workflow restarts, but can be
                        set again on the "cylc play" command line if they need
                        to be overridden.
... <snip> ...

Proposed Solution

Tweak the help information for any commands which can only be run on a stop workflow to specify it can only be used when a workflow is stopped.

p.s. I am unsure what else has the same behaviour (and I admit I'm not sure why -s needs a stopped workflow, but -S does not).

@oliver-sanders
Copy link
Member

oliver-sanders commented Feb 14, 2024

(and I admit I'm not sure why -s needs a stopped workflow, but -S does not).

  • -S happens at (re)install time.
  • -s happens at configuration load time.

The reason that there are two different mechanisms is that -s comes from Cylc and -S comes from Rose.

In order to keep people's working patterns working, we had to continue to support both.

The -S option sets a [template variable] in the Rose configuration (this gets stored in ~/cylc-run/<workflow-id>/opt/rose-suite-cylc-install.conf).

There is no reason why the cylc reload command could not accept the -s option, it just hasn't been implemented.

@oliver-sanders
Copy link
Member

Tweak the help information for any commands which can only be run on a stop workflow to specify it can only be used when a workflow is stopped.

This restriction only applies to cylc vr.

The best solution is to remove the restriction, allowing template variables to be specified to the cylc reload command. Closing this issue in favour of #6045 which will remove the restriction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants