From 77391288fe2e051314b6218e23487f2fbf2f92fa Mon Sep 17 00:00:00 2001 From: Tim Felgentreff Date: Thu, 11 Apr 2024 13:11:55 +0200 Subject: [PATCH] fix spurious validation error for MavenProject --- src/mx/_impl/mavenproject.py | 9 +++++++-- src/mx/_impl/mx.py | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/mx/_impl/mavenproject.py b/src/mx/_impl/mavenproject.py index 5a868c6f..432570c5 100644 --- a/src/mx/_impl/mavenproject.py +++ b/src/mx/_impl/mavenproject.py @@ -274,7 +274,12 @@ def get_section(element: ET.Element, path: str, errorstr=None): return result match_not_empty(parsed_pom, "url", self.suite.url, "include suite url") - match_not_empty(parsed_pom, "description", getattr(self.suite, "description", ""), "suite description") + match_not_empty( + parsed_pom, + "description", + getattr(self, "description", getattr(self.suite, "description", "")), + "suite description", + ) if devs := get_section(parsed_pom, "developers"): if dev := get_section(devs, "developer"): for attr in ["name", "email", "organization"]: @@ -285,7 +290,7 @@ def get_section(element: ET.Element, path: str, errorstr=None): if not licenses: cb(f"Generated POM for {self} does not include licenses") expected_licenses: List[mx.License] = cast(List[mx.License], list(self.theLicense)) - if len(licenses) != expected_licenses: + if len(licenses) != len(expected_licenses): cb(f"Generated POM for {self} has different licenses than suite") for pl in licenses: for l in expected_licenses: diff --git a/src/mx/_impl/mx.py b/src/mx/_impl/mx.py index 5c24f689..70bcb39a 100755 --- a/src/mx/_impl/mx.py +++ b/src/mx/_impl/mx.py @@ -18147,7 +18147,7 @@ def alarm_handler(signum, frame): _CACHE_DIR = get_env('MX_CACHE_DIR', join(dot_mx_dir(), 'cache')) # The version must be updated for every PR (checked in CI) and the comment should reflect the PR's issue -version = VersionSpec("7.22.2") # [GR-51382] Replace maxrss in favor of rsspercentiles as the default tracker +version = VersionSpec("7.22.3") # [GR-53394] Fix spurious validation error for MavenProject. _mx_start_datetime = datetime.utcnow()