Skip to content

Commit

Permalink
Don't fail build when removing build fails, pipeline run could be alr…
Browse files Browse the repository at this point in the history
…eady

removed, and build shouldn't fail just because it couldn't delete
pipeline run

Signed-off-by: Robert Cerven <rcerven@redhat.com>
  • Loading branch information
rcerven committed Oct 13, 2022
1 parent 8eba397 commit 6635090
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion koji_containerbuild/plugins/builder_containerbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,10 @@ def handle_build_response(self, build_id, platforms: list = None):
try:
return self._handle_build_response(build_id, platforms)
finally:
self.osbs().remove_build(build_id)
try:
self.osbs().remove_build(build_id)
except Exception as error:
self.logger.warning("Failed to remove build %s : %s", build_id, error)

def _handle_build_response(self, build_id, platforms: list = None):
self.logger.debug("OSBS build id: %r", build_id)
Expand Down

0 comments on commit 6635090

Please sign in to comment.