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 2025/02/28 17:16:41 UTC

(tooling-atr-experiments) branch main updated (14c5756 -> 3ccd863)

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

sbp pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-atr-experiments.git


 discard 14c5756  Move where certificates are made in the containers
     new 3ccd863  Move where certificates are made in the containers

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   (14c5756)
            \
             N -- N -- N   refs/heads/main (3ccd863)

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:
 Dockerfile.alpine | 3 ++-
 Dockerfile.ubuntu | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org


(tooling-atr-experiments) 01/01: Move where certificates are made in the containers

Posted by sb...@apache.org.
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-atr-experiments.git

commit 3ccd863b2585d1a1240240a87322d9735aeadfad
Author: Sean B. Palmer <se...@miscoranda.com>
AuthorDate: Fri Feb 28 19:10:42 2025 +0200

    Move where certificates are made in the containers
---
 Dockerfile.alpine |  5 +++--
 Dockerfile.ubuntu |  5 +++--
 atr/routes.py     | 14 +++++++-------
 3 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/Dockerfile.alpine b/Dockerfile.alpine
index 3be1aa0..b808115 100644
--- a/Dockerfile.alpine
+++ b/Dockerfile.alpine
@@ -44,11 +44,12 @@ RUN curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh |
 RUN sed -i "s%ATR-VERSION%${VERSION}%" atr/templates/includes/footer.html
 RUN rm -rf .venv-*
 RUN make sync PYTHON="$(which python3)"
-RUN make certs
 EXPOSE 8080
 
 RUN printf '#!/bin/sh\n\
-mkdir -p /opt/atr/state\n\
+cd /opt/atr\n\
+test -d /opt/atr/state || mkdir -p /opt/atr/state\n\
+make certs\n\
 cp /tmp/apache-rat/apache-rat-0.16.1.jar /opt/atr/state/\n\
 echo "Copied Apache RAT JAR to state directory:"\n\
 ls -la /opt/atr/state/apache-rat-0.16.1.jar\n\
diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu
index b7b2113..f122f07 100644
--- a/Dockerfile.ubuntu
+++ b/Dockerfile.ubuntu
@@ -42,11 +42,12 @@ COPY . /opt/atr
 RUN sed -i "s%ATR-VERSION%${VERSION}%" atr/templates/includes/footer.html
 RUN rm -rf .venv-*
 RUN make sync PYTHON="$(find /usr/bin -name python3.13 | head -n 1)"
-RUN make certs
 EXPOSE 8080
 
 RUN printf '#!/bin/sh\n\
-mkdir -p /opt/atr/state\n\
+cd /opt/atr\n\
+test -d /opt/atr/state || mkdir -p /opt/atr/state\n\
+make certs\n\
 cp /tmp/apache-rat/apache-rat-0.16.1.jar /opt/atr/state/\n\
 echo "Copied Apache RAT JAR to state directory:"\n\
 ls -la /opt/atr/state/apache-rat-0.16.1.jar\n\
diff --git a/atr/routes.py b/atr/routes.py
index 0de77ae..c8decfb 100644
--- a/atr/routes.py
+++ b/atr/routes.py
@@ -678,10 +678,10 @@ async def package_add_validate(
 async def package_data_get(db_session: AsyncSession, artifact_sha3: str, release_key: str, session_uid: str) -> Package:
     """Validate package deletion request and return the package if valid."""
     # Get the package and its associated release
-    if Package.release is None:
-        raise FlashError("Package has no associated release")
-    if Release.pmc is None:
-        raise FlashError("Release has no associated PMC")
+    # if Package.release is None:
+    #     raise FlashError("Package has no associated release")
+    # if Release.pmc is None:
+    #     raise FlashError("Release has no associated PMC")
 
     pkg_release = cast(InstrumentedAttribute[Release], Package.release)
     rel_pmc = cast(InstrumentedAttribute[PMC], Release.pmc)
@@ -794,8 +794,8 @@ async def release_add_post(session: ClientSession, request: Request) -> Response
 
 async def release_delete_validate(db_session: AsyncSession, release_key: str, session_uid: str) -> Release:
     """Validate release deletion request and return the release if valid."""
-    if Release.pmc is None:
-        raise FlashError("Release has no associated PMC")
+    # if Release.pmc is None:
+    #     raise FlashError("Release has no associated PMC")
 
     rel_pmc = cast(InstrumentedAttribute[PMC], Release.pmc)
     statement = select(Release).options(selectinload(rel_pmc)).where(Release.storage_key == release_key)
@@ -807,7 +807,7 @@ async def release_delete_validate(db_session: AsyncSession, release_key: str, se
 
     # Check permissions
     if release.pmc:
-        if session_uid not in release.pmc.pmc_members and session_uid not in release.pmc.committers:
+        if (session_uid not in release.pmc.pmc_members) and (session_uid not in release.pmc.committers):
             raise FlashError("You don't have permission to delete this release")
 
     return release


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org