Better handling of retries on build errors
This commit is contained in:
parent
3bf5e93f06
commit
a1938593a9
3 changed files with 4 additions and 5 deletions
|
@ -25,7 +25,8 @@ class WorkerError(object):
|
||||||
},
|
},
|
||||||
|
|
||||||
'io.quay.builder.internalerror': {
|
'io.quay.builder.internalerror': {
|
||||||
'message': 'An internal error occurred while building. Please submit a ticket.'
|
'message': 'An internal error occurred while building. Please submit a ticket.',
|
||||||
|
'is_internal': True
|
||||||
},
|
},
|
||||||
|
|
||||||
'io.quay.builder.buildrunerror': {
|
'io.quay.builder.buildrunerror': {
|
||||||
|
|
|
@ -125,9 +125,7 @@ class BuilderServer(object):
|
||||||
|
|
||||||
def _job_complete(self, build_job, job_status):
|
def _job_complete(self, build_job, job_status):
|
||||||
if job_status == BuildJobResult.INCOMPLETE:
|
if job_status == BuildJobResult.INCOMPLETE:
|
||||||
self._queue.incomplete(build_job.job_item, restore_retry=True, retry_after=30)
|
self._queue.incomplete(build_job.job_item, restore_retry=False, retry_after=30)
|
||||||
elif job_status == BuildJobResult.ERROR:
|
|
||||||
self._queue.incomplete(build_job.job_item, restore_retry=False)
|
|
||||||
else:
|
else:
|
||||||
self._queue.complete(build_job.job_item)
|
self._queue.complete(build_job.job_item)
|
||||||
|
|
||||||
|
|
|
@ -211,7 +211,7 @@ def start_build(repository, dockerfile_id, tags, build_name, subdir, manual,
|
||||||
dockerfile_build_queue.put([repository.namespace_user.username, repository.name], json.dumps({
|
dockerfile_build_queue.put([repository.namespace_user.username, repository.name], json.dumps({
|
||||||
'build_uuid': build_request.uuid,
|
'build_uuid': build_request.uuid,
|
||||||
'pull_credentials': model.get_pull_credentials(pull_robot_name) if pull_robot_name else None
|
'pull_credentials': model.get_pull_credentials(pull_robot_name) if pull_robot_name else None
|
||||||
}), retries_remaining=2)
|
}), retries_remaining=3)
|
||||||
|
|
||||||
# Add the build to the repo's log.
|
# Add the build to the repo's log.
|
||||||
metadata = {
|
metadata = {
|
||||||
|
|
Reference in a new issue