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

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


The following commit(s) were added to refs/heads/main by this push:
     new c567a42  Attempt to render completed tasks using workflowstatus entries
c567a42 is described below

commit c567a42ba63728a2dfd832343cdc2317a64355eb
Author: Alastair McFarlane <[email protected]>
AuthorDate: Wed Jan 14 12:03:06 2026 +0000

    Attempt to render completed tasks using workflowstatus entries
---
 atr/get/finish.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/atr/get/finish.py b/atr/get/finish.py
index d945a47..7e90595 100644
--- a/atr/get/finish.py
+++ b/atr/get/finish.py
@@ -157,7 +157,6 @@ async def _get_page_data(
                 .order_by(sql.sqlmodel.desc(via(sql.Task.started)))
                 .all()
             )
-            if t.status in [sql.TaskStatus.QUEUED, sql.TaskStatus.ACTIVE, 
sql.TaskStatus.FAILED]
         ]
 
     if release.phase != sql.ReleasePhase.RELEASE_PREVIEW:
@@ -226,11 +225,14 @@ def _render_distribution_buttons(release: sql.Release) -> 
htm.Element:
 
 def _render_distribution_tasks(release: sql.Release, tasks: 
Sequence[sql.Task]) -> htm.Element:
     """Render current and failed distribution tasks."""
-    failed_tasks = [t for t in tasks if t.status == sql.TaskStatus.FAILED or 
t.workflow.status == "failed"]
+    failed_tasks = [
+        t for t in tasks if t.status == sql.TaskStatus.FAILED or (t.workflow 
and t.workflow.status == "failed")
+    ]
     in_progress_tasks = [
         t
         for t in tasks
-        if t.status in [sql.TaskStatus.QUEUED, sql.TaskStatus.ACTIVE] or 
t.workflow.status not in ["success", "failed"]
+        if t.status in [sql.TaskStatus.QUEUED, sql.TaskStatus.ACTIVE]
+        or (t.workflow and t.workflow.status not in ["success", "failed"])
     ]
 
     block = htm.Block()


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

Reply via email to