Skip to content

Commit be3618b

Browse files
authored
Merge branch 'master' into fix-static-methods
2 parents 19c1d15 + d2cd4e9 commit be3618b

File tree

512 files changed

+21094
-2199
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

512 files changed

+21094
-2199
lines changed

Diff for: .github/workflows/build-client-container.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
steps:
2020
- name: make date tag
2121
id: mkdatetag
22-
run: echo "::set-output name=dtag::$(date +%Y%m%d-%H%M)"
22+
run: echo "dtag=$(date +%Y%m%d-%H%M)" >> $GITHUB_OUTPUT
2323

2424
build:
2525
runs-on: ubuntu-latest
@@ -29,7 +29,7 @@ jobs:
2929
fail-fast: False
3030

3131
steps:
32-
- uses: actions/checkout@v2
32+
- uses: actions/checkout@v3
3333

3434
- name: Generate tag list
3535
id: generate-tag-list
@@ -43,26 +43,26 @@ jobs:
4343
tag_list+=($registry/$docker_repo:release-$TIMESTAMP)
4444
done
4545
IFS=,
46-
echo "::set-output name=taglist::${tag_list[*]}"
46+
echo "taglist=${tag_list[*]}" >> $GITHUB_OUTPUT
4747
4848
- name: Set up Docker Buildx
49-
uses: docker/setup-buildx-action@v1
49+
uses: docker/setup-buildx-action@v2.7.0
5050

5151
- name: Log in to Docker Hub
52-
uses: docker/login-action@v1
52+
uses: docker/login-action@v2.2.0
5353
with:
5454
username: ${{ secrets.DOCKER_USERNAME }}
5555
password: ${{ secrets.DOCKER_PASSWORD }}
5656

5757
- name: Log in to OSG Harbor
58-
uses: docker/login-action@v1
58+
uses: docker/login-action@v2.2.0
5959
with:
6060
registry: hub.opensciencegrid.org
6161
username: ${{ secrets.OSG_HARBOR_ROBOT_USER }}
6262
password: ${{ secrets.OSG_HARBOR_ROBOT_PASSWORD }}
6363

6464
- name: Build and push Client Docker images
65-
uses: docker/build-push-action@v2.2.0
65+
uses: docker/build-push-action@v4
6666
with:
6767
push: true
6868
tags: "${{ steps.generate-tag-list.outputs.taglist }}"

Diff for: .github/workflows/build-sw-container.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
if: startsWith(github.repository, 'opensciencegrid/')
1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v3
1717

1818
- name: Generate tag list
1919
id: generate-tag-list
@@ -28,26 +28,26 @@ jobs:
2828
# This causes the tag_list array to be comma-separated below,
2929
# which is required for build-push-action
3030
IFS=,
31-
echo "::set-output name=taglist::${tag_list[*]}"
31+
echo "taglist=${tag_list[*]}" >> $GITHUB_OUTPUT
3232
3333
- name: Set up Docker Buildx
34-
uses: docker/setup-buildx-action@v1
34+
uses: docker/setup-buildx-action@v2.7.0
3535

3636
- name: Log in to Docker Hub
37-
uses: docker/login-action@v1
37+
uses: docker/login-action@v2.2.0
3838
with:
3939
username: ${{ secrets.DOCKER_USERNAME }}
4040
password: ${{ secrets.DOCKER_PASSWORD }}
4141

4242
- name: Log in to OSG Harbor
43-
uses: docker/login-action@v1
43+
uses: docker/login-action@v2.2.0
4444
with:
4545
registry: hub.opensciencegrid.org
4646
username: ${{ secrets.OSG_HARBOR_ROBOT_USER }}
4747
password: ${{ secrets.OSG_HARBOR_ROBOT_PASSWORD }}
4848

4949
- name: Build and push Docker images
50-
uses: docker/build-push-action@v2.2.0
50+
uses: docker/build-push-action@v4
5151
with:
5252
context: .
5353
push: true

Diff for: .github/workflows/validate-caches.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ jobs:
1010
if: startsWith(github.repository, 'opensciencegrid/')
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v3
1414
- name: Set up Python
15-
uses: actions/setup-python@v2
15+
uses: actions/setup-python@v4
1616
with:
17-
python-version: 3.6
17+
python-version: 3.9.15
1818
- name: Compare StashCache config lists
1919
run: |
2020
./src/tests/diff_cache_configs.py

Diff for: .github/workflows/validate-code.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ jobs:
66
name: Validate Topology code
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
9+
- uses: actions/checkout@v3
1010
- name: Set up Python
11-
uses: actions/setup-python@v2
11+
uses: actions/setup-python@v4
1212
with:
13-
python-version: 3.6
13+
python-version: 3.9.15
1414
- name: Install packages
1515
run: |
1616
sudo apt-get update
@@ -23,10 +23,12 @@ jobs:
2323
- name: Test API
2424
run: |
2525
export TOPOLOGY_CONFIG=$PWD/src/config-ci.py
26+
export FLASK_DEBUG=1
2627
py.test ./src/tests/test_api.py
2728
- name: Test StashCache
2829
run: |
2930
export TOPOLOGY_CONFIG=$PWD/src/config-ci.py
31+
export FLASK_DEBUG=1
3032
py.test ./src/tests/test_stashcache.py
3133
- name: Test cacher
3234
run: |

Diff for: .github/workflows/validate-data.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ jobs:
77
name: Validate Topology data
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v3
1111
- name: Set up Python
12-
uses: actions/setup-python@v2
12+
uses: actions/setup-python@v4
1313
with:
14-
python-version: 3.6
14+
python-version: 3.9.15
1515
- name: Install packages
1616
run: |
1717
sudo apt-get update

Diff for: Dockerfile

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM opensciencegrid/software-base:3.6-el8-release
1+
FROM opensciencegrid/software-base:3.6-al8-release
22

33
# Install dependencies (application, Apache)
44
RUN \
@@ -7,8 +7,8 @@ RUN \
77
gcc \
88
git \
99
libyaml-devel \
10-
python3-devel \
11-
python3-pip \
10+
python39-devel \
11+
python39-pip \
1212
&& yum install -y \
1313
fetch-crl \
1414
httpd \
@@ -19,10 +19,12 @@ RUN \
1919
/usr/bin/pkill \
2020
&& yum clean all && rm -rf /var/cache/yum/*
2121

22+
RUN alternatives --set python3 /usr/bin/python3.9
23+
2224
WORKDIR /app
2325

2426
# Install application dependencies
25-
COPY requirements-apache.txt src/ ./
27+
COPY requirements-apache.txt requirements-rootless.txt ./
2628
RUN pip3 install --no-cache-dir -r requirements-apache.txt
2729

2830
# Create data directory, and gather SSH keys for git
@@ -36,6 +38,8 @@ RUN echo "45 */6 * * * root /usr/sbin/fetch-crl -q -r 21600 -p 10" > /etc/cron.
3638
echo "@reboot root /usr/sbin/fetch-crl -q -p 10" >> /etc/cron.d/fetch-crl && \
3739
echo "0 0 * * * root /usr/bin/pkill -USR1 httpd" > /etc/cron.d/httpd
3840

41+
# Install application
42+
COPY src/ ./
3943

4044
# Set up Apache configuration
4145
# Remove default SSL config: default certs don't exist on EL8 so the

Diff for: Dockerfile.client

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM quay.io/centos/centos:stream8
22

3-
LABEL maintainer="OSG Software <help@opensciencegrid.org>"
3+
LABEL maintainer="OSG Software <help@osg-htc.org>"
44
LABEL name="OSG 3.5 OSG-Notify client"
55

66
RUN yum -y install https://repo.opensciencegrid.org/osg/3.5/osg-3.5-el8-release-latest.rpm \

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,4 +146,4 @@ for the VO(s) that you support:
146146
| LHC VOs | [GGUS](https://ggus.eu) |
147147
| Anyone else | [Helpdesk](https://support.opensciencegrid.org) |
148148

149-
Or email us at help@opensciencegrid.org.
149+
Or email us at help@osg-htc.org.

Diff for: bin/next_downtime_id

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ set -o pipefail
44
cd "$(dirname "$0")"/..
55

66
unset GREP_OPTIONS
7-
egrep -h '^ *ID: *[0-9]{1,9}\>' topology/*/*/*_downtime.yaml |
7+
# After 18 digits we might start running into integer overflow issues...
8+
egrep -h '^ *ID: *[0-9]{1,18}\>' topology/*/*/*_downtime.yaml |
89
awk '$2 > max {max = $2}; END {print max + 1}'
910

Diff for: bin/osg-notify

+15-5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
A simple tool for generating notification emails to the OSG
66
"""
77
import os
8+
import re
89
import sys
910
import getpass
1011
import smtplib
@@ -116,10 +117,9 @@ def parseargs():
116117
oparser.add_argument("--oim-owner-filter", dest="owner_vo",
117118
help="Filter on resources that list VO(s) as a partial owner")
118119

119-
oparser.add_argument("--oim-contact-type", default="all", dest="contact_type",
120-
choices=["all", "administrative", "miscellaneous", "security", "submitter", "site"],
121-
help="Filter on contact type e.g. administrative, miscellaneous, security, submitter or site"
122-
"(default: all)", )
120+
oparser.add_argument("--oim-contact-type", action="append", dest="contact_type",
121+
choices=["all"] + topology_utils.CONTACT_TYPES,
122+
help="Filter on contact type (default: all)")
123123
oparser.add_argument("--bypass-dns-check", action="store_true", dest="bypass_dns_check",
124124
help="Bypass checking that one of the host's IP addresses matches with the hostanme resolution")
125125
oparser.add_argument("--allow-non-ascii", action="store_true", dest="allow_non_ascii",
@@ -132,6 +132,10 @@ def parseargs():
132132
if args.name_filter and args.fqdn_filter:
133133
oparser.error("Can't specify both --oim-name-filter and --oim-fqdn-filter")
134134

135+
if not args.contact_type or ("all" in args.contact_type):
136+
args.contact_type = ["all"]
137+
args.contact_type = set(args.contact_type) # remove dupes
138+
135139
if args.from_name == 'security':
136140
args.from_name = 'OSG Security Team'
137141
args.from_addr = '[email protected]'
@@ -158,7 +162,12 @@ def network_ok(bypass_dns_check):
158162

159163
def replace_smart_quotes_and_dashes(contents):
160164
# Replace smart quotes and em/en dashes
161-
replaced = contents.replace('“','"').replace('”','"').replace("–","-").replace("—","-")
165+
regex_sub_map = [(r'[“”]', '"'),
166+
(r'[‘’]', "'"),
167+
(r'[—–]', '-')]
168+
replaced = contents
169+
for pattern, sub in regex_sub_map:
170+
replaced = re.sub(pattern, sub, replaced)
162171
return replaced
163172

164173
def has_non_printable_ascii_characters(contents):
@@ -181,6 +190,7 @@ def main():
181190
while attempts > 0:
182191
try:
183192
results = pm.get_vo_contacts(args)
193+
break
184194
except topology_utils.InvalidPathError as exc:
185195
print(exc)
186196
exit(1)

Diff for: docker/apache.conf

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
Listen 8080
22
Listen 8443
33

4-
LoadModule wsgi_module /usr/local/lib64/python3.6/site-packages/mod_wsgi/server/mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so
4+
LoadModule wsgi_module /usr/local/lib64/python3.9/site-packages/mod_wsgi/server/mod_wsgi-py39.cpython-39-x86_64-linux-gnu.so
55
WSGIPythonPath /app
66

77
# Run apps in separate processes to stop yaml.CSafeLoader import-time error
8-
WSGIDaemonProcess topology home=/app
8+
WSGIDaemonProcess topology home=/app processes=5
99
WSGIDaemonProcess topomerge home=/app
1010

1111
# vhost for topology, SSL terminated here (for gridsite auth)
@@ -35,6 +35,14 @@ WSGIDaemonProcess topomerge home=/app
3535

3636
WSGIScriptAlias / /app/topology.wsgi process-group=topology application-group=topology
3737

38+
# Enable compression for text files
39+
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/json
40+
41+
# Enable memory caching
42+
CacheSocache shmcb
43+
CacheSocacheMaxSize 102400
44+
CacheEnable socache /
45+
3846
</VirtualHost>
3947

4048
# Separate vhost for map, no SSL required (terminated in traefik)

0 commit comments

Comments
 (0)