def test_skip_error_runs(instance, grpc_server_registry):
    create_invalid_run(instance, run_id='bad-run', status=PipelineRunStatus.QUEUED)
    create_run(instance, run_id='good-run', status=PipelineRunStatus.QUEUED)
    coordinator = QueuedRunCoordinatorDaemon(interval_seconds=5, max_concurrent_runs=10)
    errors = [error for error in list(coordinator.run_iteration(instance, grpc_server_registry)) if error]
    assert (len(errors) == 1)
    assert ('ModuleNotFoundError' in errors[0].message)
    assert (get_run_ids(instance.run_launcher.queue()) == ['good-run'])
    assert (instance.get_run_by_id('bad-run').status == PipelineRunStatus.FAILURE)
def test_skip_error_runs(instance, grpc_server_registry):
    create_invalid_run(instance, run_id='bad-run', status=PipelineRunStatus.QUEUED)
    create_run(instance, run_id='good-run', status=PipelineRunStatus.QUEUED)
    coordinator = QueuedRunCoordinatorDaemon(interval_seconds=5, max_concurrent_runs=10)
    errors = [error for error in list(coordinator.run_iteration(instance, grpc_server_registry)) if error]
    assert (len(errors) == 1)
    assert ('ModuleNotFoundError' in errors[0].message)
    assert (get_run_ids(instance.run_launcher.queue()) == ['good-run'])
    assert (instance.get_run_by_id('bad-run').status == PipelineRunStatus.FAILURE)