We use environment variables and jinja2 to add project-specific elements to what our workflows see when they load the global.cylc file. However, we’ve noticed that when we run cylc reload workflow that the global.cylc file does not appear to be re-evaluated. This means that our variables are not updated in the workflows.
For example, we inject project-specific variables into their init-scripts:
Is there a way to tell Cylc to always re-evaluate the global.cylc file on a workflow reload? We would prefer to not have to stop/play, but if that’s what we have to do, we need to tell our users.
We are aware of one use case for having a dynamic global config, configuring the [symlink dirs] on a per-project basis (this can now be controlled by env vars in a rose-suite.conf file).
But, I’m not aware of any use case for having a global config that is both dynamic to the workflow and which varies over the life of the workflow? Which of the global.cylc configs are dynamic in this setup?
We did consider getting Cylc to reload the global config at a configured interval, however, we haven’t started on this work yet. Whilst trivial to implement as a main-loop plugin, Cylc has a number of caches and object states which would need to be cleared in order for this to work correctly, so there would be a little work involved in getting it off the ground.