Skip to content

Commit b6e18ec

Browse files
authored
Merge branch 'main' into dependabot/pip/dev-utils/certifi-2025.1.31
2 parents d939b2e + 52fd979 commit b6e18ec

File tree

14 files changed

+152
-7
lines changed

14 files changed

+152
-7
lines changed

.ci/.matrix_framework_fips.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# this is a limited list of matrix builds to be used for PRs
2+
# see .matrix_framework_full.yml for a full list
3+
FRAMEWORK:
4+
- none
5+
- django-5.0
6+
- flask-3.0
7+
- jinja2-3
8+
- opentelemetry-newest
9+
- opentracing-newest
10+
- twisted-newest
11+
- celery-5-flask-2
12+
- celery-5-django-5
13+
- requests-newest
14+
- psutil-newest
15+
- gevent-newest
16+
- aiohttp-newest
17+
- tornado-newest
18+
- starlette-newest
19+
- graphene-2
20+
- httpx-newest
21+
- httplib2-newest
22+
- prometheus_client-newest
23+
- sanic-newest

.ci/.matrix_framework_full.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ FRAMEWORK:
4646
- pymongo-3.3
4747
- pymongo-3.4
4848
- pymongo-3.5
49+
- pymongo-3.6
4950
- pymongo-newest
5051
- redis-3
5152
- redis-2

.ci/.matrix_python_fips.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
VERSION:
2+
- python-3.12

.github/workflows/docs-build.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: docs-build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request_target: ~
8+
merge_group: ~
9+
10+
jobs:
11+
docs-preview:
12+
uses: elastic/docs-builder/.github/workflows/preview-build.yml@main
13+
with:
14+
path-pattern: docs/**
15+
permissions:
16+
deployments: write
17+
id-token: write
18+
contents: read
19+
pull-requests: read

.github/workflows/docs-cleanup.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: docs-cleanup
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- closed
7+
8+
jobs:
9+
docs-preview:
10+
uses: elastic/docs-builder/.github/workflows/preview-cleanup.yml@main
11+
permissions:
12+
contents: none
13+
id-token: write
14+
deployments: write

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ jobs:
119119
- uses: actions/checkout@v4
120120

121121
- name: Set up Docker Buildx
122-
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
122+
uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca # v3.9.0
123123

124124
- name: Log in to the Elastic Container registry
125125
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
@@ -146,7 +146,7 @@ jobs:
146146
147147
- name: Build and push image
148148
id: docker-push
149-
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6.13.0
149+
uses: docker/build-push-action@0adf9959216b96bec444f325f1e493d4aa344497 # v6.14.0
150150
with:
151151
context: .
152152
platforms: linux/amd64,linux/arm64

.github/workflows/test-fips.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
2+
# run test suite inside a FIPS 140 container
3+
name: test-fips
4+
5+
on:
6+
workflow_dispatch:
7+
schedule:
8+
- cron: '0 4 * * 1'
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
create-matrix:
15+
runs-on: ubuntu-24.04
16+
outputs:
17+
matrix: ${{ steps.generate.outputs.matrix }}
18+
steps:
19+
- uses: actions/checkout@v4
20+
- id: generate
21+
uses: elastic/oblt-actions/version-framework@v1
22+
with:
23+
versions-file: .ci/.matrix_python_fips.yml
24+
frameworks-file: .ci/.matrix_framework_fips.yml
25+
26+
test-fips:
27+
needs: create-matrix
28+
runs-on: ubuntu-24.04
29+
# https://docs.github.com/en/actions/writing-workflows/choosing-where-your-workflow-runs/running-jobs-in-a-container
30+
# docker run -it --rm --name fipsy docker.elastic.co/wolfi/python-fips:3.12
31+
container:
32+
image: docker.elastic.co/wolfi/python-fips:3.12-dev
33+
options: --user root
34+
credentials:
35+
username: ${{ secrets.ELASTIC_DOCKER_USERNAME }}
36+
password: ${{ secrets.ELASTIC_DOCKER_PASSWORD }}
37+
timeout-minutes: 30
38+
strategy:
39+
fail-fast: false
40+
max-parallel: 10
41+
matrix: ${{ fromJSON(needs.create-matrix.outputs.matrix) }}
42+
steps:
43+
- uses: actions/checkout@v4
44+
- name: check that python has fips mode enabled
45+
run: |
46+
python3 -c 'import _hashlib; assert _hashlib.get_fips_mode() == 1'
47+
- name: install run_tests.sh requirements
48+
run: apk add netcat-openbsd tzdata
49+
- name: Run tests
50+
run: ./tests/scripts/run_tests.sh
51+
env:
52+
FRAMEWORK: ${{ matrix.framework }}
53+
54+
notify-on-failure:
55+
if: always()
56+
runs-on: ubuntu-24.04
57+
needs: test-fips
58+
steps:
59+
- id: check
60+
uses: elastic/oblt-actions/check-dependent-jobs@v1
61+
with:
62+
jobs: ${{ toJSON(needs) }}
63+
- name: Notify in Slack
64+
if: steps.check.outputs.status == 'failure'
65+
uses: elastic/oblt-actions/slack/notify-result@v1
66+
with:
67+
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
68+
status: ${{ steps.check.outputs.status }}
69+
channel-id: "#apm-agent-python"

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
updatecli v0.93.0
1+
updatecli v0.94.1

tests/config/tests.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,10 @@ def test_file_is_readable_validator_not_a_file(tmpdir):
278278
assert "is not a file" in e.value.args[0]
279279

280280

281-
@pytest.mark.skipif(platform.system() == "Windows", reason="os.access() doesn't seem to work as we expect on Windows")
281+
@pytest.mark.skipif(
282+
platform.system() == "Windows" or os.getuid() == 0,
283+
reason="os.access() doesn't seem to work as we expect on Windows and test will fail as root user",
284+
)
282285
def test_file_is_readable_validator_not_readable(tmpdir):
283286
p = tmpdir.join("nonreadable")
284287
p.write("")

tests/docker-compose.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ services:
4646
volumes:
4747
- pymongodata36:/data/db
4848

49+
mongodb40:
50+
image: mongo:4.0
51+
ports:
52+
- "27017:27017"
53+
volumes:
54+
- pymongodata40:/data/db
55+
4956
memcached:
5057
image: memcached
5158

@@ -198,6 +205,8 @@ volumes:
198205
driver: local
199206
pymongodata36:
200207
driver: local
208+
pymongodata40:
209+
driver: local
201210
pyesdata7:
202211
driver: local
203212
pyesdata8:

0 commit comments

Comments
 (0)