-
Notifications
You must be signed in to change notification settings - Fork 53
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
Invoke host-select via bash login shell #2555
Conversation
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.
Looks good, just need to drag through the value of CYLC_ENV_NAME
provided by the wrapper script.
Might have to use |
@oliver-sanders Any idea why this fails for localhost? I tried using
|
Not sure, worth checking whether stdin is being passed through properly. |
The escaping is the problem:
|
The escaping is only in the reporting/logging, it doesn't affect the call to diff --git a/metomi/rose/popen.py b/metomi/rose/popen.py
index 6a5249e5..074ade25 100644
--- a/metomi/rose/popen.py
+++ b/metomi/rose/popen.py
@@ -132,7 +132,7 @@ class RosePopener:
def list_to_shell_str(cls, args):
if not args:
return ""
- return " ".join([re.sub(r"([\"'\s])", r"\\\1", arg) for arg in args])
+ return " ".join(args)
def __init__(self, event_handler=None):
self.event_handler = event_handler and it still fails in the same way |
Ah wait, I think I've got it |
I've figured out why the tests are failing this time round. It has brought up a question: I have updated the docs |
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've tested this but not reviewed the change
MacOS test showing as failed but when you click on it the "re-run failed tests" step actually passed |
For the Rose repo we re-run tests in serial purely for debugging purposes, they are expected to pass first time around in parallel. (in Cylc the functional tests are sufficiently flaky we've had no choice but to rerun them but this is really bad and something we should dispense with one day) |
Actually the MacOS tests passed the first time around in the previous commit: https://github.com/metomi/rose/runs/5536961434?check_suite_focus=true Most recent commit is only a change to documentation so shouldn't have affected it |
(easier just to re-run) (failed again, but only one test this time) (kicked off a run against master to see if this issue has crept in https://github.com/metomi/rose/actions/runs/1986244844) |
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.
Looks good.
Tests passed first time on master https://github.com/metomi/rose/actions/runs/1986244844 Perhaps some change here made tests incompatible when running in parallel? |
Reran on master, failed: https://github.com/metomi/rose/actions/runs/1986244844 |
The error from the failed jobs is genuine and looks the same: #2558 |
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.
Tested, everything worked as intended.
Had a quick look to see why we weren't quoting commands in the Popen thinggy, I think this is perfectly sensible.
Unless it was an ssh failure
Strangely --- - 2022-03-16 15:26:42.653472890 +0000
+++ mock-ssh.out.sorted 2022-03-16 15:26:42.646377238 +0000
@@ -1,2 +1 @@
-sleepy1 bash -l -c 'rose host-select-client'
sleepy2 bash -l -c 'rose host-select-client' https://github.com/metomi/rose/runs/5572332850?check_suite_focus=true#step:12:238 |
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.
- Read code
- Functionally tested
This closes #2552
Changes the command that gets run in the background, as follows: