Skip to content

Commit 434134e

Browse files
authored
Merge branch 'main' into gh-oblt/add-asciidoc-freeze-warning
2 parents 86dfb9a + 6f521ec commit 434134e

35 files changed

+225
-82
lines changed

.ci/.matrix_exclude.yml

+2
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,8 @@ exclude:
217217
FRAMEWORK: sanic-20.12
218218
- VERSION: python-3.6
219219
FRAMEWORK: sanic-newest
220+
- VERSION: python-3.8
221+
FRAMEWORK: sanic-newest
220222
- VERSION: pypy-3
221223
# aioredis
222224
FRAMEWORK: aioredis-newest

.ci/.matrix_framework_full.yml

+1
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/updatecli/values.d/scm.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@ scm:
33
owner: elastic
44
repository: apm-agent-python
55
branch: main
6-
7-
signedcommit: true
6+
commitusingapi: true
7+
# begin update-compose policy values
8+
user: obltmachine
9+
email: obltmachine@users.noreply.github.com
10+
# end update-compose policy values
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
spec:
2+
files:
3+
- "updatecli-compose.yaml"

.github/actions/build-distribution/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ runs:
1414
run: ./dev-utils/make-distribution.sh
1515
shell: bash
1616

17-
- uses: actions/upload-artifact@v3
17+
- uses: actions/upload-artifact@v4
1818
with:
1919
name: build-distribution
2020
path: ./build/

.github/workflows/labeler.yml

+15-4
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,28 @@ jobs:
1515
triage:
1616
runs-on: ubuntu-latest
1717
steps:
18+
- name: Get token
19+
id: get_token
20+
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
21+
with:
22+
app_id: ${{ secrets.OBS_AUTOMATION_APP_ID }}
23+
private_key: ${{ secrets.OBS_AUTOMATION_APP_PEM }}
24+
permissions: >-
25+
{
26+
"members": "read"
27+
}
1828
- name: Add agent-python label
1929
uses: actions-ecosystem/action-add-labels@v1
2030
with:
2131
labels: agent-python
2232
- id: is_elastic_member
23-
uses: elastic/apm-pipeline-library/.github/actions/is-member-elastic-org@current
33+
uses: elastic/oblt-actions/github/is-member-of@v1
2434
with:
25-
username: ${{ github.actor }}
26-
token: ${{ secrets.APM_TECH_USER_TOKEN }}
35+
github-org: "elastic"
36+
github-user: ${{ github.actor }}
37+
github-token: ${{ steps.get_token.outputs.token }}
2738
- name: Add community and triage labels
28-
if: contains(steps.is_elastic_member.outputs.result, 'false') && github.actor != 'dependabot[bot]' && github.actor != 'apmmachine'
39+
if: contains(steps.is_elastic_member.outputs.result, 'false') && github.actor != 'dependabot[bot]' && github.actor != 'elastic-observability-automation[bot]'
2940
uses: actions-ecosystem/action-add-labels@v1
3041
with:
3142
labels: |

.github/workflows/microbenchmark.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
timeout-minutes: 5
2020
steps:
2121
- name: Run microbenchmark
22-
uses: elastic/oblt-actions/buildkite/run@v1.5.0
22+
uses: elastic/oblt-actions/buildkite/run@v1
2323
with:
2424
pipeline: "apm-agent-microbenchmark"
2525
token: ${{ secrets.BUILDKITE_TOKEN }}

.github/workflows/release.yml

+12-12
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- uses: actions/checkout@v4
2828
- uses: ./.github/actions/packages
2929
- name: generate build provenance
30-
uses: actions/attest-build-provenance@1c608d11d69870c2092266b3f9a6f3abbf17002c # v1.4.3
30+
uses: actions/attest-build-provenance@520d128f165991a6c774bcb264f323e3d70747f4 # v2.2.0
3131
with:
3232
subject-path: "${{ github.workspace }}/dist/*"
3333

@@ -47,12 +47,12 @@ jobs:
4747
path: dist
4848
- name: Upload pypi.org
4949
if: startsWith(github.ref, 'refs/tags')
50-
uses: pypa/gh-action-pypi-publish@0ab0b79471669eb3a4d647e625009c62f9f3b241
50+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
5151
with:
5252
repository-url: https://upload.pypi.org/legacy/
5353
- name: Upload test.pypi.org
5454
if: ${{ ! startsWith(github.ref, 'refs/tags') }}
55-
uses: pypa/gh-action-pypi-publish@0ab0b79471669eb3a4d647e625009c62f9f3b241
55+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
5656
with:
5757
repository-url: https://test.pypi.org/legacy/
5858

@@ -66,7 +66,7 @@ jobs:
6666
- uses: actions/checkout@v4
6767
- uses: ./.github/actions/build-distribution
6868
- name: generate build provenance
69-
uses: actions/attest-build-provenance@1c608d11d69870c2092266b3f9a6f3abbf17002c # v1.4.3
69+
uses: actions/attest-build-provenance@520d128f165991a6c774bcb264f323e3d70747f4 # v2.2.0
7070
with:
7171
subject-path: "${{ github.workspace }}/build/dist/elastic-apm-python-lambda-layer.zip"
7272

@@ -79,7 +79,7 @@ jobs:
7979
runs-on: ubuntu-latest
8080
steps:
8181
- uses: actions/checkout@v4
82-
- uses: actions/download-artifact@v3
82+
- uses: actions/download-artifact@v4
8383
with:
8484
name: build-distribution
8585
path: ./build
@@ -119,7 +119,7 @@ jobs:
119119
- uses: actions/checkout@v4
120120

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

124124
- name: Log in to the Elastic Container registry
125125
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
@@ -128,14 +128,14 @@ jobs:
128128
username: ${{ secrets.ELASTIC_DOCKER_USERNAME }}
129129
password: ${{ secrets.ELASTIC_DOCKER_PASSWORD }}
130130

131-
- uses: actions/download-artifact@v3
131+
- uses: actions/download-artifact@v4
132132
with:
133133
name: build-distribution
134134
path: ./build
135135

136136
- name: Extract metadata (tags, labels)
137137
id: docker-meta
138-
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
138+
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1
139139
with:
140140
images: ${{ env.DOCKER_IMAGE_NAME }}
141141
tags: |
@@ -146,7 +146,7 @@ jobs:
146146
147147
- name: Build and push image
148148
id: docker-push
149-
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0
149+
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6.13.0
150150
with:
151151
context: .
152152
platforms: linux/amd64,linux/arm64
@@ -158,7 +158,7 @@ jobs:
158158
AGENT_DIR=./build/dist/package/python
159159
160160
- name: generate build provenance (containers)
161-
uses: actions/attest-build-provenance@1c608d11d69870c2092266b3f9a6f3abbf17002c # v1.4.3
161+
uses: actions/attest-build-provenance@520d128f165991a6c774bcb264f323e3d70747f4 # v2.2.0
162162
with:
163163
subject-name: "${{ env.DOCKER_IMAGE_NAME }}"
164164
subject-digest: ${{ steps.docker-push.outputs.digest }}
@@ -196,9 +196,9 @@ jobs:
196196
- github-draft
197197
steps:
198198
- id: check
199-
uses: elastic/apm-pipeline-library/.github/actions/check-dependent-jobs@current
199+
uses: elastic/oblt-actions/check-dependent-jobs@v1
200200
with:
201-
needs: ${{ toJSON(needs) }}
201+
jobs: ${{ toJSON(needs) }}
202202
- if: startsWith(github.ref, 'refs/tags')
203203
uses: elastic/oblt-actions/slack/notify-result@v1
204204
with:

.github/workflows/run-matrix.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ jobs:
2828
LOCALSTACK_VOLUME_DIR: localstack_data
2929
- if: success() || failure()
3030
name: Upload JUnit Test Results
31-
uses: actions/upload-artifact@v3
31+
uses: actions/upload-artifact@v4
3232
with:
33-
name: test-results
33+
name: test-results-${{ matrix.framework }}-${{ matrix.version }}
3434
path: "**/*-python-agent-junit.xml"
3535
- if: success() || failure()
3636
name: Upload Coverage Reports
37-
uses: actions/upload-artifact@v3
37+
uses: actions/upload-artifact@v4
3838
with:
39-
name: coverage-reports
39+
name: coverage-reports-${{ matrix.framework }}-${{ matrix.version }}
4040
path: "**/.coverage*"
4141
include-hidden-files: true

.github/workflows/test-docs.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
ENDOFFILE
3737
- if: success() || failure()
3838
name: Upload JUnit Test Results
39-
uses: actions/upload-artifact@v3
39+
uses: actions/upload-artifact@v4
4040
with:
41-
name: test-results
41+
name: test-results-docs
4242
path: "docs-python-agent-junit.xml"

.github/workflows/test-reporter.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
report:
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: elastic/apm-pipeline-library/.github/actions/test-report@current
20+
- uses: elastic/oblt-actions/test-report@v1
2121
with:
22-
artifact: test-results
23-
name: JUnit Tests
22+
artifact: /test-results(.*)/
23+
name: 'Test Report $1'
2424
path: "**/*-python-agent-junit.xml"
2525
reporter: java-junit

.github/workflows/test.yml

+18-15
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ jobs:
5252
with:
5353
ref: ${{ inputs.ref || github.ref }}
5454
- id: generate
55-
uses: elastic/apm-pipeline-library/.github/actions/version-framework@current
55+
uses: elastic/oblt-actions/version-framework@v1
5656
with:
5757
# Use .ci/.matrix_python_full.yml if it's a scheduled workflow, otherwise use .ci/.matrix_python.yml
58-
versionsFile: .ci/.matrix_python${{ (github.event_name == 'schedule' || github.event_name == 'push' || inputs.full-matrix) && '_full' || '' }}.yml
58+
versions-file: .ci/.matrix_python${{ (github.event_name == 'schedule' || github.event_name == 'push' || inputs.full-matrix) && '_full' || '' }}.yml
5959
# Use .ci/.matrix_framework_full.yml if it's a scheduled workflow, otherwise use .ci/.matrix_framework.yml
60-
frameworksFile: .ci/.matrix_framework${{ (github.event_name == 'schedule' || github.event_name == 'push' || inputs.full-matrix) && '_full' || '' }}.yml
61-
excludedFile: .ci/.matrix_exclude.yml
60+
frameworks-file: .ci/.matrix_framework${{ (github.event_name == 'schedule' || github.event_name == 'push' || inputs.full-matrix) && '_full' || '' }}.yml
61+
excluded-file: .ci/.matrix_exclude.yml
6262
- name: Split matrix
6363
shell: python
6464
id: split
@@ -145,16 +145,18 @@ jobs:
145145
run: .\scripts\run-tests.bat
146146
- if: success() || failure()
147147
name: Upload JUnit Test Results
148-
uses: actions/upload-artifact@v3
148+
uses: actions/upload-artifact@v4
149149
with:
150-
name: test-results
150+
name: test-results-${{ matrix.framework }}-${{ matrix.version }}-asyncio-${{ matrix.asyncio }}
151151
path: "**/*-python-agent-junit.xml"
152+
retention-days: 1
152153
- if: success() || failure()
153154
name: Upload Coverage Reports
154-
uses: actions/upload-artifact@v3
155+
uses: actions/upload-artifact@v4
155156
with:
156-
name: coverage-reports
157+
name: coverage-reports-${{ matrix.framework }}-${{ matrix.version }}-asyncio-${{ matrix.asyncio }}
157158
path: "**/.coverage*"
159+
retention-days: 1
158160
# This job is here to have a single status check that can be set as required.
159161
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idneeds
160162
# If a run contains a series of jobs that need each other, a failure applies to all jobs in the dependency chain from the point of failure onwards.
@@ -169,10 +171,10 @@ jobs:
169171
- windows
170172
steps:
171173
- id: check
172-
uses: elastic/apm-pipeline-library/.github/actions/check-dependent-jobs@current
174+
uses: elastic/oblt-actions/check-dependent-jobs@v1
173175
with:
174-
needs: ${{ toJSON(needs) }}
175-
- run: ${{ steps.check.outputs.isSuccess }}
176+
jobs: ${{ toJSON(needs) }}
177+
- run: ${{ steps.check.outputs.is-success }}
176178
- if: failure() && (github.event_name == 'schedule' || github.event_name == 'push')
177179
uses: elastic/oblt-actions/slack/notify-result@v1
178180
with:
@@ -197,9 +199,10 @@ jobs:
197199

198200
- run: python -Im pip install --upgrade coverage[toml]
199201

200-
- uses: actions/download-artifact@v3
202+
- uses: actions/download-artifact@v4
201203
with:
202-
name: coverage-reports
204+
pattern: coverage-reports-*
205+
merge-multiple: true
203206

204207
- name: Combine coverage & fail if it's <84%.
205208
run: |
@@ -217,6 +220,6 @@ jobs:
217220
with:
218221
name: html-coverage-report
219222
path: htmlcov
220-
- uses: geekyeggo/delete-artifact@f275313e70c08f6120db482d7a6b98377786765b
223+
- uses: geekyeggo/delete-artifact@f275313e70c08f6120db482d7a6b98377786765b # 5.1.0
221224
with:
222-
name: coverage-reports
225+
name: coverage-reports-*

.github/workflows/updatecli.yml

+2
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,14 @@ jobs:
3838
- uses: elastic/oblt-actions/updatecli/run@v1
3939
with:
4040
command: --experimental compose diff
41+
version-file: .tool-versions
4142
env:
4243
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}
4344

4445
- uses: elastic/oblt-actions/updatecli/run@v1
4546
with:
4647
command: --experimental compose apply
48+
version-file: .tool-versions
4749
env:
4850
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}
4951

.tool-versions

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
updatecli v0.93.0

Dockerfile.wolfi

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
FROM docker.elastic.co/wolfi/chainguard-base:latest@sha256:c16d3ad6cebf387e8dd2ad769f54320c4819fbbaa21e729fad087c7ae223b4d0
1+
FROM docker.elastic.co/wolfi/chainguard-base:latest@sha256:bd401704a162a7937cd1015f755ca9da9aba0fdf967fc6bf90bf8d3f6b2eb557
22
ARG AGENT_DIR
33
COPY ${AGENT_DIR} /opt/python

dev-utils/make-packages.sh

+4-8
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,10 @@
33
# Make a Python APM agent distribution
44
#
55

6-
echo "::group::Install wheel"
7-
pip install --user wheel
6+
echo "::group::Install build"
7+
pip install --user build
88
echo "::endgroup::"
99

10-
echo "::group::Building universal wheel"
11-
python setup.py bdist_wheel
12-
echo "::endgroup::"
13-
14-
echo "::group::Building source distribution"
15-
python setup.py sdist
10+
echo "::group::Building packages"
11+
python -m build
1612
echo "::endgroup::"

dev-utils/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# These are the pinned requirements for the lambda layer/docker image
2-
certifi==2024.8.30
2+
certifi==2024.12.14
33
urllib3==1.26.20
44
wrapt==1.14.1

0 commit comments

Comments
 (0)