Merge remote-tracking branch 'origin/master' into pullfail
This commit is contained in:
commit
5388633f9a
100 changed files with 2125 additions and 1008 deletions
|
@ -44,9 +44,9 @@ def matches_system_error(status_str):
|
|||
KNOWN_MATCHES = ['lxc-start: invalid', 'lxc-start: failed to', 'lxc-start: Permission denied']
|
||||
|
||||
for match in KNOWN_MATCHES:
|
||||
# 4 because we might have a Unix control code at the start.
|
||||
found = status_str.find(match[0:len(match) + 4])
|
||||
if found >= 0 and found <= 4:
|
||||
# 10 because we might have a Unix control code at the start.
|
||||
found = status_str.find(match[0:len(match) + 10])
|
||||
if found >= 0 and found <= 10:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
@ -489,6 +489,7 @@ class DockerfileBuildWorker(Worker):
|
|||
container['Id'], container['Command'])
|
||||
docker_cl.kill(container['Id'])
|
||||
self._timeout.set()
|
||||
|
||||
except ConnectionError as exc:
|
||||
raise WorkerUnhealthyException(exc.message)
|
||||
|
||||
|
@ -506,7 +507,7 @@ class DockerfileBuildWorker(Worker):
|
|||
|
||||
job_config = json.loads(repository_build.job_config)
|
||||
|
||||
resource_url = user_files.get_file_url(repository_build.resource_key)
|
||||
resource_url = user_files.get_file_url(repository_build.resource_key, requires_cors=False)
|
||||
tag_names = job_config['docker_tags']
|
||||
build_subdir = job_config['build_subdir']
|
||||
repo = job_config['repository']
|
||||
|
@ -625,6 +626,7 @@ class DockerfileBuildWorker(Worker):
|
|||
|
||||
except WorkerUnhealthyException as exc:
|
||||
# Spawn a notification that the build has failed.
|
||||
log_appender('Worker has become unhealthy. Will retry shortly.', build_logs.ERROR)
|
||||
spawn_failure(exc.message, event_data)
|
||||
|
||||
# Raise the exception to the queue.
|
||||
|
|
Reference in a new issue