Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package kubescape for openSUSE:Factory checked in at 2026-02-13 12:47:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kubescape (Old) and /work/SRC/openSUSE:Factory/.kubescape.new.1977 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kubescape" Fri Feb 13 12:47:15 2026 rev:36 rq:1332800 version:4.0.1 Changes: -------- --- /work/SRC/openSUSE:Factory/kubescape/kubescape.changes 2026-02-05 18:02:15.220272146 +0100 +++ /work/SRC/openSUSE:Factory/.kubescape.new.1977/kubescape.changes 2026-02-13 12:47:30.556222906 +0100 @@ -1,0 +2,8 @@ +Fri Feb 13 06:17:40 UTC 2026 - Johannes Kastl <[email protected]> + +- Update to version 4.0.1: + * Enhance version testing in smoke tests to extract and validate + output version + * fix isRuleKubescapeVersionCompatible bug with version 4.0.0 + +------------------------------------------------------------------- Old: ---- kubescape-4.0.0.obscpio New: ---- kubescape-4.0.1.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kubescape.spec ++++++ --- /var/tmp/diff_new_pack.vSPW4o/_old 2026-02-13 12:47:37.320506203 +0100 +++ /var/tmp/diff_new_pack.vSPW4o/_new 2026-02-13 12:47:37.324506371 +0100 @@ -17,7 +17,7 @@ Name: kubescape -Version: 4.0.0 +Version: 4.0.1 Release: 0 Summary: Tool providing a multi-cloud K8s single pane of glass License: Apache-2.0 ++++++ _service ++++++ --- /var/tmp/diff_new_pack.vSPW4o/_old 2026-02-13 12:47:37.356507711 +0100 +++ /var/tmp/diff_new_pack.vSPW4o/_new 2026-02-13 12:47:37.360507878 +0100 @@ -3,7 +3,7 @@ <param name="url">https://github.com/armosec/kubescape</param> <param name="scm">git</param> <param name="exclude">.git</param> - <param name="revision">v4.0.0</param> + <param name="revision">v4.0.1</param> <param name="versionformat">@PARENT_TAG@</param> <param name="versionrewrite-pattern">v(.*)</param> <param name="changesgenerate">enable</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.vSPW4o/_old 2026-02-13 12:47:37.384508884 +0100 +++ /var/tmp/diff_new_pack.vSPW4o/_new 2026-02-13 12:47:37.388509051 +0100 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/armosec/kubescape</param> - <param name="changesrevision">cfe022ff1d3488415405711513ee993684696ad9</param></service></servicedata> + <param name="changesrevision">b167435c4d42054bc79cc6b85def95f86140b861</param></service></servicedata> (No newline at EOF) ++++++ kubescape-4.0.0.obscpio -> kubescape-4.0.1.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kubescape-4.0.0/build/goreleaser-post-e2e.sh new/kubescape-4.0.1/build/goreleaser-post-e2e.sh --- old/kubescape-4.0.0/build/goreleaser-post-e2e.sh 2026-02-04 18:16:34.000000000 +0100 +++ new/kubescape-4.0.1/build/goreleaser-post-e2e.sh 2026-02-12 16:14:45.000000000 +0100 @@ -128,7 +128,7 @@ log "Running smoke tests with $PYTHON $SMOKE_RUNNER \"$ART_PATH\"" # Run the test runner, propagate exit code set +e -"$PYTHON" "$SMOKE_RUNNER" "$ART_PATH" +RELEASE="${RELEASE:-}" "$PYTHON" "$SMOKE_RUNNER" "$ART_PATH" rc=$? set -e diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kubescape-4.0.0/core/cautils/datastructuresmethods.go new/kubescape-4.0.1/core/cautils/datastructuresmethods.go --- old/kubescape-4.0.0/core/cautils/datastructuresmethods.go 2026-02-04 18:16:34.000000000 +0100 +++ new/kubescape-4.0.1/core/cautils/datastructuresmethods.go 2026-02-12 16:14:45.000000000 +0100 @@ -76,14 +76,18 @@ // In local build (BuildNumber = ""): // returns true only if rule doesn't have the "until" attribute func isRuleKubescapeVersionCompatible(attributes map[string]interface{}, version string) bool { + normalizedVersion := version + if version != "" && !semver.IsValid(version) { + normalizedVersion = "v" + version + } + if from, ok := attributes["useFromKubescapeVersion"]; ok && from != nil { switch sfrom := from.(type) { case string: - if version != "" && semver.Compare(version, sfrom) == -1 { + if normalizedVersion != "" && semver.IsValid(normalizedVersion) && semver.Compare(normalizedVersion, sfrom) == -1 { return false } default: - // Handle case where useFromKubescapeVersion is not a string return false } } @@ -91,11 +95,10 @@ if until, ok := attributes["useUntilKubescapeVersion"]; ok && until != nil { switch suntil := until.(type) { case string: - if version == "" || semver.Compare(version, suntil) >= 0 { + if normalizedVersion == "" || (semver.IsValid(normalizedVersion) && semver.Compare(normalizedVersion, suntil) >= 0) { return false } default: - // Handle case where useUntilKubescapeVersion is not a string return false } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kubescape-4.0.0/smoke_testing/test_version.py new/kubescape-4.0.1/smoke_testing/test_version.py --- old/kubescape-4.0.0/smoke_testing/test_version.py 2026-02-04 18:16:34.000000000 +0100 +++ new/kubescape-4.0.1/smoke_testing/test_version.py 2026-02-12 16:14:45.000000000 +0100 @@ -1,7 +1,9 @@ import os -import smoke_utils +import re import sys +import smoke_utils + def run(kubescape_exec: str): print("Testing version") @@ -10,7 +12,22 @@ msg = smoke_utils.run_command(command=[kubescape_exec, "version"]) if isinstance(msg, bytes): msg = msg.decode('utf-8') - assert (ver and ver in msg) or (ver and ver.lstrip('v') in msg), f"expected version: {ver}, found: {msg}" + + # Extract version from output + version_match = re.search(r'Your current version is: ([^\s\n]+)', msg) + if version_match: + output_version = version_match.group(1) + print(f"Found version in output: {output_version}") + + # If RELEASE is set, verify it matches the output + if ver: + # Check if RELEASE (with or without 'v' prefix) is in the output + assert (ver in msg) or (ver.lstrip('v') in msg), f"expected version: {ver}, found: {output_version}" + else: + # If RELEASE is not set, just verify that a version was found + assert output_version, f"no version found in output: {msg}" + else: + raise AssertionError(f"no version found in output: {msg}") print("Done testing version") ++++++ kubescape.obsinfo ++++++ --- /var/tmp/diff_new_pack.vSPW4o/_old 2026-02-13 12:47:38.808568525 +0100 +++ /var/tmp/diff_new_pack.vSPW4o/_new 2026-02-13 12:47:38.820569027 +0100 @@ -1,5 +1,5 @@ name: kubescape -version: 4.0.0 -mtime: 1770225394 -commit: cfe022ff1d3488415405711513ee993684696ad9 +version: 4.0.1 +mtime: 1770909285 +commit: b167435c4d42054bc79cc6b85def95f86140b861 ++++++ vendor.tar.gz ++++++ /work/SRC/openSUSE:Factory/kubescape/vendor.tar.gz /work/SRC/openSUSE:Factory/.kubescape.new.1977/vendor.tar.gz differ: char 128, line 1
