Skip to content

Commit a2e66bb

Browse files
TimPansinolrafeeidependabot[bot]mergify[bot]
authored
Merge main into develop-strands (#1585)
* Skip hypercorn tests for v0.18 (#1579) * Skip hypercorn tests for v0.18 * Remove tornadomaster for 3.14 * Fix instability in CI caused by health check tests (#1584) * Bump the github_actions group across 1 directory with 5 updates (#1582) Bumps the github_actions group with 5 updates in the / directory: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `5.0.0` | `5.0.1` | | [docker/metadata-action](https://github.com/docker/metadata-action) | `5.8.0` | `5.9.0` | | [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) | `3.6.0` | `3.7.0` | | [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) | `7.1.2` | `7.1.3` | | [github/codeql-action](https://github.com/github/codeql-action) | `4.31.2` | `4.31.3` | Updates `actions/checkout` from 5.0.0 to 5.0.1 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@08c6903...93cb6ef) Updates `docker/metadata-action` from 5.8.0 to 5.9.0 - [Release notes](https://github.com/docker/metadata-action/releases) - [Commits](docker/metadata-action@c1e5197...318604b) Updates `docker/setup-qemu-action` from 3.6.0 to 3.7.0 - [Release notes](https://github.com/docker/setup-qemu-action/releases) - [Commits](docker/setup-qemu-action@2910929...c7c5346) Updates `astral-sh/setup-uv` from 7.1.2 to 7.1.3 - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](astral-sh/setup-uv@8585678...5a7eac6) Updates `github/codeql-action` from 4.31.2 to 4.31.3 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@0499de3...014f16e) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 5.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github_actions - dependency-name: docker/metadata-action dependency-version: 5.9.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github_actions - dependency-name: docker/setup-qemu-action dependency-version: 3.7.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github_actions - dependency-name: astral-sh/setup-uv dependency-version: 7.1.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github_actions - dependency-name: github/codeql-action dependency-version: 4.31.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github_actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2 parents e3b9106 + 0058126 commit a2e66bb

32 files changed

+1135
-717
lines changed

.github/workflows/addlicense.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
permissions:
4040
contents: read
4141
steps:
42-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
42+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
4343

4444
- name: Fetch git tags
4545
run: |

.github/workflows/benchmarks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
BASE_SHA: ${{ github.event.pull_request.base.sha }}
3939

4040
steps:
41-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
41+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
4242
with:
4343
fetch-depth: 0
4444

.github/workflows/build-ci-image.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
name: Docker Build ${{ matrix.platform }}
4444

4545
steps:
46-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
46+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
4747
with:
4848
persist-credentials: false
4949
fetch-depth: 0
@@ -60,7 +60,7 @@ jobs:
6060
6161
- name: Generate Docker Metadata (Tags and Labels)
6262
id: meta
63-
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # 5.8.0
63+
uses: docker/metadata-action@318604b99e75e41977312d83839a89be02ca4893 # 5.9.0
6464
with:
6565
images: ghcr.io/${{ steps.image-name.outputs.IMAGE_NAME }}
6666
flavor: |
@@ -139,7 +139,7 @@ jobs:
139139
140140
- name: Generate Docker Metadata (Tags and Labels)
141141
id: meta
142-
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # 5.8.0
142+
uses: docker/metadata-action@318604b99e75e41977312d83839a89be02ca4893 # 5.9.0
143143
with:
144144
images: ghcr.io/${{ steps.image-name.outputs.IMAGE_NAME }}
145145
flavor: |

.github/workflows/deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ jobs:
6969
runs-on: ${{ matrix.os }}
7070

7171
steps:
72-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
72+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
7373
with:
7474
persist-credentials: false
7575
fetch-depth: 0
7676

7777
- name: Setup QEMU
7878
if: runner.os == 'Linux'
79-
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # 3.6.0
79+
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # 3.7.0
8080
with:
8181
platforms: arm64
8282

@@ -109,7 +109,7 @@ jobs:
109109
runs-on: ubuntu-24.04
110110

111111
steps:
112-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
112+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
113113
with:
114114
persist-credentials: false
115115
fetch-depth: 0

.github/workflows/mega-linter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
steps:
4646
# Git Checkout
4747
- name: Checkout Code
48-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
48+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
4949
with:
5050
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
5151
fetch-depth: 0 # Required for pushing commits to PRs

.github/workflows/tests.yml

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
- tests
9494

9595
steps:
96-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
96+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
9797
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # 6.0.0
9898
with:
9999
python-version: "3.13"
@@ -127,7 +127,7 @@ jobs:
127127
- tests
128128

129129
steps:
130-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
130+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
131131
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # 6.0.0
132132
with:
133133
python-version: "3.13"
@@ -166,7 +166,7 @@ jobs:
166166
--add-host=host.docker.internal:host-gateway
167167
timeout-minutes: 30
168168
steps:
169-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
169+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
170170

171171
- name: Fetch git tags
172172
run: |
@@ -231,7 +231,7 @@ jobs:
231231
--add-host=host.docker.internal:host-gateway
232232
timeout-minutes: 30
233233
steps:
234-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
234+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
235235

236236
- name: Fetch git tags
237237
run: |
@@ -294,14 +294,14 @@ jobs:
294294
runs-on: windows-2025
295295
timeout-minutes: 30
296296
steps:
297-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
297+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
298298

299299
- name: Fetch git tags
300300
run: |
301301
git fetch --tags origin
302302
303303
- name: Install uv
304-
uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # 7.1.2
304+
uses: astral-sh/setup-uv@5a7eac68fb9809dea845d802897dc5c723910fa3 # 7.1.3
305305

306306
- name: Install Python
307307
run: |
@@ -363,14 +363,14 @@ jobs:
363363
runs-on: windows-11-arm
364364
timeout-minutes: 30
365365
steps:
366-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
366+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
367367

368368
- name: Fetch git tags
369369
run: |
370370
git fetch --tags origin
371371
372372
- name: Install uv
373-
uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # 7.1.2
373+
uses: astral-sh/setup-uv@5a7eac68fb9809dea845d802897dc5c723910fa3 # 7.1.3
374374

375375
- name: Install Python
376376
run: |
@@ -443,7 +443,7 @@ jobs:
443443
--add-host=host.docker.internal:host-gateway
444444
timeout-minutes: 30
445445
steps:
446-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
446+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
447447

448448
- name: Fetch git tags
449449
run: |
@@ -526,7 +526,7 @@ jobs:
526526
--health-retries 10
527527
528528
steps:
529-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
529+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
530530

531531
- name: Fetch git tags
532532
run: |
@@ -606,7 +606,7 @@ jobs:
606606
--health-retries 5
607607
608608
steps:
609-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
609+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
610610

611611
- name: Fetch git tags
612612
run: |
@@ -687,7 +687,7 @@ jobs:
687687
--health-retries 5
688688
689689
steps:
690-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
690+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
691691

692692
- name: Fetch git tags
693693
run: |
@@ -772,7 +772,7 @@ jobs:
772772
# from every being executed as bash commands.
773773

774774
steps:
775-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
775+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
776776

777777
- name: Fetch git tags
778778
run: |
@@ -837,7 +837,7 @@ jobs:
837837
--add-host=host.docker.internal:host-gateway
838838
timeout-minutes: 30
839839
steps:
840-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
840+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
841841

842842
- name: Fetch git tags
843843
run: |
@@ -927,7 +927,7 @@ jobs:
927927
KAFKA_CFG_INTER_BROKER_LISTENER_NAME: L3
928928

929929
steps:
930-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
930+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
931931

932932
- name: Fetch git tags
933933
run: |
@@ -1005,7 +1005,7 @@ jobs:
10051005
--health-retries 5
10061006
10071007
steps:
1008-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
1008+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
10091009

10101010
- name: Fetch git tags
10111011
run: |
@@ -1083,7 +1083,7 @@ jobs:
10831083
--health-retries 5
10841084
10851085
steps:
1086-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
1086+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
10871087

10881088
- name: Fetch git tags
10891089
run: |
@@ -1161,7 +1161,7 @@ jobs:
11611161
--health-retries 5
11621162
11631163
steps:
1164-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
1164+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
11651165

11661166
- name: Fetch git tags
11671167
run: |
@@ -1244,7 +1244,7 @@ jobs:
12441244
--health-retries 5
12451245
12461246
steps:
1247-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
1247+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
12481248

12491249
- name: Fetch git tags
12501250
run: |
@@ -1327,7 +1327,7 @@ jobs:
13271327
--health-retries 5
13281328
13291329
steps:
1330-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
1330+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
13311331

13321332
- name: Fetch git tags
13331333
run: |
@@ -1406,7 +1406,7 @@ jobs:
14061406
--health-retries 5
14071407
14081408
steps:
1409-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
1409+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
14101410

14111411
- name: Fetch git tags
14121412
run: |
@@ -1487,7 +1487,7 @@ jobs:
14871487
--health-retries 5
14881488
14891489
steps:
1490-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
1490+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
14911491

14921492
- name: Fetch git tags
14931493
run: |
@@ -1567,7 +1567,7 @@ jobs:
15671567
--health-retries 5
15681568
15691569
steps:
1570-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
1570+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
15711571

15721572
- name: Fetch git tags
15731573
run: |
@@ -1647,7 +1647,7 @@ jobs:
16471647
--health-retries 5
16481648
16491649
steps:
1650-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
1650+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
16511651

16521652
- name: Fetch git tags
16531653
run: |
@@ -1726,7 +1726,7 @@ jobs:
17261726
--health-retries 5
17271727
17281728
steps:
1729-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
1729+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
17301730

17311731
- name: Fetch git tags
17321732
run: |
@@ -1804,7 +1804,7 @@ jobs:
18041804
--health-retries 5
18051805
18061806
steps:
1807-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
1807+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
18081808

18091809
- name: Fetch git tags
18101810
run: |
@@ -1923,7 +1923,7 @@ jobs:
19231923
--add-host=host.docker.internal:host-gateway
19241924
19251925
steps:
1926-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
1926+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
19271927

19281928
- name: Fetch git tags
19291929
run: |
@@ -2003,7 +2003,7 @@ jobs:
20032003
--health-retries 5
20042004
20052005
steps:
2006-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
2006+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
20072007

20082008
- name: Fetch git tags
20092009
run: |
@@ -2081,7 +2081,7 @@ jobs:
20812081
--health-retries 5
20822082
20832083
steps:
2084-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
2084+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
20852085

20862086
- name: Fetch git tags
20872087
run: |

.github/workflows/trivy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
steps:
3333
# Git Checkout
3434
- name: Checkout Code
35-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
35+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # 5.0.1
3636
with:
3737
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
3838
fetch-depth: 0
@@ -61,6 +61,6 @@ jobs:
6161

6262
- name: Upload Trivy scan results to GitHub Security tab
6363
if: ${{ github.event_name == 'schedule' }}
64-
uses: github/codeql-action/upload-sarif@0499de31b99561a6d14a36a5f662c2a54f91beee # 4.31.2
64+
uses: github/codeql-action/upload-sarif@014f16e7ab1402f30e7c3329d33797e7948572db # 4.31.3
6565
with:
6666
sarif_file: "trivy-results.sarif"

newrelic/api/asgi_application.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,20 @@ async def send_inject_browser_agent(self, message):
132132

133133
message_type = message["type"]
134134
if message_type == "http.response.start" and not self.initial_message:
135-
headers = list(message.get("headers", ()))
135+
# message["headers"] may be a generator, and consuming it via process_response will leave the original
136+
# application with no headers. Fix this by preserving them in a list before consuming them.
137+
if "headers" in message:
138+
message["headers"] = headers = list(message["headers"])
139+
else:
140+
headers = []
141+
142+
# Check if we should insert the HTML snippet based on the headers.
143+
# Currently if there are no headers this will always be False, but call the function
144+
# anyway in case this logic changes in the future.
136145
if not self.should_insert_html(headers):
137146
await self.abort()
138147
return
148+
139149
message["headers"] = headers
140150
self.initial_message = message
141151
elif message_type == "http.response.body" and self.initial_message:
@@ -232,7 +242,13 @@ async def send(self, event):
232242
finally:
233243
self.__exit__(*sys.exc_info())
234244
elif event["type"] == "http.response.start":
235-
self.process_response(event["status"], event.get("headers", ()))
245+
# event["headers"] may be a generator, and consuming it via process_response will leave the original
246+
# ASGI application with no headers. Fix this by preserving them in a list before consuming them.
247+
if "headers" in event:
248+
event["headers"] = headers = list(event["headers"])
249+
else:
250+
headers = []
251+
self.process_response(event["status"], headers)
236252
return await self._send(event)
237253

238254

0 commit comments

Comments
 (0)