-
Notifications
You must be signed in to change notification settings - Fork 93
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
vr: plugin options not respected when workflow is running #5968
Comments
The root cause of this bug is that the CLI options are held in memory, they are subsequently re-used to re-load the workflow config: cylc-flow/cylc/flow/scheduler.py Lines 1272 to 1287 in 8ab57ad
Inspecting the options at this point will reveal the previous value:
This makes it look like the plugin as if This diff fixes the problem: diff --git a/cylc/flow/scheduler.py b/cylc/flow/scheduler.py
index ec3ba6f0c..f6bda8ca6 100644
--- a/cylc/flow/scheduler.py
+++ b/cylc/flow/scheduler.py
@@ -1269,6 +1269,7 @@ class Scheduler:
def load_flow_file(self, is_reload=False):
"""Load, and log the workflow definition."""
# Local workflow environment set therein.
+ self.options.rose_template_vars = []
return WorkflowConfig(
self.workflow,
self.flow_file, But it's a bit ugly! Not sure what nicer options might be available, things to consider:
|
I'd guess that Worth checking, but logically
I should check whether -O is preserved on restart. It ought to be. |
This will be tested in cylc-rose. |
Have checked. Definately need to do the same with -D |
Closed by #5996 and cylc-rose changes. |
The
-S
option does not take effect with thecylc vr
command in the situation where the workflow is already running (i.e. the reload case).Reproducible Example:
VAR
is updated in the Rose files:But not in the Cylc files:
Example derived from: https://cylc.discourse.group/t/jinja2-variable-differences-in-config-files-new-ones-are-not-being-respected/885/6
How it's supposed to work:
-S
option is provided by cylc-rose and applies to (re)install.-S
option, it writes the input to the cylc-install optional config (~/cylc-run/<workflow>/opt/rose-suite-cylc-install.conf
).Ongoing Work
Note, there have been recent changes (unreleased) to the reinstall code and there are pending changes to the way the plugins are run: #5868
Suggest reproducing and fixing on top of that branch.
The text was updated successfully, but these errors were encountered: