Skip to content

Commit 398416a

Browse files
Use Fedora-41-based base image (#2673)
Use Fedora-41-based base image Fixes packit/deployment#613. Merge after packit/deployment#622. It seems to work locally. Note that I removed ipdb as it's no longer in Fedora, I've never used it personally, but it could be installed from PyPI I suppose. Reviewed-by: Laura Barcziová
2 parents 8bdf681 + 86d4149 commit 398416a

File tree

8 files changed

+23
-36
lines changed

8 files changed

+23
-36
lines changed

alembic.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ script_location = alembic
77
# template used to generate migration files
88
# file_template = %%(rev)s_%%(slug)s
99

10+
# sys.path path, will be prepended to sys.path if present.
11+
# defaults to the current working directory.
12+
prepend_sys_path = .
13+
1014
# timezone to use when rendering the date
1115
# within the migration file as well as the filename.
1216
# string value is passed to dateutil.tz.gettz()

docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ services:
9797
GIT_SSH_COMMAND: "ssh -F /home/packit/.ssh/config"
9898
#SQLALCHEMY_ECHO: 1
9999
volumes:
100-
- ../packit/packit:/usr/local/lib/python3.9/site-packages/packit:ro,z
101-
- ./packit_service:/usr/local/lib/python3.9/site-packages/packit_service:ro,z
100+
- ../packit/packit:/usr/local/lib/python3.13/site-packages/packit:ro,z
101+
- ./packit_service:/usr/local/lib/python3.13/site-packages/packit_service:ro,z
102102
- ./files/run_worker.sh:/usr/bin/run_worker.sh:ro,Z
103103
- ./secrets/packit/dev/packit-service.yaml:/home/packit/.config/packit-service.yaml:ro,z
104104
- ./secrets/packit/dev/copr:/home/packit/.config/copr:ro,z
@@ -243,7 +243,7 @@ services:
243243
CELERY_RETRY_LIMIT: 0
244244
PUSHGATEWAY_ADDRESS: ""
245245
volumes:
246-
- ./packit_service:/usr/local/lib/python3.9/site-packages/packit_service:ro,z
246+
- ./packit_service:/usr/local/lib/python3.13/site-packages/packit_service:ro,z
247247
- ./secrets/packit/dev/packit-service.yaml:/home/packit/.config/packit-service.yaml:ro,z
248248
- ./secrets/packit/dev/copr:/home/packit/.config/copr:ro,z
249249
- ./secrets/packit/dev/ssh_config:/packit-ssh/config:ro,z

files/docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Image for the web service (httpd), for celery worker see files/docker/Dockerfile.worker
22

3-
FROM quay.io/packit/base:c9s
3+
FROM quay.io/packit/base:fedora
44

55
ARG SOURCE_BRANCH
66
RUN if [[ -z $SOURCE_BRANCH ]]; then \

files/docker/Dockerfile.tests

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# For running tests locally, see check_in_container target in Makefile
22

3-
FROM quay.io/packit/base:c9s
3+
FROM quay.io/packit/base:fedora
44

55
ARG SOURCE_BRANCH
66
RUN if [[ -z $SOURCE_BRANCH ]]; then \

files/docker/Dockerfile.worker

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Celery worker which runs tasks (packit) from the web service
22

3-
FROM quay.io/packit/base:c9s
3+
FROM quay.io/packit/base:fedora
44

55
ARG SOURCE_BRANCH
66
RUN if [[ -z $SOURCE_BRANCH ]]; then \

files/install-deps-worker.yaml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,16 @@
1111
- name: Install all RPM/python packages needed to run packit-service worker
1212
ansible.builtin.dnf:
1313
name:
14-
- python3-ipdb # for easy debugging
1514
- nss_wrapper # openshift anyuid passwd madness
1615
- python3-requests
1716
- python3-prometheus_client
1817
- python3-sqlalchemy
1918
- python3-psycopg2
20-
- python3-redis # celery[redis]
19+
- python3-redis
20+
- python3-celery
2121
- python3-lazy-object-proxy
22+
- python3-sentry-sdk
23+
- python3-syslog-rfc5424-formatter # logging to Splunk
2224
- dnf-utils
2325
- make
2426
# for pip-installing sandcastle from git repo
@@ -29,7 +31,6 @@
2931
- python3-boto3 # AWS (S3)
3032
- python3-fasjson-client
3133
- python3-gevent # concurrency pool, see run_worker.sh
32-
- python3-eventlet # concurrency pool, see run_worker.sh
3334
- bodhi-client
3435
# sandcastle deps
3536
- python3-charset-normalizer
@@ -38,10 +39,6 @@
3839
- python3-pyyaml
3940
- python3-requests-oauthlib
4041
- python3-websocket-client
41-
# for full support of %autorelease and %autochangelog
42-
- rpmautospec-rpm-macros
43-
# for additional macros needed to parse certain spec files
44-
- epel-rpm-macros
4542
# for the `pkg_tool` switch to allow centpkg
4643
- centpkg
4744
state: present
@@ -50,13 +47,7 @@
5047
ansible.builtin.pip:
5148
name:
5249
- git+https://github.com/packit/sandcastle.git@{{ source_branch }}
53-
# The above bodhi-client RPM installs python3-requests-2.25.1 and python3-urllib3-1.26.5
54-
# The below sentry_sdk would then install urllib3-2.x because of its urllib3>=1.26.11 requirement
55-
# and 'pip check' would then scream that "requests 2.25.1 has requirement urllib3<1.27"
56-
- urllib3<1.27
57-
- sentry-sdk
58-
- syslog-rfc5424-formatter # Logging to Splunk
59-
- celery==5.3.* # RHBZ#2032543
50+
- eventlet
6051
- name: Check if all pip packages have all dependencies installed
6152
command: pip check
6253
- import_tasks: tasks/setup-copr-repos.yaml

files/install-deps.yaml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
- name: Install all RPM/python packages needed to run packit-service
1212
ansible.builtin.dnf:
1313
name:
14-
- python3-ipdb # for easy debugging
1514
- python3-click
1615
- git # setuptools-scm
16+
- dnf-utils
1717
# httpd & deps
1818
- python3-mod_wsgi
1919
- mod_http2
@@ -22,30 +22,21 @@
2222
- python3-sqlalchemy
2323
- python3-psycopg2
2424
- python3-prometheus_client
25-
- python3-redis # celery[redis]
25+
- python3-redis
26+
- python3-celery
2627
- python3-lazy-object-proxy
28+
- python3-flask-cors
2729
- python3-flask-restx
2830
- python3-flask-talisman
2931
- python3-flexmock # alembic (d90948124e46_..._.py )
32+
- python3-sentry-sdk+flask
33+
- python3-syslog-rfc5424-formatter # logging to Splunk
3034
- python-jwt
3135
- bodhi-client
3236
# This is to be able to provide service version via API
3337
- python-setuptools_scm
3438
state: present
3539
install_weak_deps: False
36-
- name: Install pip deps
37-
ansible.builtin.pip:
38-
name:
39-
# The above bodhi-client RPM installs python3-requests-2.25.1 and python3-urllib3-1.26.5
40-
# The below sentry_sdk would then install urllib3-2.x because of its urllib3>=1.26.11 requirement
41-
# and 'pip check' would then scream that "requests 2.25.1 has requirement urllib3<1.27"
42-
- urllib3<1.27
43-
- sentry-sdk[flask]
44-
- syslog-rfc5424-formatter
45-
- celery==5.3.* # RHBZ#2032543
46-
- flask-cors # RHBZ#2100076
47-
- name: Check if all pip packages have all dependencies installed
48-
ansible.builtin.command: pip check
4940
- import_tasks: tasks/setup-copr-repos.yaml
5041
- name: Install ogr, specfile and packit from copr
5142
ansible.builtin.dnf:

packit_service/service/api/usage.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
from logging import getLogger
88
from typing import Any
99

10-
from flask import Response, escape, redirect, request
10+
from flask import Response, redirect, request
1111
from flask_restx import Namespace, Resource
12+
from markupsafe import escape
1213

1314
from packit_service.celerizer import celery_app
1415
from packit_service.constants import (

0 commit comments

Comments
 (0)