2621372 Do not treat ODCSComposeNotReady as error which fails ArtifactBuild.

Authored and Committed by jkaluza 5 years ago
    Do not treat ODCSComposeNotReady as error which fails ArtifactBuild.
    
    When compose is not done yet, the BaseHandler raises ODCSComposeNotReady
    exception. This is supposed to be catched by the `start_to_build_images`,
    which pauses the rebuild until the ODCS compose is ready.
    
    The issue is that `fail_artifact_build_on_handler_exception` decorator
    also catches this ODCSComposeNotReady exception and marks the ArtifactBuild
    as FAILED. This is wrong, because ODCSComposeNotReady exception is expected
    and should not mark the build as FAILED.
    
    This commit fixes it by introducing the `whitelist` kwarg in the
    `fail_artifact_build_on_handler_exception` decorator and whitelists
    the `ODCSComposeNotReady` exception, so it does not move the build
    to FAILED state, but instead just re-raises the exception so it
    can be handled in `start_to_build_images`.
    
        
file modified
+34 -25
file modified
+2 -0