List of deprecated Cylc variables?

Hi,

I could not see it in the docs, but is there a master list of Cylc variables which are deprecated when moving from Cylc7 to Cylc8? I saw for example in this section mention of CYLC_SUITE_NAME being deprecated, but I would like a complete list of original and new variables names to make sure workflow scripts are as clean as possible and won’t break at some point in the future as variables get removed.

Thanks.

  • Any Cylc variable with SUITE in the name has been deprecated in favour of the new WORKFLOW variant e.g. CYLC_SUITE_RUN_DIR has become CYLC_WORKFLOW_RUN_DIR.
  • CYLC_SUITE_NAME has become CYLC_WORKFLOW_ID.
    • Note, there is also CYLC_WORKFLOW_NAME which is the same as CYLC_WORKFLOW_ID but with the run number/name stripped off.
  • The CYLC_SUITE_DEF_PATH variable has been deprecated with no replacement.

Here’s the list of supported Cylc environment variables for job scripts:

https://cylc.github.io/cylc-doc/stable/html/user-guide/writing-workflows/runtime.html#task-job-script-variables

And here’s the list of support environment variables for workflow configuration / Jinja2.

https://cylc.github.io/cylc-doc/stable/html/user-guide/writing-workflows/jinja2.html#admonition-2

1 Like

If CYLC_SUITE_DEF_PATH has been deprecated, should I expect cylc validate to fail in backward compatibility mode? Will backward compatibility mode automatically pick up the change from CYLC_SUITE_* to CYLC_WORKFLOW_*?

Back compatibility mode replicates some characteristics of the Cylc 7 scheduling algorithm in order to allow things like suicide triggers to work. Deprecated variables like CYLC_SUITE_DEF_PATH will continue to work after you move out of compatibility mode, support for these variables will be removed at some point in the future.

The cylc validate command can detect and warn you about some deprecated syntax, but doesn’t currently look inside your Bash scripts. The cylc lint command will start to warn you about use of deprecated variables in Bash scripts from version 8.2.0 which will be released soon.

1 Like

Will it look at just shell scripts, or is it essentially doing a recursive grep for CYLC_SUITE_DEF_PATH (as an eg)? I ask because, in theory, someone could have os.environ['CYLC_SUITE_DEF_PATH'] in a python script.

At present it’s only looking at .cylc. and .rc files, I think we should extend this to bin/ and lib/ but will probably require some form of opt-in option in order to keep the command performant.

1 Like

It’s on my TODO list…

Hi cylc wizards,
Just dropping a note that Future Me, or someone searching for $CYLC_SUITE_DEF_PATH might locate. The workaround that cylc has for the deprecation of $CYLC_SUITE_DEF_PATH is that the entire directory structure below the suite directory is replicated in the cylc-run directory, including symlinks which remain symbolic links inside cylc-run. This defeats some of the filesystem-agnostic intention of the cylc8 structure (symlinks must be valid on whatever file system eventually runs the task that needs to access the files they point to), but it provides a very tidy way to avoid hard-coding paths to, for instance, large ancillary data files.
Big THANKS to the cylc8 developers for handling symlinks in this way. It permits me to do something that might be dumb, but also might save me tremendous hassle.

–Edward H.

1 Like