-
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
clear cylc options at reload #6065
Conversation
@wxtim, tagged as 8.3.0 since this was raised on master. |
# Note: Does NOT apply to reload on restart, because the play | ||
# command used to restart can have template variables attached. | ||
# See https://github.com/cylc/cylc-flow/pull/5996 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This explanation doesn't make much sense to me as the play command used to start the workflow in the first place can also have template variables attached?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you do
cylc play x --pause -S 'foo=1'
cylc stop x
cylc reinstall x -S foo=2
cylc play x -S 'foo=3'
Do you want foo=1 or 2 or 3?
This is also safe against
cylc play x --pause -S 'foo=1'
cylc stop x
cylc reinstall x -S foo=2
cylc play x
because the restart involves re-reading the rose config files too.
Ok, you'll need to change the base branch to 8.2.x. Remember to check the branch when ticking the:
Line in the description. |
While you're here, I think it would be worth improving the description for
|
# The reload command doesn't have the ability to set these but | ||
# if the user has used VR to re-install before reload they will | ||
# expect the changed values not the ones stored on the scheduler. | ||
# Note: Does NOT apply to reload on restart, because the play | ||
# command used to restart can have template variables attached. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused
- If the user has used
cylc vr running-workflow -S
(reinstall + reload), how are the changed values getting through to the scheduler then? - What do you mean by "reload on restart"? If the user has used
cylc vr stopped-workflow -S
(reinstall + restart), then there is no reload, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the user has used cylc vr running-workflow -S (reinstall + reload), how are the changed values getting through to the scheduler then?
The reinstall updates the rose-suite-cylc-install.conf
which the reload reads. The reload doesn't have the -S
option so clearing that here only affects options set on the scheduler by an earlier Cylc play.
Your question has however revealed a horrid case where this doesn't work:
cylc vip -S 'VAR=1' --pause
cylc vr bugs/5968
Do you think that the correct options might be to allow Cylc Reload to set -S
and it's friends, becuase to me that looks like the simplest way of doing things?
What do you mean by "reload on restart"? If the user has used cylc vr stopped-workflow -S (reinstall + restart), then there is no reload, right?
Oliver described it as an implicit reload.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your question has however revealed a horrid case where this doesn't work
What does happen with this example, and what is meant to happen?
After much thought, and an offline discussion with @oliver-sanders I'm closing this: We now think that the correct solution to this problem is rather different. |
Closes #5968 and #6058 (Which was an accidental by product of #5996
I've tried to include as much info as possible here, to prevent reviewers having to re-hash the investigation or handle a web of issues and PRs for what turns out to be a simple problem with complex ramifications.
Full statement of the problem.
The original problem (#5968 ) was that on reload CLI rose options (
-S
,-D
and-O
) are already stored on the scheduler, and because reload doesn't take those arguments they do not get updated. In Cylc VR the user can update the stored copy, but the reload cannot override the variables stored on the scheduler.The first fix (#5996) cleared
-S
and-D
, but not-O
which led to inconsistencies on reload, and an apparent change in priority between variables set in different manner.Testing
This issue is a complex interaction between Cylc and the Cylc Rose plugin. Unfortunately the plugin is not as stand-alone as I would like. I think that there are 3 possible ways of testing this change:
-S
/--rose-template-variable
cylc-rose#310) Functional and End-to-End testing in Cylc Rose. This allows me to demonstrate the actual cases where this is a problem, but is ugly because Cylc Rose does not currently have infrastructure equivalent to Cylc for creating schedulers.Check List
CONTRIBUTING.md
and added my name as a Code Contributor.setup.cfg
(andconda-environment.yml
if present).-S
/--rose-template-variable
cylc-rose#310CHANGES.md
entry included if this is a change that can affect users?.?.x
branch.