mirror of
https://github.com/wassname/ray.git
synced 2026-08-10 12:30:14 +08:00
[Autoscaler] Fix k8s command runner when command fails (#10966)
Co-authored-by: Allen Yin <allenyin@anyscale.io>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import os
|
||||
import shutil
|
||||
from subprocess import CalledProcessError
|
||||
import tempfile
|
||||
import threading
|
||||
import time
|
||||
@@ -48,7 +49,8 @@ class MockProcessRunner:
|
||||
def check_call(self, cmd, *args, **kwargs):
|
||||
for token in self.fail_cmds:
|
||||
if token in str(cmd):
|
||||
raise Exception("Failing command on purpose")
|
||||
raise CalledProcessError(1, token,
|
||||
"Failing command on purpose")
|
||||
self.calls.append(cmd)
|
||||
|
||||
def check_output(self, cmd):
|
||||
|
||||
Reference in New Issue
Block a user