This is an automated email from the ASF dual-hosted git repository.

sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git


The following commit(s) were added to refs/heads/main by this push:
     new 9610808  Avoid promoting a release when its vote is being restarted
9610808 is described below

commit 961080814c9c92a07d145f6e2e5df300aef9aaad
Author: Sean B. Palmer <[email protected]>
AuthorDate: Mon Jun 30 18:41:34 2025 +0100

    Avoid promoting a release when its vote is being restarted
---
 atr/routes/resolve.py |  1 +
 atr/routes/vote.py    |  2 +-
 atr/routes/voting.py  | 11 +++++++----
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/atr/routes/resolve.py b/atr/routes/resolve.py
index 245f11b..8ada8b7 100644
--- a/atr/routes/resolve.py
+++ b/atr/routes/resolve.py
@@ -166,6 +166,7 @@ async def _resolve_vote(
                     body_data=await 
construct.start_vote_default(release.project.name),
                     data=data,
                     release=release,
+                    promote=False,
                 )
                 success_message = "Project PPMC vote marked as passed, and 
Incubator PMC vote automatically started"
             elif vote_result == "passed":
diff --git a/atr/routes/vote.py b/atr/routes/vote.py
index 5d452da..b2f8649 100644
--- a/atr/routes/vote.py
+++ b/atr/routes/vote.py
@@ -38,7 +38,7 @@ import atr.template as template
 import atr.util as util
 
 # "CAH5JyZo8QnWmg9CwRSwWY=givhxw4nilyenjo71fkdk81j5...@mail.gmail.com"
-TEST_MID: Final[str | None] = None
+TEST_MID: Final[str | None] = 
"CAH5JyZo8QnWmg9CwRSwWY=givhxw4nilyenjo71fkdk81j5...@mail.gmail.com"
 _THREAD_URLS_FOR_DEVELOPMENT: Final[dict[str, str]] = {
     "CAH5JyZo8QnWmg9CwRSwWY=givhxw4nilyenjo71fkdk81j5...@mail.gmail.com": 
"https://lists.apache.org/thread/z0o7xnjnyw2o886rxvvq2ql4rdfn754w";,
     "[email protected]": 
"https://lists.apache.org/thread/619hn4x796mh3hkk3kxg1xnl48dy2s64";,
diff --git a/atr/routes/voting.py b/atr/routes/voting.py
index fcc48a6..6c0d007 100644
--- a/atr/routes/voting.py
+++ b/atr/routes/voting.py
@@ -137,6 +137,7 @@ async def selected_revision(
                 body_data,
                 data,
                 release,
+                promote=True,
             )
 
         keys_warning = await _keys_warning(release)
@@ -229,6 +230,7 @@ async def start_vote(
     body_data: str,
     data: db.Session,
     release: models.Release,
+    promote: bool = True,
 ):
     if committee is None:
         raise base.ASFQuartException("Release has no associated committee", 
errorcode=400)
@@ -248,10 +250,11 @@ async def start_vote(
             error="All checks must be completed before starting a vote.",
         )
 
-    # This sets the phase to RELEASE_CANDIDATE
-    error = await _promote(data, release.name, selected_revision_number)
-    if error:
-        return await session.redirect(root.index, error=error)
+    if promote is True:
+        # This sets the phase to RELEASE_CANDIDATE
+        error = await _promote(data, release.name, selected_revision_number)
+        if error:
+            return await session.redirect(root.index, error=error)
 
     # Store when the release was put into the voting phase
     release.vote_started = datetime.datetime.now(datetime.UTC)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to