Skip to content

Commit 6a97c7f

Browse files
authored
Merge pull request #1187 from newrelic/dev
Release 12.6
2 parents 50d26d9 + 5cef267 commit 6a97c7f

75 files changed

Lines changed: 3354 additions & 2506 deletions

File tree

Some content is hidden

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

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: monthly
7+
commit-message:
8+
prefix: "chore(deps):"
9+
groups:
10+
github-actions:
11+
patterns:
12+
- "*"

.github/workflows/code-coverage-baseline.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ jobs:
3232
arch: [amd64]
3333
steps:
3434
- name: Checkout newrelic-php-agent code
35-
uses: actions/checkout@v4
35+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
3636
with:
3737
path: php-agent
3838
repository: ${{ inputs.origin }}/newrelic-php-agent
3939
ref: ${{ inputs.ref }}
4040
- name: Login to Docker Hub
41-
uses: docker/login-action@v3
41+
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # 4.0.0
4242
with:
4343
username: ${{ secrets.DOCKERHUB_USERNAME }}
4444
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -55,7 +55,7 @@ jobs:
5555
-v "${GITHUB_WORKSPACE}/php-agent":"/usr/local/src/newrelic-php-agent"
5656
$IMAGE_NAME:$IMAGE_TAG-${{ matrix.platform }}-$IMAGE_VERSION daemon_test
5757
- name: Save integration_runner for integration tests
58-
uses: actions/upload-artifact@v4
58+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # 7.0.0
5959
with:
6060
name: integration_runner-${{matrix.platform}}-${{matrix.arch}}
6161
path: php-agent/bin/integration_runner
@@ -77,13 +77,13 @@ jobs:
7777
codecov: 1
7878
steps:
7979
- name: Checkout Repo
80-
uses: actions/checkout@v4
80+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
8181
with:
8282
path: php-agent
8383
repository: ${{ inputs.origin }}/newrelic-php-agent
8484
ref: ${{ inputs.ref }}
8585
- name: Login to Docker Hub
86-
uses: docker/login-action@v3
86+
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # 4.0.0
8787
with:
8888
username: ${{ secrets.DOCKERHUB_USERNAME }}
8989
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -124,19 +124,19 @@ jobs:
124124
-e ENABLE_COVERAGE=${{matrix.codecov}}
125125
$IMAGE_NAME:$IMAGE_TAG-${{matrix.php}}-${{matrix.platform}}-$IMAGE_VERSION make agent-check
126126
- name: Save newrelic.so for integration tests
127-
uses: actions/upload-artifact@v4
127+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # 7.0.0
128128
with:
129129
name: newrelic.so-${{matrix.platform}}-${{matrix.arch}}-${{matrix.php}}
130130
path: php-agent/agent/modules/newrelic.so
131131
- name: Save axiom gcov data files (*.gcno, *.gcna)
132132
if: ${{ matrix.codecov == 1 }}
133-
uses: actions/upload-artifact@v4
133+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # 7.0.0
134134
with:
135135
name: axiom.gcov-${{matrix.platform}}-${{matrix.arch}}-${{matrix.php}}
136136
path: php-agent/axiom/*.gc*
137137
- name: Save agent gcov data files (*.gcno, *.gcna)
138138
if: ${{ matrix.codecov == 1 }}
139-
uses: actions/upload-artifact@v4
139+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # 7.0.0
140140
with:
141141
name: agent.gcov-${{matrix.platform}}-${{matrix.arch}}-${{matrix.php}}
142142
path: php-agent/agent/.libs/*.gc*
@@ -155,30 +155,30 @@ jobs:
155155
codecov: 1
156156
steps:
157157
- name: Checkout integration tests
158-
uses: actions/checkout@v4
158+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
159159
with:
160160
path: php-agent
161161
repository: ${{ inputs.origin }}/newrelic-php-agent
162162
ref: ${{ inputs.ref }}
163163
- name: Get integration_runner
164-
uses: actions/download-artifact@v4
164+
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # 8.0.0
165165
with:
166166
name: integration_runner-${{matrix.platform}}-${{matrix.arch}}
167167
path: php-agent/bin
168168
- name: Get newrelic.so
169-
uses: actions/download-artifact@v4
169+
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # 8.0.0
170170
with:
171171
name: newrelic.so-${{matrix.platform}}-${{matrix.arch}}-${{matrix.php}}
172172
path: php-agent/agent/modules
173173
- name: Get axiom gcov data files
174174
if: ${{ matrix.codecov == 1 }}
175-
uses: actions/download-artifact@v4
175+
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # 8.0.0
176176
with:
177177
name: axiom.gcov-${{matrix.platform}}-${{matrix.arch}}-${{matrix.php}}
178178
path: php-agent/axiom
179179
- name: Get agent gcov data files
180180
if: ${{ matrix.codecov == 1 }}
181-
uses: actions/download-artifact@v4
181+
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # 8.0.0
182182
with:
183183
name: agent.gcov-${{matrix.platform}}-${{matrix.arch}}-${{matrix.php}}
184184
path: php-agent/agent/.libs
@@ -187,7 +187,7 @@ jobs:
187187
chmod 755 php-agent/bin/integration_runner
188188
chmod 755 php-agent/agent/modules/newrelic.so
189189
- name: Login to Docker Hub
190-
uses: docker/login-action@v3
190+
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # 4.0.0
191191
with:
192192
username: ${{ secrets.DOCKERHUB_USERNAME }}
193193
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -250,7 +250,7 @@ jobs:
250250
echo "COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
251251
- name: Upload coverage reports to Codecov
252252
if: ${{ matrix.codecov == 1 }}
253-
uses: codecov/codecov-action@v3.1.5
253+
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # 5.5.2
254254
with:
255255
token: ${{ secrets.CODECOV_TOKEN }}
256256
working-directory: ./php-agent

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ jobs:
3434

3535
steps:
3636
- name: Checkout repository
37-
uses: actions/checkout@v4
37+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
3838

3939
# Initializes the CodeQL tools for scanning.
4040
- name: Initialize CodeQL
41-
uses: github/codeql-action/init@v3
41+
uses: github/codeql-action/init@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
4242
with:
4343
languages: ${{ matrix.language }}
4444
build-mode: manual
@@ -63,6 +63,6 @@ jobs:
6363
make ${{ matrix.language == 'go' && 'daemon' || 'agent' }}
6464
6565
- name: Perform CodeQL Analysis
66-
uses: github/codeql-action/analyze@v3
66+
uses: github/codeql-action/analyze@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
6767
with:
6868
category: "/language:${{matrix.language}}"
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: _get-php-versions
2+
3+
permissions: {}
4+
5+
on:
6+
workflow_call:
7+
inputs:
8+
arch:
9+
description: 'Target architecture (amd64, arm64)'
10+
required: true
11+
type: string
12+
outputs:
13+
php-versions:
14+
description: 'JSON array of supported PHP versions for the given architecture'
15+
value: ${{ jobs.get-php-versions.outputs.php-versions }}
16+
17+
jobs:
18+
get-php-versions:
19+
runs-on: ubuntu-latest
20+
outputs:
21+
php-versions: ${{ steps.get-php-versions.outputs.php-versions }}
22+
steps:
23+
- name: Checkout php_versions.mk
24+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
25+
with:
26+
sparse-checkout: make/php_versions.mk
27+
path: php-agent
28+
- name: Get PHP versions
29+
id: get-php-versions
30+
env:
31+
ARCH: ${{ inputs.arch }}
32+
run: |
33+
json=$(make -f php-agent/make/php_versions.mk php-versions-json ARCH=$ARCH)
34+
echo "php-versions=$json" >> $GITHUB_OUTPUT

.github/workflows/make-agent.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: _make-agent
22

3+
permissions: {}
4+
35
on:
46
workflow_call:
57
inputs:
@@ -22,7 +24,12 @@ on:
2224
type: string
2325

2426
jobs:
27+
get-php-versions:
28+
uses: ./.github/workflows/get-php-versions.yml
29+
with:
30+
arch: ${{ inputs.arch }}
2531
build-agent:
32+
needs: [get-php-versions]
2633
name: make agent (${{ matrix.platform }}, ${{ inputs.arch }}, ${{ matrix.php }})
2734
runs-on: ${{inputs.runs-on}}
2835
env:
@@ -32,16 +39,16 @@ jobs:
3239
strategy:
3340
matrix:
3441
platform: [gnu, musl]
35-
php: ['8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
42+
php: ${{ fromJson(needs.get-php-versions.outputs.php-versions) }}
3643
steps:
3744
- name: Checkout Repo
38-
uses: actions/checkout@v4
45+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
3946
with:
4047
path: php-agent
4148
repository: ${{ inputs.origin }}/newrelic-php-agent
4249
ref: ${{ inputs.ref }}
4350
- name: Login to Docker Hub
44-
uses: docker/login-action@v3
51+
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # 4.0.0
4552
with:
4653
username: ${{ secrets.DOCKERHUB_USERNAME }}
4754
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -56,7 +63,7 @@ jobs:
5663
-v "${GITHUB_WORKSPACE}/php-agent":"/usr/local/src/newrelic-php-agent"
5764
$IMAGE_NAME:$IMAGE_TAG-${{matrix.php}}-${{matrix.platform}}-$IMAGE_VERSION make agent
5865
- name: Save newrelic.so for integration tests
59-
uses: actions/upload-artifact@v4
66+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # 7.0.0
6067
with:
6168
name: newrelic.so-${{matrix.platform}}-${{inputs.arch}}-${{matrix.php}}
6269
path: php-agent/agent/modules/newrelic.so

.github/workflows/make-for-platform-on-arch.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,19 @@ jobs:
5454
platform: [gnu, musl]
5555
steps:
5656
- name: Checkout newrelic-php-agent code
57-
uses: actions/checkout@v4
57+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
5858
with:
5959
path: php-agent
6060
repository: ${{ inputs.origin }}/newrelic-php-agent
6161
ref: ${{ inputs.ref }}
6262
- name: Enable arm64 emulation
6363
if: ${{ inputs.arch == 'arm64' }}
64-
uses: docker/setup-qemu-action@v3
64+
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # 4.0.0
6565
with:
6666
image: tonistiigi/binfmt:${{vars.BINFMT_IMAGE_VERSION}}
6767
platforms: arm64
6868
- name: Login to Docker Hub
69-
uses: docker/login-action@v3
69+
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # 4.0.0
7070
with:
7171
username: ${{ secrets.DOCKERHUB_USERNAME }}
7272
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -78,7 +78,7 @@ jobs:
7878
-e APP_supportability=${{secrets.APP_SUPPORTABILITY}}
7979
$IMAGE_NAME:$IMAGE_TAG-${{ matrix.platform }}-$IMAGE_VERSION ${{inputs.make-target}}
8080
- name: Save ${{inputs.make-target}} artifact
81-
uses: actions/upload-artifact@v4
81+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # 7.0.0
8282
with:
8383
name: ${{inputs.artifact-name}}-${{matrix.platform}}-${{inputs.arch}}
8484
path: php-agent/${{ inputs.artifact-pattern }}

.github/workflows/make-integration-tests.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: _make-integration-tests
22

3+
permissions: {}
4+
35
on:
46
workflow_call:
57
inputs:
@@ -30,29 +32,34 @@ on:
3032
type: boolean
3133

3234
jobs:
35+
get-php-versions:
36+
uses: ./.github/workflows/get-php-versions.yml
37+
with:
38+
arch: ${{ inputs.arch }}
3339
test-agent:
40+
needs: [get-php-versions]
3441
name: test agent (${{ matrix.platform }}, ${{ inputs.arch }}, ${{ matrix.php }})
3542
runs-on: ${{inputs.runs-on}}
3643
continue-on-error: ${{inputs.continue-on-error}}
3744
strategy:
3845
fail-fast: true
3946
matrix:
4047
platform: [gnu, musl]
41-
php: ['8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
48+
php: ${{ fromJson(needs.get-php-versions.outputs.php-versions) }}
4249
steps:
4350
- name: Checkout integration tests
44-
uses: actions/checkout@v4
51+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
4552
with:
4653
path: php-agent
4754
repository: ${{ inputs.origin }}/newrelic-php-agent
4855
ref: ${{ inputs.ref }}
4956
- name: Get integration_runner
50-
uses: actions/download-artifact@v4
57+
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # 8.0.0
5158
with:
5259
name: integration_runner-${{matrix.platform}}-${{inputs.arch}}
5360
path: php-agent/bin
5461
- name: Get newrelic.so
55-
uses: actions/download-artifact@v4
62+
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # 8.0.0
5663
with:
5764
name: newrelic.so-${{matrix.platform}}-${{inputs.arch}}-${{matrix.php}}
5865
path: php-agent/agent/modules
@@ -61,10 +68,16 @@ jobs:
6168
chmod 755 php-agent/bin/integration_runner
6269
chmod 755 php-agent/agent/modules/newrelic.so
6370
- name: Login to Docker Hub
64-
uses: docker/login-action@v3
71+
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # 4.0.0
6572
with:
6673
username: ${{ secrets.DOCKERHUB_USERNAME }}
6774
password: ${{ secrets.DOCKERHUB_TOKEN }}
75+
- name: Enable amd64 emulation
76+
if: ${{ inputs.arch == 'arm64' }}
77+
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # 4.0.0
78+
with:
79+
image: tonistiigi/binfmt:${{vars.BINFMT_IMAGE_VERSION}}
80+
platforms: amd64
6881
- name: Start services
6982
env:
7083
PHP: ${{matrix.php}}
@@ -81,7 +94,7 @@ jobs:
8194
run: |
8295
docker exec \
8396
-e PHPS=${{matrix.php}} \
84-
-e INTEGRATION_ARGS="-license ${{secrets.NR_TEST_LICENSE}} -collector ${{secrets.NR_COLLECTOR_HOST}} -agent agent/modules/newrelic.so ${{ inputs.use-valgrind && '-valgrind /usr/bin/valgrind' }}" \
97+
-e INTEGRATION_ARGS="-license ${{secrets.NR_TEST_LICENSE}} -collector ${{secrets.NR_COLLECTOR_HOST}} -agent agent/modules/newrelic.so ${{ inputs.use-valgrind && '-valgrind /usr/bin/valgrind' || '' }}" \
8598
-e APP_supportability=${{secrets.APP_SUPPORTABILITY}} \
8699
-e ACCOUNT_supportability=${{secrets.ACCOUNT_SUPPORTABILITY}} \
87100
-e ACCOUNT_supportability_trusted=${{secrets.ACCOUNT_SUPPORTABILITY_TRUSTED}} \

.github/workflows/release-build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ jobs:
3535
arch: [amd64]
3636
steps:
3737
- name: Checkout newrelic-php-agent code
38-
uses: actions/checkout@v4
38+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
3939
with:
4040
ref: ${{ github.event.client_payload.ref }}
4141
path: newrelic-php-agent
4242
- name: Login to Docker Hub
43-
uses: docker/login-action@v3
43+
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # 4.0.0
4444
with:
4545
username: ${{ secrets.DOCKERHUB_USERNAME }}
4646
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -52,7 +52,7 @@ jobs:
5252
-e BUILD_NUMBER=${{inputs.build-number}}
5353
$IMAGE_NAME:$IMAGE_TAG-${{ matrix.platform }}-$IMAGE_VERSION release-daemon
5454
- name: Save build artifacts
55-
uses: actions/upload-artifact@v4
55+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # 7.0.0
5656
with:
5757
path: newrelic-php-agent/releases
5858
name: release-from-gha-${{ matrix.platform }}-${{ matrix.arch }}
@@ -69,12 +69,12 @@ jobs:
6969
arch: [amd64]
7070
steps:
7171
- name: Checkout Repo
72-
uses: actions/checkout@v4
72+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
7373
with:
7474
ref: ${{ github.event.client_payload.ref }}
7575
path: newrelic-php-agent
7676
- name: Login to Docker Hub
77-
uses: docker/login-action@v3
77+
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # 4.0.0
7878
with:
7979
username: ${{ secrets.DOCKERHUB_USERNAME }}
8080
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -87,7 +87,7 @@ jobs:
8787
-e BUILD_NUMBER=${{inputs.build-number}}
8888
$IMAGE_NAME:agent-builder-php${{matrix.php_ver}}-${{matrix.platform}}-$IMAGE_VERSION release-${{matrix.php_ver}}-gha
8989
- name: Save build artifacts
90-
uses: actions/upload-artifact@v4
90+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # 7.0.0
9191
with:
9292
path: newrelic-php-agent/releases
9393
name: release-from-gha-${{ matrix.platform }}-${{ matrix.arch }}

0 commit comments

Comments
 (0)