-
Notifications
You must be signed in to change notification settings - Fork 11
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
Allow change of templating language when reinstalling #192
Allow change of templating language when reinstalling #192
Conversation
caedf2f
to
111dfa2
Compare
def test_cylc_reinstall_fail_on_clashing_template_vars(tmp_path, request): | ||
"""If you re-install with a different templating engine in suite.rc | ||
reinstall should fail. | ||
""" |
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.
What if you replace jinja2:suite.rc
with empy:suite.rc
or vice versa? Is that meant to be allowed now?
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.
It's not recommended since both are deprecated. You will get a deprecation warning (from elsewhere in the code). However, I don't think that we should actively prevent people doing this - I think it's a legit, if strange, thing to do.
It might be reasonable to prevent people changing template variables to either, but I hadn't done that, because it was a side effect of the original feature not the intention.
(It'll also mess your workflow up without sig re-writing, but that's the user's problem IMO)
- Move checks for multiple templating sections to before old and new configs are merged - Algorithm merging previous and current config renames old template variables section if new install has changes it. - Update tests for merge algorithm. - Remove test that it's impossible to change templating languages on reinstall - it should not be.
1ba4456
to
1e8b09b
Compare
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.
One question, feel free to resolve/merge if happy.
…guage_change_reinstall_bug
Will do once the tests have re-run |
These changes close #191
in
record_cylc_install_options
the functionidentify_templating_section
is used to check whether the user has set more than one templating section. This is done after the previousrose-suite-cylc-install.conf
has been merged with the new one, so that if the user has changed the templating language both will be present in the merged config and the test will always fail.Work done
Requirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.setup.cfg
.