Skip to content

Commit

Permalink
Use Fedora-41-based base image
Browse files Browse the repository at this point in the history
Signed-off-by: Nikola Forró <[email protected]>
  • Loading branch information
nforro committed Dec 9, 2024
1 parent 8bdf681 commit 86d4149
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 36 deletions.
4 changes: 4 additions & 0 deletions alembic.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ script_location = alembic
# template used to generate migration files
# file_template = %%(rev)s_%%(slug)s

# sys.path path, will be prepended to sys.path if present.
# defaults to the current working directory.
prepend_sys_path = .

# timezone to use when rendering the date
# within the migration file as well as the filename.
# string value is passed to dateutil.tz.gettz()
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ services:
GIT_SSH_COMMAND: "ssh -F /home/packit/.ssh/config"
#SQLALCHEMY_ECHO: 1
volumes:
- ../packit/packit:/usr/local/lib/python3.9/site-packages/packit:ro,z
- ./packit_service:/usr/local/lib/python3.9/site-packages/packit_service:ro,z
- ../packit/packit:/usr/local/lib/python3.13/site-packages/packit:ro,z
- ./packit_service:/usr/local/lib/python3.13/site-packages/packit_service:ro,z
- ./files/run_worker.sh:/usr/bin/run_worker.sh:ro,Z
- ./secrets/packit/dev/packit-service.yaml:/home/packit/.config/packit-service.yaml:ro,z
- ./secrets/packit/dev/copr:/home/packit/.config/copr:ro,z
Expand Down Expand Up @@ -243,7 +243,7 @@ services:
CELERY_RETRY_LIMIT: 0
PUSHGATEWAY_ADDRESS: ""
volumes:
- ./packit_service:/usr/local/lib/python3.9/site-packages/packit_service:ro,z
- ./packit_service:/usr/local/lib/python3.13/site-packages/packit_service:ro,z
- ./secrets/packit/dev/packit-service.yaml:/home/packit/.config/packit-service.yaml:ro,z
- ./secrets/packit/dev/copr:/home/packit/.config/copr:ro,z
- ./secrets/packit/dev/ssh_config:/packit-ssh/config:ro,z
Expand Down
2 changes: 1 addition & 1 deletion files/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Image for the web service (httpd), for celery worker see files/docker/Dockerfile.worker

FROM quay.io/packit/base:c9s
FROM quay.io/packit/base:fedora

ARG SOURCE_BRANCH
RUN if [[ -z $SOURCE_BRANCH ]]; then \
Expand Down
2 changes: 1 addition & 1 deletion files/docker/Dockerfile.tests
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# For running tests locally, see check_in_container target in Makefile

FROM quay.io/packit/base:c9s
FROM quay.io/packit/base:fedora

ARG SOURCE_BRANCH
RUN if [[ -z $SOURCE_BRANCH ]]; then \
Expand Down
2 changes: 1 addition & 1 deletion files/docker/Dockerfile.worker
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Celery worker which runs tasks (packit) from the web service

FROM quay.io/packit/base:c9s
FROM quay.io/packit/base:fedora

ARG SOURCE_BRANCH
RUN if [[ -z $SOURCE_BRANCH ]]; then \
Expand Down
19 changes: 5 additions & 14 deletions files/install-deps-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@
- name: Install all RPM/python packages needed to run packit-service worker
ansible.builtin.dnf:
name:
- python3-ipdb # for easy debugging
- nss_wrapper # openshift anyuid passwd madness
- python3-requests
- python3-prometheus_client
- python3-sqlalchemy
- python3-psycopg2
- python3-redis # celery[redis]
- python3-redis
- python3-celery
- python3-lazy-object-proxy
- python3-sentry-sdk
- python3-syslog-rfc5424-formatter # logging to Splunk
- dnf-utils
- make
# for pip-installing sandcastle from git repo
Expand All @@ -29,7 +31,6 @@
- python3-boto3 # AWS (S3)
- python3-fasjson-client
- python3-gevent # concurrency pool, see run_worker.sh
- python3-eventlet # concurrency pool, see run_worker.sh
- bodhi-client
# sandcastle deps
- python3-charset-normalizer
Expand All @@ -38,10 +39,6 @@
- python3-pyyaml
- python3-requests-oauthlib
- python3-websocket-client
# for full support of %autorelease and %autochangelog
- rpmautospec-rpm-macros
# for additional macros needed to parse certain spec files
- epel-rpm-macros
# for the `pkg_tool` switch to allow centpkg
- centpkg
state: present
Expand All @@ -50,13 +47,7 @@
ansible.builtin.pip:
name:
- git+https://github.com/packit/sandcastle.git@{{ source_branch }}
# The above bodhi-client RPM installs python3-requests-2.25.1 and python3-urllib3-1.26.5
# The below sentry_sdk would then install urllib3-2.x because of its urllib3>=1.26.11 requirement
# and 'pip check' would then scream that "requests 2.25.1 has requirement urllib3<1.27"
- urllib3<1.27
- sentry-sdk
- syslog-rfc5424-formatter # Logging to Splunk
- celery==5.3.* # RHBZ#2032543
- eventlet
- name: Check if all pip packages have all dependencies installed
command: pip check
- import_tasks: tasks/setup-copr-repos.yaml
Expand Down
21 changes: 6 additions & 15 deletions files/install-deps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
- name: Install all RPM/python packages needed to run packit-service
ansible.builtin.dnf:
name:
- python3-ipdb # for easy debugging
- python3-click
- git # setuptools-scm
- dnf-utils
# httpd & deps
- python3-mod_wsgi
- mod_http2
Expand All @@ -22,30 +22,21 @@
- python3-sqlalchemy
- python3-psycopg2
- python3-prometheus_client
- python3-redis # celery[redis]
- python3-redis
- python3-celery
- python3-lazy-object-proxy
- python3-flask-cors
- python3-flask-restx
- python3-flask-talisman
- python3-flexmock # alembic (d90948124e46_..._.py )
- python3-sentry-sdk+flask
- python3-syslog-rfc5424-formatter # logging to Splunk
- python-jwt
- bodhi-client
# This is to be able to provide service version via API
- python-setuptools_scm
state: present
install_weak_deps: False
- name: Install pip deps
ansible.builtin.pip:
name:
# The above bodhi-client RPM installs python3-requests-2.25.1 and python3-urllib3-1.26.5
# The below sentry_sdk would then install urllib3-2.x because of its urllib3>=1.26.11 requirement
# and 'pip check' would then scream that "requests 2.25.1 has requirement urllib3<1.27"
- urllib3<1.27
- sentry-sdk[flask]
- syslog-rfc5424-formatter
- celery==5.3.* # RHBZ#2032543
- flask-cors # RHBZ#2100076
- name: Check if all pip packages have all dependencies installed
ansible.builtin.command: pip check
- import_tasks: tasks/setup-copr-repos.yaml
- name: Install ogr, specfile and packit from copr
ansible.builtin.dnf:
Expand Down
3 changes: 2 additions & 1 deletion packit_service/service/api/usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
from logging import getLogger
from typing import Any

from flask import Response, escape, redirect, request
from flask import Response, redirect, request
from flask_restx import Namespace, Resource
from markupsafe import escape

from packit_service.celerizer import celery_app
from packit_service.constants import (
Expand Down

0 comments on commit 86d4149

Please sign in to comment.