Add support for deleting namespaces (users, organizations)
Fixes #102 Fixes #105
This commit is contained in:
parent
a74e94fb67
commit
73eb66eac5
23 changed files with 407 additions and 33 deletions
|
@ -16,6 +16,7 @@ from buildman.jobutil.workererror import WorkerError
|
|||
|
||||
from data import model
|
||||
from data.database import BUILD_PHASE
|
||||
from data.model import InvalidRepositoryBuildException
|
||||
|
||||
HEARTBEAT_DELTA = datetime.timedelta(seconds=30)
|
||||
BUILD_HEARTBEAT_DELAY = datetime.timedelta(seconds=30)
|
||||
|
@ -241,8 +242,13 @@ class BuildComponent(BaseComponent):
|
|||
# Parse and update the phase and the status_dict. The status dictionary contains
|
||||
# the pull/push progress, as well as the current step index.
|
||||
with self._build_status as status_dict:
|
||||
if self._build_status.set_phase(phase, log_data.get('status_data')):
|
||||
logger.debug('Build %s has entered a new phase: %s', self.builder_realm, phase)
|
||||
try:
|
||||
if self._build_status.set_phase(phase, log_data.get('status_data')):
|
||||
logger.debug('Build %s has entered a new phase: %s', self.builder_realm, phase)
|
||||
except InvalidRepositoryBuildException:
|
||||
build_id = self._current_job.repo_build.uuid
|
||||
logger.info('Build %s was not found; repo was probably deleted', build_id)
|
||||
return
|
||||
|
||||
BuildComponent._process_pushpull_status(status_dict, phase, log_data, self._image_info)
|
||||
|
||||
|
@ -300,7 +306,12 @@ class BuildComponent(BaseComponent):
|
|||
except:
|
||||
pass
|
||||
|
||||
self._build_status.set_phase(BUILD_PHASE.COMPLETE)
|
||||
try:
|
||||
self._build_status.set_phase(BUILD_PHASE.COMPLETE)
|
||||
except InvalidRepositoryBuildException:
|
||||
logger.info('Build %s was not found; repo was probably deleted', build_id)
|
||||
return
|
||||
|
||||
trollius.async(self._build_finished(BuildJobResult.COMPLETE))
|
||||
|
||||
# Label the pushed manifests with the build metadata.
|
||||
|
|
Reference in a new issue