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 8c12168  Migrate the route to update committee KEYS files to the 
storage interface
8c12168 is described below

commit 8c1216809110db6720ad66fe85f137434ddec7d8
Author: Sean B. Palmer <[email protected]>
AuthorDate: Tue Jul 22 17:22:46 2025 +0100

    Migrate the route to update committee KEYS files to the storage interface
---
 atr/routes/keys.py | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/atr/routes/keys.py b/atr/routes/keys.py
index 5b92999..1e19c4e 100644
--- a/atr/routes/keys.py
+++ b/atr/routes/keys.py
@@ -498,16 +498,15 @@ async def update_committee_keys(session: 
routes.CommitterSession, committee_name
     if committee_name not in (session.committees + session.projects):
         quart.abort(403, description=f"You are not authorised to update the 
KEYS file for {committee_name}")
 
-    async with db.session() as data:
-        committee = await data.committee(name=committee_name).demand(
-            base.ASFQuartException(f"Committee {committee_name} not found", 
errorcode=404)
-        )
-        error_msg = await autogenerate_keys_file(committee_name, 
committee.is_podling, caller_data=data)
-
-    if error_msg:
-        await quart.flash(error_msg, "error")
-    else:
-        await quart.flash(f'Successfully regenerated the KEYS file for the 
"{committee_name}" committee.', "success")
+    async with storage.write(session.uid) as write:
+        wacm = write.as_committee_member(committee_name).result_or_raise()
+        match await wacm.keys.autogenerate_keys_file():
+            case types.OutcomeResult():
+                await quart.flash(
+                    f'Successfully regenerated the KEYS file for the 
"{committee_name}" committee.', "success"
+                )
+            case types.OutcomeException():
+                await quart.flash(f"Error regenerating the KEYS file for the 
{committee_name} committee.", "error")
 
     return await session.redirect(keys)
 


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

Reply via email to