Skip to content

Commit 050bde6

Browse files
authored
Merge branch 'master' into dependabot/pip/podman-approx-eq-5.2.0
2 parents 0b86d86 + d44bd05 commit 050bde6

File tree

8 files changed

+34
-61
lines changed

8 files changed

+34
-61
lines changed

.github/workflows/container.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ jobs:
3939

4040
- name: Extract metadata (tags, labels) for Docker
4141
id: meta
42-
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81
42+
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96
4343
with:
4444
images: ${{ env.REGISTRY }}/${{ env.PCW_IMAGE_PREFIX }}_${{ matrix.suffix }}
4545

4646
- name: Build Docker image (PCW)
4747
if: ${{ matrix.suffix == 'main' }}
48-
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85
48+
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355
4949
with:
5050
context: .
5151
file: containers/Dockerfile
@@ -54,7 +54,7 @@ jobs:
5454
labels: ${{ steps.meta.outputs.labels }}
5555
- name: Build Docker image (K8S)
5656
if: ${{ matrix.suffix == 'k8s' }}
57-
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85
57+
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355
5858
with:
5959
context: .
6060
file: containers/Dockerfile_${{ matrix.suffix }}
@@ -85,13 +85,13 @@ jobs:
8585

8686
- name: Extract metadata (tags, labels) for Docker
8787
id: meta
88-
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81
88+
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96
8989
with:
9090
images: ${{ env.REGISTRY }}/${{ env.PCW_IMAGE_PREFIX }}_${{ matrix.suffix }}
9191

9292
- name: Build and push Docker image (PCW)
9393
if: ${{ matrix.suffix == 'main' }}
94-
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85
94+
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355
9595
with:
9696
context: .
9797
file: containers/Dockerfile
@@ -100,7 +100,7 @@ jobs:
100100
labels: ${{ steps.meta.outputs.labels }}
101101
- name: Build and push Docker image (K8S)
102102
if: ${{ matrix.suffix == 'k8s' }}
103-
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85
103+
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355
104104
with:
105105
context: .
106106
file: containers/Dockerfile_${{ matrix.suffix }}

.github/workflows/pcw.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ jobs:
3939
- name: Run tests and collect coverage
4040
run: pytest --cov
4141
- name: Upload coverage to Codecov
42-
uses: codecov/codecov-action@v4
42+
uses: codecov/codecov-action@v5

ocw/lib/cleanup.py

+1-15
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
from ocw.lib.azure import Azure
55
from ocw.lib.ec2 import EC2
66
from ocw.lib.gce import GCE
7-
from ocw.lib.eks import EKS
8-
from ocw.lib.emailnotify import send_mail, send_cluster_notification
7+
from ocw.lib.emailnotify import send_mail
98
from ocw.enums import ProviderChoice
109

1110
logger = logging.getLogger(__name__)
@@ -28,16 +27,3 @@ def cleanup_run():
2827
except Exception as ex:
2928
logger.exception("[%s] Cleanup failed!", namespace)
3029
send_mail(f'{type(ex).__name__} on Cleanup in [{namespace}]', traceback.format_exc())
31-
32-
33-
def list_clusters():
34-
for namespace in PCWConfig.get_namespaces_for('clusters'):
35-
try:
36-
clusters = EKS(namespace).all_clusters()
37-
quantity = sum(len(clusters[c1]) for c1 in clusters)
38-
logger.info("%d cluster(s) found", quantity)
39-
if quantity > 0:
40-
send_cluster_notification(namespace, clusters)
41-
except Exception as ex:
42-
logger.exception("[%s] List clusters failed!", namespace)
43-
send_mail(f'{type(ex).__name__} on List clusters in [{namespace}]', traceback.format_exc())

ocw/lib/emailnotify.py

-11
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,6 @@ def draw_instance_table(objects):
2929
return table.draw()
3030

3131

32-
def send_cluster_notification(namespace, clusters):
33-
if len(clusters) and PCWConfig.has('notify'):
34-
clusters_str = ''
35-
for region in clusters:
36-
clusters_list = ' '.join([str(cluster) for cluster in clusters[region]])
37-
clusters_str = f'{clusters_str}\n{region} : {clusters_list}'
38-
logger.debug("Full clusters list - %s", clusters_str)
39-
send_mail(f"[{namespace}] EC2 clusters found", clusters_str,
40-
receiver_email=PCWConfig.get_feature_property('notify', 'to', namespace))
41-
42-
4332
def send_mail(subject, message, receiver_email=None):
4433
if PCWConfig.has('notify'):
4534
smtp_server = PCWConfig.get_feature_property('notify', 'smtp')

ocw/templates/ocw/instance_list.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
{% block content %}
77
<link rel="stylesheet" href="{% static 'css/instance_table.css' %}">
88
{% if filter %}
9-
<button data-toggle="collapse" class="btn btn-primary btn-sm" data-target="#table_filter">Edit filter<span class="glyphicon glyphicon-filter"></span></button>
9+
<button data-bs-toggle="collapse" class="btn btn-primary btn-sm" data-bs-target="#table_filter">Edit filter<span class="glyphicon glyphicon-filter"></span></button>
1010
Displaying {{ filter.qs.count }} of {{ filter.queryset.count }} items.
11-
<div id="table_filter" class="well collapse {{ request.GET.state|yesno:"in, " }} ">
11+
<div id="table_filter" class="card p-3 collapse {{ request.GET.state|yesno:"show, " }} ">
1212
<form action="" method="get" class="form">
1313
{% bootstrap_form filter.form %}
1414
<a class="btn btn-default" role="button" href='{{ request.path }}' >Clear</a>

requirements.txt

+19-18
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
1-
boto3
2-
azure-identity==1.16.0
3-
azure-mgmt-compute==31.0.0
1+
apscheduler==3.10.4
2+
azure-identity==1.19.0
3+
azure-storage-blob==12.23.1
4+
azure-mgmt-compute==33.0.0
45
azure-mgmt-resource==23.1.1
5-
azure-mgmt-storage==21.1.0
6-
azure-storage-blob==12.20.0
7-
cachetools
8-
msrestazure==0.6.4
9-
uwsgi==2.0.24
10-
requests==2.32.3
6+
azure-mgmt-storage==21.2.0
7+
boto3==1.35.39
8+
botocore==1.35.39
9+
cachetools==5.5.0
1110
Django~=5.0.6
1211
django-tables2==2.7.0
1312
django-filter==23.5
1413
django-bootstrap5==24.2
15-
texttable
16-
oauth2client
17-
google-api-python-client==2.131.0
18-
google-cloud-storage==2.16.0
19-
openqa_client
20-
python-dateutil
21-
apscheduler
22-
kubernetes
23-
influxdb-client
14+
google-api-python-client==2.149.0
15+
httplib2==0.22.0
16+
influxdb-client==1.46.0
17+
msrest==0.7.1
18+
openqa-client==4.2.3
19+
protobuf==5.28.2
20+
python-dateutil==2.9.0.post0
21+
requests==2.32.3
22+
texttable==1.7.0
23+
urllib3==2.2.3
24+
uwsgi==2.0.24

requirements_k8s.txt

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
oauth2client
2-
kubernetes
3-
google-api-python-client==2.131.0
4-
azure-cli==2.61.0
5-
azure-identity==1.16.0
6-
azure-mgmt-containerservice==30.0.0
1+
azure-cli==2.65.0
2+
azure-identity==1.19.0
73
azure-mgmt-resource==23.1.1
8-
boto3
4+
boto3==1.35.39
5+
google_api_python_client==2.149.0
6+
kubernetes

webui/PCWConfig.py

-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ def get_feature_property(feature: str, feature_property: str, namespace: str | N
6464
'updaterun/default_ttl': {'default': 44400, 'return_type': int},
6565
'notify/to': {'default': None, 'return_type': str},
6666
'notify/age-hours': {'default': 12, 'return_type': int},
67-
'cluster.notify/to': {'default': None, 'return_type': str},
6867
'notify/smtp': {'default': None, 'return_type': str},
6968
'notify/smtp-port': {'default': 25, 'return_type': int},
7069
'notify/from': {'default': '[email protected]', 'return_type': str},

0 commit comments

Comments
 (0)