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


The following commit(s) were added to refs/heads/sbp by this push:
     new 88b3d6c4 Show quarantine status in the user interface
88b3d6c4 is described below

commit 88b3d6c47d9d2814d07b93b941e25c70c6c73e13
Author: Sean B. Palmer <[email protected]>
AuthorDate: Wed Mar 4 14:35:35 2026 +0000

    Show quarantine status in the user interface
---
 atr/shared/web.py                 |  8 ++++++++
 atr/templates/check-selected.html | 26 ++++++++++++++++++++++++++
 tests/e2e/sbom/conftest.py        |  7 +++++--
 3 files changed, 39 insertions(+), 2 deletions(-)

diff --git a/atr/shared/web.py b/atr/shared/web.py
index eb8340c7..2ac53e23 100644
--- a/atr/shared/web.py
+++ b/atr/shared/web.py
@@ -72,6 +72,12 @@ async def check(
         async with db.session() as data:
             user_ssh_keys = await data.ssh_key(asf_uid=session.uid).all()
 
+    async with db.session() as data:
+        quarantined_pending = await data.quarantined(
+            release_name=release.name, status=sql.QuarantineStatus.PENDING
+        ).all()
+        quarantined_failed = await data.quarantined(release_name=release.name, 
status=sql.QuarantineStatus.FAILED).all()
+
     # Get the number of ongoing tasks for the current revision
     ongoing_tasks_count = 0
     match await interaction.latest_info(release.project.name, release.version):
@@ -153,6 +159,8 @@ async def check(
         revision_time=revision_timestamp,
         revision_number=revision_number,
         ongoing_tasks_count=ongoing_tasks_count,
+        quarantined_pending=quarantined_pending,
+        quarantined_failed=quarantined_failed,
         delete_form=delete_form,
         delete_file_forms=delete_file_forms,
         asf_id=asf_id,
diff --git a/atr/templates/check-selected.html 
b/atr/templates/check-selected.html
index c41e91fe..24f91147 100644
--- a/atr/templates/check-selected.html
+++ b/atr/templates/check-selected.html
@@ -81,6 +81,32 @@
 
   {% include "check-selected-release-info.html" %}
 
+  {% if quarantined_pending %}
+    <div class="alert alert-info" role="alert">
+      <i class="bi bi-hourglass-split me-2"></i>
+      Archive validation is in progress. Uploaded archives are being checked 
for safety before they become available.
+    </div>
+  {% endif %}
+
+  {% for quarantined in quarantined_failed %}
+    <div class="alert alert-danger" role="alert">
+      <i class="bi bi-exclamation-octagon me-2"></i>
+      <strong>Archive validation failed.</strong>
+      {% if quarantined.file_metadata %}
+        The following issues were found:
+        <ul class="mb-0 mt-2">
+          {% for entry in quarantined.file_metadata %}
+            {% if entry.errors %}
+              {% for error in entry.errors %}
+                <li><code>{{ entry.rel_path }}</code>: {{ error }}</li>
+              {% endfor %}
+            {% endif %}
+          {% endfor %}
+        </ul>
+      {% endif %}
+    </div>
+  {% endfor %}
+
   <div id="ongoing-tasks-banner"
        class="alert alert-warning{% if ongoing_tasks_count == 0 %} d-none{% 
endif %}"
        role="alert"
diff --git a/tests/e2e/sbom/conftest.py b/tests/e2e/sbom/conftest.py
index bd59b1de..0eca4993 100644
--- a/tests/e2e/sbom/conftest.py
+++ b/tests/e2e/sbom/conftest.py
@@ -48,6 +48,9 @@ def page_release_with_file(page: Page) -> Generator[Page]:
     )
     page.get_by_role("button", name="Add files").click()
     
page.wait_for_url(f"**/compose/{sbom_helpers.PROJECT_NAME}/{sbom_helpers.VERSION_NAME}")
-    helpers.visit(page, 
f"/compose/{sbom_helpers.PROJECT_NAME}/{sbom_helpers.VERSION_NAME}")
-    page.wait_for_selector("#ongoing-tasks-banner", state="hidden")
+    helpers.wait_for_upload_and_tasks(
+        page,
+        f"/compose/{sbom_helpers.PROJECT_NAME}/{sbom_helpers.VERSION_NAME}",
+        sbom_helpers.FILE_NAME,
+    )
     yield page


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

Reply via email to