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

Difficulty with passing environment variables between Jinja2 and Cylc 8 config file sections #11

Open
sk8forether opened this issue Oct 26, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@sk8forether
Copy link
Member

Description of Problem

It turns out that in Cylc 8 it is non-trivial to pass certain types of variables around within the global, workflow, or task configuration, even within the same file. And it becomes even more difficult to do this within conditional statements, user environment variables, or cylc runtime environment variables.

The Cylc 8 docs are littered with examples of using Jinja2 conditional statements to do all kinds of nifty things within the workflow, but these conditional statements have harsh limitations about which types of variables you can use. Cylc's implementation of Jinja2 also limits which features are available in the global configuration, thus causing one to not be able to do much passing back and forth without the configuration failing. This issue is mostly to document a bunch of testing that was done for the purposes of using these conditional statements within the global config for various purposes, including customization of runtime configurations based on platform selection (will be covered more in another issue).

Testing

(TODO: Will add more details here)

References

From the docs

Stack Overflow Questions

Environment Variables

Note that all of these methods were tested and failed due to Cylc's specialized implementation of Jinja2

Logic operators

Other

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

No branches or pull requests

1 participant