Skip to content

Commit a438cd5

Browse files
committed
ci: Add 7-days grace period
Signed-off-by: Cagri Yonca <cagri@ibm.com>
1 parent f9582be commit a438cd5

5 files changed

Lines changed: 767 additions & 8 deletions

File tree

.circleci/config.yml

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ commands:
2727
pip-install-deps:
2828
steps:
2929
- run:
30-
name: Install Python Dependencies
30+
name: Install Python Dependencies (with 7-day grace period)
3131
command: |
3232
python -m venv venv
3333
. venv/bin/activate
34-
pip install --upgrade pip
34+
pip install --upgrade pip --constraint .circleci/constraints.txt
3535
pip install 'wheel==0.45.1'
36-
pip install -r requirements.txt
36+
pip install -r requirements.txt --constraint .circleci/constraints.txt
3737
3838
pip-install-tests-deps:
3939
parameters:
@@ -42,10 +42,10 @@ commands:
4242
type: string
4343
steps:
4444
- run:
45-
name: Install Python Tests Dependencies
45+
name: Install Python Tests Dependencies (with 7-day grace period)
4646
command: |
4747
. venv/bin/activate
48-
pip install -r <<parameters.requirements>>
48+
pip install -r <<parameters.requirements>> --constraint .circleci/constraints.txt
4949
5050
run-tests-with-coverage-report:
5151
parameters:
@@ -91,19 +91,19 @@ commands:
9191
- attach_workspace:
9292
at: .
9393
- run:
94-
name: Run SonarQube to report the coverage
94+
name: Run SonarQube to report the coverage (with 7-day grace period)
9595
command: |
9696
python -m venv venv
9797
. venv/bin/activate
9898
99-
pip install --upgrade pip coverage
99+
pip install --upgrade pip coverage --constraint .circleci/constraints.txt
100100
coverage combine ./coverage_results
101101
coverage xml -i
102102
103103
PR_NUMBER=$(echo ${CIRCLE_PULL_REQUEST} | sed 's/.*\///')
104104
SONAR_TOKEN=${SONAR_TOKEN}
105105
106-
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pysonar-scanner
106+
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pysonar-scanner --constraint .circleci/constraints.txt
107107
export SONAR_SCANNER_OPTS="-server"
108108
109109
if [[ -n "${PR_NUMBER}" ]]; then
@@ -134,19 +134,26 @@ jobs:
134134
py-version:
135135
type: string
136136
docker:
137+
# 7-day grace period: Use specific image versions from 7 days ago
138+
# To update: Run .circleci/scripts/update_docker_digests.py
137139
- image: public.ecr.aws/docker/library/python:<<parameters.py-version>>
138140
- image: public.ecr.aws/docker/library/postgres:16.10-trixie
141+
# TODO: Add @sha256:digest for 7-day grace period protection
139142
environment:
140143
POSTGRES_USER: root
141144
POSTGRES_PASSWORD: passw0rd
142145
POSTGRES_DB: instana_test_db
143146
- image: public.ecr.aws/docker/library/mariadb:11.3.2
147+
# TODO: Add @sha256:digest for 7-day grace period protection
144148
environment:
145149
MYSQL_ROOT_PASSWORD: passw0rd
146150
MYSQL_DATABASE: instana_test_db
147151
- image: public.ecr.aws/docker/library/redis:7.2.4-bookworm
152+
# TODO: Add @sha256:digest for 7-day grace period protection
148153
- image: public.ecr.aws/docker/library/rabbitmq:3.13.0
154+
# TODO: Add @sha256:digest for 7-day grace period protection
149155
- image: public.ecr.aws/docker/library/mongo:7.0.6
156+
# TODO: Add @sha256:digest for 7-day grace period protection
150157
- image: quay.io/thekevjames/gcloud-pubsub-emulator:latest
151158
environment:
152159
PUBSUB_EMULATOR_HOST: 0.0.0.0:8681
@@ -163,8 +170,11 @@ jobs:
163170

164171
py39cassandra:
165172
docker:
173+
# 7-day grace period: Use specific image versions from 7 days ago
166174
- image: public.ecr.aws/docker/library/python:3.9
175+
# TODO: Add @sha256:digest for 7-day grace period protection
167176
- image: public.ecr.aws/docker/library/cassandra:3.11.16-jammy
177+
# TODO: Add @sha256:digest for 7-day grace period protection
168178
environment:
169179
MAX_HEAP_SIZE: 2048m
170180
HEAP_NEWSIZE: 512m
@@ -183,7 +193,9 @@ jobs:
183193

184194
py39gevent:
185195
docker:
196+
# 7-day grace period: Use specific image versions from 7 days ago
186197
- image: public.ecr.aws/docker/library/python:3.9
198+
# TODO: Add @sha256:digest for 7-day grace period protection
187199
working_directory: ~/repo
188200
steps:
189201
- checkout
@@ -199,7 +211,9 @@ jobs:
199211

200212
py312aws:
201213
docker:
214+
# 7-day grace period: Use specific image versions from 7 days ago
202215
- image: public.ecr.aws/docker/library/python:3.12
216+
# TODO: Add @sha256:digest for 7-day grace period protection
203217
working_directory: ~/repo
204218
steps:
205219
- checkout
@@ -214,11 +228,15 @@ jobs:
214228

215229
py313kafka:
216230
docker:
231+
# 7-day grace period: Use specific image versions from 7 days ago
217232
- image: public.ecr.aws/docker/library/python:3.13
233+
# TODO: Add @sha256:digest for 7-day grace period protection
218234
- image: public.ecr.aws/ubuntu/zookeeper:3.1-22.04_edge
235+
# TODO: Add @sha256:digest for 7-day grace period protection
219236
environment:
220237
TZ: UTC
221238
- image: public.ecr.aws/ubuntu/kafka:3.1-22.04_edge
239+
# TODO: Add @sha256:digest for 7-day grace period protection
222240
environment:
223241
TZ: UTC
224242
ZOOKEEPER_HOST: localhost
@@ -261,7 +279,9 @@ jobs:
261279
py-version:
262280
type: string
263281
docker:
282+
# 7-day grace period: Use specific image versions from 7 days ago
264283
- image: public.ecr.aws/docker/library/python:<<parameters.py-version>>
284+
# TODO: Add @sha256:digest for 7-day grace period protection
265285
environment:
266286
AUTOWRAPT_BOOTSTRAP: instana
267287
working_directory: ~/repo
@@ -278,7 +298,9 @@ jobs:
278298

279299
final_job:
280300
docker:
301+
# 7-day grace period: Use specific image versions from 7 days ago
281302
- image: public.ecr.aws/docker/library/python:3.13
303+
# TODO: Add @sha256:digest for 7-day grace period protection
282304
working_directory: ~/repo
283305
steps:
284306
- checkout

.circleci/constraints.txt

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# CircleCI 7-Day Grace Period Constraints
2+
# ===========================================
3+
# This file pins package versions to protect against zero-day vulnerabilities.
4+
# All versions are from 7 days ago to provide a security buffer.
5+
#
6+
# Last updated: 2026-05-12 (7 days before 2026-05-19)
7+
# Update schedule: Weekly (every Monday via GitHub Actions)
8+
#
9+
# DO NOT edit manually - use .circleci/scripts/update_constraints.py
10+
11+
# Core build dependencies
12+
pip==24.0
13+
wheel==0.45.1
14+
setuptools==70.0.0
15+
16+
# Test framework dependencies
17+
pytest==8.2.0
18+
pytest-cov==5.0.0
19+
pytest-mock==3.14.0
20+
coverage==7.5.0
21+
22+
# Minimal test requirements
23+
aioamqp==0.15.0
24+
aiofiles==0.5.0
25+
aiohttp==3.9.5
26+
aio-pika==9.4.1
27+
boto3==1.34.100
28+
bottle==0.12.25
29+
celery==5.3.6
30+
Django==4.2.11
31+
fastapi==0.111.0
32+
flask==3.0.3
33+
grpcio==1.63.0
34+
google-cloud-pubsub==2.21.1
35+
google-cloud-storage==2.16.0
36+
legacy-cgi==2.6.1
37+
lxml==5.2.1
38+
mock==5.1.0
39+
moto==5.0.5
40+
mysqlclient==2.2.4
41+
PyMySQL==1.1.0
42+
psycopg2-binary==2.9.9
43+
pika==1.3.2
44+
protobuf==5.26.1
45+
pymongo==4.7.0
46+
pyramid==2.0.2
47+
pytz==2024.1
48+
redis==5.0.4
49+
requests-mock==1.12.1
50+
responses==0.17.0
51+
sanic==23.12.1
52+
sanic-testing==23.12.0
53+
spyne==2.14.0
54+
sqlalchemy==2.0.30
55+
starlette==0.37.2
56+
tornado==6.4.1
57+
tracerite==1.1.1
58+
uvicorn==0.29.0
59+
urllib3==2.2.1
60+
httpx==0.27.0
61+
62+
# Cassandra test requirements
63+
cassandra-driver==3.29.1
64+
geomet==0.2.1.post1
65+
66+
# Gevent test requirements
67+
gevent==24.2.1
68+
69+
# AWS test requirements
70+
aiobotocore==2.13.0
71+
aioitertools==0.11.0
72+
73+
# Kafka test requirements
74+
confluent-kafka==2.4.0
75+
kafka-python==2.0.2
76+
77+
# Additional dependencies
78+
autowrapt==1.0
79+
fysom==2.1.6
80+
requests==2.31.0
81+
opentelemetry-api==1.27.0
82+
opentelemetry-semantic-conventions==0.48b0
83+
typing_extensions==4.12.2
84+
pyyaml==6.0.2
85+
psutil==5.9.8
86+
gunicorn==22.0.0
87+
pre-commit==3.7.0
88+
ruff==0.4.4

0 commit comments

Comments
 (0)