This is an automated email from the ASF dual-hosted git repository. wave pushed a commit to branch manual-vote-resolution-fixes in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
commit f9f6a1ccf870b143ebb94bd32120212e4c0f3b2f Author: Dave Fisher <[email protected]> AuthorDate: Sat Feb 28 14:02:38 2026 -0800 Fix manual vote resolution configuration --- atr/post/manual.py | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/atr/post/manual.py b/atr/post/manual.py index c3c34612..d75841b5 100644 --- a/atr/post/manual.py +++ b/atr/post/manual.py @@ -136,23 +136,30 @@ async def _committee_label(thread_id: str) -> str | None: return None -async def _committees_check(vote_thread_url: str, vote_result_url: str) -> None: - vote_thread_id = vote_thread_url.removeprefix("https://lists.apache.org/thread/") - result_thread_id = vote_result_url.removeprefix("https://lists.apache.org/thread/") +def _committee_thread(thread_url: str) -> str: + if thread_url.startswith("https://lists.apache.org/thread/"): + return thread_url.removeprefix("https://lists.apache.org/thread/") + elif thread_url.startswith("https:"): + raise RuntimeError("Invalid Thread") + return thread_url + +async def _committees_check(vote_thread_url: str, vote_result_url: str) -> None: + vote_thread_id = _committee_thread(vote_thread_url) try: vote_committee_label = await _committee_label(vote_thread_id) except util.FetchError as e: raise RuntimeError(f"Failed to fetch vote thread metadata from URL {e.url}: {e!s}") + if vote_committee_label is None: + raise RuntimeError("Vote committee not found") + + result_thread_id = _committee_thread(vote_result_url) try: result_committee_label = await _committee_label(result_thread_id) except util.FetchError as e: raise RuntimeError(f"Failed to fetch vote thread metadata from URL {e.url}: {e!s}") + if result_committee_label is None: + raise RuntimeError("Result committee not found") if vote_committee_label != result_committee_label: raise RuntimeError("Vote committee and result committee do not match") - - if vote_committee_label is None: - raise RuntimeError("Vote committee not found") - if result_committee_label is None: - raise RuntimeError("Result committee not found") --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
