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

what happens if [jinja2:suite.rc] and [template variables] are both set. #124

Closed
wxtim opened this issue Mar 22, 2022 · 1 comment · Fixed by #133
Closed

what happens if [jinja2:suite.rc] and [template variables] are both set. #124

wxtim opened this issue Mar 22, 2022 · 1 comment · Fixed by #133
Assignees
Labels
bug Something isn't working
Milestone

Comments

@wxtim
Copy link
Member

wxtim commented Mar 22, 2022

Describe the bug
Investigate what happens if [jinja2:suite.rc] and [template variables] are both set.

Steps to reproduce the bug

Uncompress rose-dep-warnings.tar.gz or manually create this workflow in ~/cylc-src/rose-dep-warnings:

rose-suite.conf:

[jinja2:suite.rc]
GREETING="Hello"
[template variables]
GREETING="Mittyn Da"

flow.cylc:

#!jinja2
[scheduling]
    initial cycle point = 1066
    [[dependencies]]
        R1 = foo
[runtime]
    [[foo]]
        script = echo {{ GREETING }}

Then run

cylc graph rose-dep-warnings
cylc install rose-dep-warnings
cylc play rose-dep-warnings
cat ~/cylc-run/rose-dep-warnings/log/flow-files/flow.processed.cylc

Expected behavior
A warning should be printed to the effect that you shouldn't use both sections.

Pull requests welcome!
This is an Open Source project - please consider contributing a bug fix
yourself (please read CONTRIBUTING.md before starting any work though).

@wxtim wxtim added bug Something isn't working question Flag this as a question for the next Cylc project meeting. labels Mar 22, 2022
@wxtim wxtim added this to the 1.0.3 milestone Mar 22, 2022
@wxtim wxtim self-assigned this Mar 28, 2022
@oliver-sanders
Copy link
Member

cylc-rose should raise an error and refuse to work.

@oliver-sanders oliver-sanders removed the question Flag this as a question for the next Cylc project meeting. label Apr 4, 2022
@wxtim wxtim closed this as completed in #133 Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants