Keep track of where check results originated from
This commit is contained in:
parent
8d5fde5fcd
commit
b0f6bea925
|
@ -11,7 +11,9 @@ def check_operator_name(bundle: Bundle) -> Iterator[CheckResult]:
|
|||
"""Check if the operator names used in CSV, metadata and filesystem are consistent"""
|
||||
name = bundle.annotations.get("operators.operatorframework.io.bundle.package.v1")
|
||||
if name is None:
|
||||
yield Fail(f"Bundle does not define the operator name in annotations.yaml")
|
||||
yield Fail(
|
||||
bundle, f"Bundle does not define the operator name in annotations.yaml"
|
||||
)
|
||||
return
|
||||
if name != bundle.csv_operator_name:
|
||||
yield Fail(
|
||||
|
|
|
@ -18,7 +18,7 @@ def check_upgrade(operator: Operator) -> Iterator[CheckResult]:
|
|||
if dangling_bundles:
|
||||
yield Fail(
|
||||
operator,
|
||||
f"Channel {channel} has dangling bundles: {dangling_bundles}.",
|
||||
f"Channel {channel} has dangling bundles: {dangling_bundles}",
|
||||
)
|
||||
except Exception as exc:
|
||||
yield Fail(operator, str(exc))
|
||||
|
|
Loading…
Reference in New Issue