You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tooling.apache.org by sb...@apache.org on 2026/04/14 16:41:35 UTC
(tooling-trusted-releases) branch sbp updated (26f62cd4 -> beb7e67f)
This is an automated email from the ASF dual-hosted git repository.
sbp pushed a change to branch sbp
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
discard 26f62cd4 Add an incubation disclaimer to announcement messages as appropriate
discard 5da1f4a9 Fix errors in the UI related to second round votes for podlings
discard bbe2e57d Remove UI access checks for POST routes
discard 18de0cd0 Do not allow first round podling votes to be sent to private lists
add 13f15490 #776 - max length 100k for email bodies
new beb7e67f Do not allow first round podling votes to be sent to private lists
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (26f62cd4)
\
N -- N -- N refs/heads/sbp (beb7e67f)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
atr/blueprints/post.py | 9 ++++----
atr/construct.py | 20 -----------------
atr/get/vote.py | 59 ++++++++++----------------------------------------
atr/models/sql.py | 2 +-
atr/shared/announce.py | 2 +-
atr/shared/resolve.py | 4 ++--
atr/shared/voting.py | 2 +-
7 files changed, 21 insertions(+), 77 deletions(-)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org
(tooling-trusted-releases) 01/01: Do not allow first round podling votes to be sent to private lists
Posted by sb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch sbp
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
commit beb7e67f33ed61ee92332d64e3bfa76ad2e0a4d2
Author: Sean B. Palmer <se...@miscoranda.com>
AuthorDate: Tue Apr 14 16:25:57 2026 +0100
Do not allow first round podling votes to be sent to private lists
---
atr/api/__init__.py | 10 +++++++++-
atr/get/voting.py | 6 +++++-
atr/post/voting.py | 6 +++++-
atr/storage/writers/vote.py | 10 ++++++++--
atr/tasks/vote.py | 6 +++++-
atr/util.py | 7 +++++++
6 files changed, 39 insertions(+), 6 deletions(-)
diff --git a/atr/api/__init__.py b/atr/api/__init__.py
index fcee20f2..c83b445f 100644
--- a/atr/api/__init__.py
+++ b/atr/api/__init__.py
@@ -1606,7 +1606,15 @@ async def vote_start(
try:
async with storage.write(asf_uid) as write:
wacp = await write.as_project_committee_participant(data.project)
- permitted_recipients = util.permitted_voting_recipients(asf_uid, wacp.committee_key)
+ async with db.session() as read_data:
+ committee = await read_data.committee(key=wacp.committee_key).demand(
+ storage.AccessError(f"Committee not found: {wacp.committee_key}")
+ )
+ permitted_recipients = util.permitted_podling_first_round_recipients(
+ asf_uid,
+ wacp.committee_key,
+ is_podling=committee.is_podling,
+ )
if data.email_to not in permitted_recipients:
raise exceptions.Forbidden("Invalid mailing list choice")
diff --git a/atr/get/voting.py b/atr/get/voting.py
index 8d3f7abb..81f507e4 100644
--- a/atr/get/voting.py
+++ b/atr/get/voting.py
@@ -68,7 +68,11 @@ async def selected_revision(
case (release, committee):
pass
- permitted_recipients = util.permitted_voting_recipients(session.uid, committee.key)
+ permitted_recipients = util.permitted_podling_first_round_recipients(
+ session.uid,
+ committee.key,
+ is_podling=committee.is_podling,
+ )
second_round_recipients = (
util.permitted_podling_second_round_recipients(session.uid) if committee.is_podling else []
)
diff --git a/atr/post/voting.py b/atr/post/voting.py
index 0ef950a3..edd04ca0 100644
--- a/atr/post/voting.py
+++ b/atr/post/voting.py
@@ -94,7 +94,11 @@ async def selected_revision(
case (release, committee):
pass
- permitted_recipients = util.permitted_voting_recipients(session.uid, committee.key)
+ permitted_recipients = util.permitted_podling_first_round_recipients(
+ session.uid,
+ committee.key,
+ is_podling=committee.is_podling,
+ )
all_addrs = [start_voting_form.email_to, *start_voting_form.email_cc, *start_voting_form.email_bcc]
for addr in all_addrs:
if addr not in permitted_recipients:
diff --git a/atr/storage/writers/vote.py b/atr/storage/writers/vote.py
index 349eec37..c72aa02a 100644
--- a/atr/storage/writers/vote.py
+++ b/atr/storage/writers/vote.py
@@ -141,7 +141,7 @@ class CommitteeParticipant(FoundationCommitter):
return [email_to], ""
- async def start(
+ async def start( # noqa: C901
self,
email_to: str,
project_key: safe.ProjectKey,
@@ -166,8 +166,14 @@ class CommitteeParticipant(FoundationCommitter):
_project=True,
_committee=True,
).demand(storage.AccessError("Release not found"))
+ if release.committee is None:
+ raise storage.AccessError("Release has no committee")
if permitted_recipients is None:
- permitted_recipients = util.permitted_voting_recipients(asf_uid, self.__committee_key)
+ permitted_recipients = util.permitted_podling_first_round_recipients(
+ asf_uid,
+ release.committee.key,
+ is_podling=release.committee.is_podling,
+ )
all_addrs = [email_to] + (email_cc or []) + (email_bcc or [])
for addr in all_addrs:
if addr not in permitted_recipients:
diff --git a/atr/tasks/vote.py b/atr/tasks/vote.py
index 916b80a9..697cfa13 100644
--- a/atr/tasks/vote.py
+++ b/atr/tasks/vote.py
@@ -105,7 +105,11 @@ async def _initiate_core_logic(task_args: args.Initiate) -> results.Results | No
# A second round vote may be started by a different user, so the permitted recipients will be different
# Since we only have to validate before task boundaries, we can skip this for second rounds
if not is_podling_round_two:
- permitted_recipients = util.permitted_voting_recipients(task_args.initiator_id, release.committee.key)
+ permitted_recipients = util.permitted_podling_first_round_recipients(
+ task_args.initiator_id,
+ release.committee.key,
+ is_podling=release.committee.is_podling,
+ )
for addr in all_addrs:
if addr not in permitted_recipients:
log.error(f"Invalid mailing list choice: {addr} not in {permitted_recipients}")
diff --git a/atr/util.py b/atr/util.py
index df2e3d2e..4ba94be7 100644
--- a/atr/util.py
+++ b/atr/util.py
@@ -803,6 +803,13 @@ def permitted_archive_roots(basename_from_filename: str) -> list[str]:
return [basename_from_filename]
+def permitted_podling_first_round_recipients(asf_uid: str, committee_key: str, *, is_podling: bool) -> list[str]:
+ recipients = permitted_voting_recipients(asf_uid, committee_key)
+ if not is_podling:
+ return recipients
+ return [recipient for recipient in recipients if (recipient != f"private@{committee_key}.apache.org")]
+
+
def permitted_podling_second_round_recipients(asf_uid: str) -> list[str]:
recipients = [INCUBATOR_GENERAL_ADDRESS]
if config.get().ATR_STATUS == "ALPHA":
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org