sts-sponsors team mailing list archive
-
sts-sponsors team
-
Mailing list archive
-
Message #05965
[Merge] ~alexsander-souza/maas/+git/maas-release-tools:maintenance_versions_fixes into ~maas-committers/maas/+git/maas-release-tools:main
Alexsander de Souza has proposed merging ~alexsander-souza/maas/+git/maas-release-tools:maintenance_versions_fixes into ~maas-committers/maas/+git/maas-release-tools:main.
Requested reviews:
MAAS Committers (maas-committers)
For more details, see:
https://code.launchpad.net/~alexsander-souza/maas/+git/maas-release-tools/+merge/438934
--
Your team MAAS Committers is requested to review the proposed merge of ~alexsander-souza/maas/+git/maas-release-tools:maintenance_versions_fixes into ~maas-committers/maas/+git/maas-release-tools:main.
diff --git a/maas_release_tools/launchpad.py b/maas_release_tools/launchpad.py
index cea786e..c99938a 100644
--- a/maas_release_tools/launchpad.py
+++ b/maas_release_tools/launchpad.py
@@ -182,7 +182,9 @@ class LaunchpadActions:
milestone = self.get_milestone(name)
was_active = milestone.is_active
if not was_active:
- self.logger.info(f"marking milestone {name} as temporarily active")
+ self.logger.warning(
+ f"marking milestone {name} as temporarily active"
+ )
if not self.dry_run:
milestone.is_active = True
if not was_active:
diff --git a/maas_release_tools/maasci.py b/maas_release_tools/maasci.py
index 980f6b4..c145342 100644
--- a/maas_release_tools/maasci.py
+++ b/maas_release_tools/maasci.py
@@ -13,6 +13,7 @@ JJB_SECTION = "maas-integration-ci"
JJB_REV_RE = re.compile(r"^.+-g\.(?P<gitrev>[0-9a-z]{9})(-.*)?$")
JJB_FAILURE = "FAILURE"
+JJB_SKIP = "SKIPPED"
class JenkinsConnectionFailed(Exception):
@@ -56,6 +57,8 @@ class JenkinsActions:
def get_last_build_result_for_rev(
self, job_name: str, rev: str
) -> Tuple[str, str]:
+ if self.dry_run:
+ return JJB_SKIP, "(skipped)"
try:
job = self._jenkins.get_job_info(job_name)
for build in job["builds"]:
diff --git a/maas_release_tools/scripts/release_status.py b/maas_release_tools/scripts/release_status.py
index 0edf5fc..2475ca6 100644
--- a/maas_release_tools/scripts/release_status.py
+++ b/maas_release_tools/scripts/release_status.py
@@ -42,6 +42,7 @@ from ..maasci import (
JJB_CONFIG,
JJB_FAILURE,
JJB_SECTION,
+ JJB_SKIP,
)
from ..makefile import Makefile
from ..version import get_branch_setup_version, ReleaseVersion
@@ -106,11 +107,13 @@ class ReleasePreparer:
launchpad: LaunchpadActions,
jenkins: JenkinsActions,
keep_going: bool,
+ has_qa_approval: bool,
):
self.launchpad = launchpad
self.jenkins = jenkins
self.version = version
self.keep_going = keep_going
+ self.has_qa_approval = has_qa_approval
self.snapstore_auth = snapstore_auth
@property
@@ -673,6 +676,8 @@ class PackagesCopiedToReleasePPA(MAASPPA, PPACopyMixin):
)
def check(self) -> tuple[bool, str | None]:
+ if self.ppa_type == "stable" and not self.preparer.has_qa_approval:
+ return (False, "Missing Solutions QA approval")
if (
self.ppa_type == "candidate"
and not self.preparer.version.new_series
@@ -703,6 +708,11 @@ class PackagesCopiedToReleasePPA(MAASPPA, PPACopyMixin):
)
def fix(self, doit: bool = False) -> tuple[bool, list[str]]:
+ if self.ppa_type == "stable" and not self.preparer.has_qa_approval:
+ return False, [
+ "Send an email to <solutions-qa@xxxxxxxxxxxxxxxxxxx> request the test of this version",
+ "After their approval, run this tool with `--sol-qa-approval`",
+ ]
if self.source_ppa is None:
return False, self.how_to_create_ppa(
self.source.ppa_owner, self.source.name
@@ -941,12 +951,26 @@ class SnapsInChannel(SnapsUploaded):
set(BUILD_ARCHS).difference(released_archs)
)
if self.missing_archs:
- return False, (
- f"Missing releases for: {', '.join(self.missing_archs)}"
- )
+ if (
+ self.channel.endswith("/stable")
+ and not self.preparer.has_qa_approval
+ ):
+ return (False, "Missing Solutions QA approval")
+ else:
+ return False, (
+ f"Missing releases for: {', '.join(self.missing_archs)}"
+ )
return True, None
def fix(self, doit=False):
+ if (
+ self.channel.endswith("/stable")
+ and not self.preparer.has_qa_approval
+ ):
+ return False, [
+ "Send an email to <solutions-qa@xxxxxxxxxxxxxxxxxxx> request the test of this version",
+ "After their approval, run this tool with `--sol-qa-approval`",
+ ]
steps = []
revision_map, _ = self._get_revisions()
@@ -1092,6 +1116,12 @@ class BugMovedToMilestone(ReleaseStep):
def title(self):
return "Bugs moved to Milestone on Launchpad"
+ def skip(self) -> bool:
+ return (
+ self.preparer.version.final_version
+ == self.preparer.version.version
+ )
+
def check(self) -> tuple[bool, str | None]:
tag_name = self.preparer.version.final_version
try:
@@ -1179,8 +1209,10 @@ class SystemIntegrationTests(ReleaseStep):
if result == JJB_FAILURE:
return (
False,
- "Last build has failed (this is not a fatal error)",
+ "Last build has failed",
)
+ elif result == JJB_SKIP:
+ return (True, "System Integration checking disabled by user")
except JenkinsConnectionFailed:
return (
False,
@@ -1190,8 +1222,7 @@ class SystemIntegrationTests(ReleaseStep):
return True, None
def fix(self, doit: bool = False) -> tuple[bool, list[str]]:
- # Not fatal
- return True, [f"check {self._url}"]
+ return False, [f"check {self._url}"]
class UsnBuilderUpdated(ReleaseStep):
@@ -1318,12 +1349,24 @@ def parse_args():
help="Don't execute actions",
)
parser.add_argument(
+ "--sol-qa-approval",
+ action="store_true",
+ dest="sol_qa_approval",
+ help="SolQA has given the thumbs up",
+ )
+ parser.add_argument(
"--launchpad-credentials",
default=None,
type=FileType(),
help="Launchpad credentials file",
)
parser.add_argument(
+ "--jenkins-skip",
+ action="store_true",
+ dest="jenkins_skip",
+ help="Skip System Integration Tests checks",
+ )
+ parser.add_argument(
"--jenkins-config",
default=JJB_CONFIG,
type=FileType(),
@@ -1357,7 +1400,7 @@ def main():
dry_run=args.dry_run,
)
jenkins = JenkinsActions(
- dry_run=args.dry_run,
+ dry_run=args.jenkins_skip,
jenkins_config=args.jenkins_config,
server_section=args.jenkins_section,
)
@@ -1368,6 +1411,7 @@ def main():
launchpad=launchpad,
jenkins=jenkins,
keep_going=args.keep_going,
+ has_qa_approval=args.sol_qa_approval,
)
preparer.steps = [
MAASVersion(preparer),
Follow ups