From c14b3c96cb27e3d1065412394a9d87037c5d584c Mon Sep 17 00:00:00 2001 From: Ales Raszka Date: Fri, 2 Feb 2024 16:56:33 +0100 Subject: [PATCH] Use annotation package name for static check The static check of marketplace bundles previously relied on a annotation package name. When the check was converted to a stati test suite a package name from csv was used instead. This commit fixes a check and use a package name from annotations again. JIRA: ISV-4524 Signed-off-by: Ales Raszka --- .../operatorcert/static_tests/isv/bundle.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/operator-pipeline-images/operatorcert/static_tests/isv/bundle.py b/operator-pipeline-images/operatorcert/static_tests/isv/bundle.py index 2b651f786..2bc1332f3 100644 --- a/operator-pipeline-images/operatorcert/static_tests/isv/bundle.py +++ b/operator-pipeline-images/operatorcert/static_tests/isv/bundle.py @@ -52,14 +52,18 @@ def check_marketplace_annotation(bundle: Bundle) -> Iterator[CheckResult]: if organization != "redhat-marketplace": return + annotation_package = bundle.annotations.get( + "operators.operatorframework.io.bundle.package.v1" + ) + csv_annotations = bundle.csv.get("metadata", {}).get("annotations", {}) expected_remote_workflow = ( "https://marketplace.redhat.com/en-us/operators/" - f"{bundle.csv_operator_name}/pricing?utm_source=openshift_console" + f"{annotation_package}/pricing?utm_source=openshift_console" ) expected_support_workflow = ( "https://marketplace.redhat.com/en-us/operators/" - f"{bundle.csv_operator_name}/support?utm_source=openshift_console" + f"{annotation_package}/support?utm_source=openshift_console" ) remote_workflow = csv_annotations.get("marketplace.openshift.io/remote-workflow")