Allow platform setting to have prefix/suffix around subshell#6848
Allow platform setting to have prefix/suffix around subshell#6848MetRonnie merged 1 commit intocylc:8.5.xfrom
Conversation
|
The change makes sense, however, platform subshell is really Cylc 7 hangover, It looks like this approach is using Rose to configure Cylc with the Rose config edited when Could this be done the other way around, editing the Cylc config instead? # global.cylc
[platform groups]
[[hpc-live]]
platforms = aaa
[[hpc-live-bg]]
platforms = aaa-bgOr even pull in the value from an external source of truth: #!Jinja2
{% import "os" as os %}
[platform groups]
[[hpc-live]]
platforms = {{ os.fdopen("hpc_live_file").read() }}
[[hpc-live-bg]]
platforms = {{ os.fdopen("hpc_live_file").read() }}-bg |
Only using Rose for the simple parsing of the config file (
This would not pick up changes to Brainstorming here, would it be worth implementing dynamically updatable platforms in some other way, as an 8.6.0 feature? |
|
Tentatively putting this against 8.5.x as it's equally a fix as it is a feature? |
I think we need a better understanding of the use case and a quick think. I suspect that the only reason we are defining the platform at all is to ensure that it is defined when the workflow is started up. Beyond this broadcasts take over? If so, then this doesn't need to be dynamic at all.
Yes, we would need to run a command to do this: $ cylc reload -g '*'I thought we're using broadcasts for this anyway? Lets discuss when we've gathered a bit more insight. |
63f7f50 to
66e7f0d
Compare
| # Regex to check whether a string is a command | ||
| HOST_REC_COMMAND = re.compile(r'(`|\$\()\s*(.*)\s*([`)])$') | ||
| PLATFORM_REC_COMMAND = re.compile(r'(\$\()\s*(.*)\s*([)])$') | ||
| PLATFORM_REC_COMMAND = re.compile(r'(\$\()\s*(.*)\s*(\))') |
There was a problem hiding this comment.
[minor] can prevent this first group from being captured using ?::
| PLATFORM_REC_COMMAND = re.compile(r'(\$\()\s*(.*)\s*(\))') | |
| PLATFORM_REC_COMMAND = re.compile(r'(?:\$\()\s*(.*)\s*(\))') |
|
Seems fine. Will approve once I've seen matching Docs PR. |
66e7f0d to
a0472bf
Compare
|
Added 1 line of documentation in this PR |
|
Feel free to merge after tests pass |
This so that we can do e.g.
Currently we have to resort to
Check List
CONTRIBUTING.mdand added my name as a Code Contributor.?.?.xbranch.