From e7dc18a21bb4091e6308635ccd1fcd71a5ba6cdb Mon Sep 17 00:00:00 2001 From: David Schultz Date: Wed, 17 Jan 2024 21:26:07 -0600 Subject: [PATCH 1/2] use updated syntax with gzip.open --- condor_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/condor_utils.py b/condor_utils.py index b0f761b..4b9672f 100644 --- a/condor_utils.py +++ b/condor_utils.py @@ -741,7 +741,7 @@ def read_from_file(filename): Args: filename (str): filename to read """ - with (gzip.open(filename) if filename.endswith('.gz') else open(filename)) as f: + with (gzip.open(filename, 'rt', encoding='utf-8') if filename.endswith('.gz') else open(filename)) as f: entry = '' for line in f.readlines(): if line.startswith('***'): From 00ba46e6de6db9ae69275a1eaaa22882a9533921 Mon Sep 17 00:00:00 2001 From: David Schultz Date: Wed, 17 Jan 2024 21:26:20 -0600 Subject: [PATCH 2/2] use osg ca certs and upgrade to python 3.8 --- Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0206588..20a48bd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ FROM almalinux:8 RUN dnf -y install epel-release && \ - dnf -y upgrade ca-certificates --disablerepo=epel && \ - rpm -i http://dist.eugridpma.info/distribution/igtf/1.125/accredited/RPMS/ca_COMODO-RSA-CA-1.125-1.noarch.rpm && \ - rpm -i http://dist.eugridpma.info/distribution/igtf/1.125/accredited/RPMS/ca_InCommon-IGTF-Server-CA-1.125-1.noarch.rpm && \ - dnf install -y python3-pip && \ - ln -s /usr/bin/python3 /usr/bin/python && \ - pip3 install 'elasticsearch>=6.0.0,<7.0.0' 'elasticsearch-dsl>=6.0.0,<7.0.0' htcondor requests prometheus_client + yum install -y https://repo.opensciencegrid.org/osg/23-main/osg-23-main-el8-release-latest.rpm && \ + yum install -y osg-ca-certs && \ + dnf install -y python38 python38-pip && \ + dnf clean all && yum clean all && \ + ln -s /usr/bin/python3.8 /usr/bin/python && \ + pip3.8 install --no-cache-dir 'elasticsearch>=6.0.0,<7.0.0' 'elasticsearch-dsl>=6.0.0,<7.0.0' htcondor requests prometheus_client COPY . /monitoring