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
The following commit(s) were added to refs/heads/main by this push:
new 14c5756 Move where certificates are made in the containers
14c5756 is described below
commit 14c5756b080d6bcedf6f6c3705d5e1316f536c31
Author: Sean B. Palmer <[email protected]>
AuthorDate: Fri Feb 28 19:10:42 2025 +0200
Move where certificates are made in the containers
---
Dockerfile.alpine | 2 +-
Dockerfile.ubuntu | 2 +-
atr/routes.py | 14 +++++++-------
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/Dockerfile.alpine b/Dockerfile.alpine
index 3be1aa0..54f81f7 100644
--- a/Dockerfile.alpine
+++ b/Dockerfile.alpine
@@ -44,10 +44,10 @@ 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\
+make certs\n\
mkdir -p /opt/atr/state\n\
cp /tmp/apache-rat/apache-rat-0.16.1.jar /opt/atr/state/\n\
echo "Copied Apache RAT JAR to state directory:"\n\
diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu
index b7b2113..2224025 100644
--- a/Dockerfile.ubuntu
+++ b/Dockerfile.ubuntu
@@ -42,10 +42,10 @@ 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\
+make certs\n\
mkdir -p /opt/atr/state\n\
cp /tmp/apache-rat/apache-rat-0.16.1.jar /opt/atr/state/\n\
echo "Copied Apache RAT JAR to state directory:"\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: [email protected]
For additional commands, e-mail: [email protected]