-
Notifications
You must be signed in to change notification settings - Fork 94
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
Fix localhost platform matching #5343
Conversation
954418d
to
92c0242
Compare
92c0242
to
44a57fa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This hasn't fixed the problem for me unfortunately. Here is my test:
# global.cylc
[platforms]
[[localhost]]
[[localhost_test]]
hosts = <a remote platform>
install target = <remote platform install target>
The play a workflow e.g:
# flow.cylc
[scheduling]
[[graph]]
R1 = """
hello => goodbye
"""
[runtime]
[[root]]
script = "sleep 1"
platform = localhost_test
[[hello]]
[[goodbye]]
hello
and goodbye
both run locally, not respecting the settings in global.cylc
.
As suggested, changing localhost_test
to localhxst_test
works fine.
I'll have a look to see if I can spot the problem.
I can't reproduce this. |
There are other uses of this interface with I'm not sure I understand the logic of cylc-flow/cylc/flow/task_remote_mgr.py Lines 170 to 176 in c817dd9
Return localhost if the host is localhost??? I would have thought the match = command_pattern.match(command)
if not match:
# this isn't a command, no subshell evaluation to perform
return command Although note that later on we do: command = os.path.expandvars(command) Which might need to be moved further up if we intend to support configuring the platform by an environment variable (e.g. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't reproduce this.
Sorry @wxtim my remote testing was broken. I have run this with a fresh environment and this is now working perfectly.
I will hold off approval as I think Oliver has made some suggestions about host checking which I think sound sensible to address in this pr.
No. |
This function can be called to find the value of a I can't say for sure without looking more whether the Cylc 7 behavior is sane. But surely we'd have noticed if unreachable hosts caused jobs to run on local? |
Only being run if subshell eval is supposed to be returning a host. As for why it's doing even this, I'm afraid that's going into the depths of time/git. |
I have put up a draft PR to improve the readability of the subshell eval code, let me know thoughts: wxtim#53 |
9df1a9f
to
83484ef
Compare
@MetRonnie & @hjoliver - Poke |
I think this is still awaiting merge of @MetRonnie 's side PR to your branch @wxtim ? Tested as working however. (And I agree the affected code is a bit confusing). |
Yes, but I'm assuming that @MetRonnie has marked it draft for a reason |
* WIP improve readability of host/platform eval code * Address review
Co-authored-by: Ronnie Dutta <61982285 [email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Closes #5342
Check List
CONTRIBUTING.md
and added my name as a Code Contributor.setup.cfg
andconda-environment.yml
.CHANGES.md
entry included if this is a change that can affect usersCylc-Doc pull request opened if required at cylc/cylc-doc/pull/XXXX.?.?.x
branch.