Skip to content

Commit bdc1f50

Browse files
authored
update 4.x from main for v4.5.1 docs build (#3967)
1 parent 587e98d commit bdc1f50

Some content is hidden

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

44 files changed

+994
-982
lines changed

.ci/docker/docker-compose-all.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,5 @@ volumes:
8484
driver: local
8585
nodekafkadata:
8686
driver: local
87+
nodezookeeperdata:
88+
driver: local

.ci/docker/docker-compose-edge.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ services:
4141
extends:
4242
file: docker-compose.yml
4343
service: kafka
44+
zookeeper:
45+
extends:
46+
file: docker-compose.yml
47+
service: zookeeper
4448
node_tests:
4549
extends:
4650
file: docker-compose-node-edge-test.yml
@@ -84,3 +88,5 @@ volumes:
8488
driver: local
8589
nodekafkadata:
8690
driver: local
91+
nodezookeeperdata:
92+
driver: local

.ci/docker/docker-compose-kafka.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@ services:
1616
file: docker-compose-node-test.yml
1717
service: node_tests
1818
depends_on:
19-
- kafka
20-
# TODO: uncomment this if health_check is necessary
21-
# kafka:
22-
# condition: service_healthy
19+
kafka:
20+
condition: service_healthy
2321

2422
volumes:
2523
nodekafkadata:

.ci/docker/docker-compose.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ services:
3232

3333
mssql:
3434
image: mcr.microsoft.com/mssql/server
35+
platform: linux/amd64
3536
environment:
3637
- ACCEPT_EULA=Y
3738
- SA_PASSWORD=Very(!)Secure
@@ -149,6 +150,13 @@ services:
149150
- nodezookeeperdata:/bitnami
150151
environment:
151152
- ALLOW_ANONYMOUS_LOGIN=yes
153+
healthcheck:
154+
# Using 'srvr' instead of the more common 'ruok' because this bitnami
155+
# image does not have 'ruok' on the '4lw.commands.whitelist' in zoo.cfg.
156+
test: ["CMD-SHELL", "echo srvr | nc -w 2 localhost 2181"]
157+
interval: 5s
158+
timeout: 5s
159+
retries: 5
152160

153161
kafka:
154162
# https://hub.docker.com/r/bitnami/kafka/tags
@@ -168,14 +176,12 @@ services:
168176
- KAFKA_CFG_DELETE_TOPIC_ENABLE=true
169177
depends_on:
170178
- zookeeper
171-
# TODO: maybe not necessary but figure out how to do this
172179
healthcheck:
173-
# use netcat to check tcp connection available
174-
# test: nc -z localhost 9093 || exit -1
175-
# start_period: 15s
176-
# interval: 5s
177-
# timeout: 10s
178-
# retries: 5
180+
# Kafka healthcheck ideas from https://github.com/wurstmeister/kafka-docker/issues/167
181+
test: kafka-cluster.sh cluster-id --bootstrap-server localhost:9092 || exit 1
182+
interval: 30s
183+
timeout: 10s
184+
retries: 5
179185

180186
volumes:
181187
nodepgdata:

.eslintrc.json

Lines changed: 0 additions & 111 deletions
This file was deleted.

.github/workflows/labeler.yml

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,30 @@ on:
55
pull_request_target:
66
types: [opened]
77

8-
# 'issues: write' for https://docs.github.com/en/rest/issues/labels?apiVersion=2022-11-28#add-labels-to-an-issue
8+
# '*: write' permissions for https://docs.github.com/en/rest/issues/labels?apiVersion=2022-11-28#add-labels-to-an-issue
99
permissions:
1010
contents: read
1111
issues: write
12+
pull-requests: write
1213

1314
jobs:
1415
triage:
1516
runs-on: ubuntu-latest
1617
steps:
17-
- name: Add agent-nodejs label
18-
uses: actions-ecosystem/action-add-labels@v1
19-
with:
20-
labels: agent-nodejs
21-
22-
- name: Check team membership for user
23-
uses: elastic/[email protected]
24-
id: checkUserMember
18+
- id: is_elastic_member
19+
uses: elastic/apm-pipeline-library/.github/actions/is-member-elastic-org@current
2520
with:
2621
username: ${{ github.actor }}
27-
team: 'apm'
28-
usernamesToExclude: |
29-
apmmachine
30-
dependabot
31-
dependabot[bot]
32-
GITHUB_TOKEN: ${{ secrets.APM_TECH_USER_TOKEN }}
22+
token: ${{ secrets.APM_TECH_USER_TOKEN }}
3323

3424
- name: Add community and triage labels
35-
if: steps.checkUserMember.outputs.isTeamMember != 'true' && steps.checkUserMember.outputs.isExcluded != 'true'
36-
uses: actions-ecosystem/action-add-labels@v1
25+
if: contains(steps.is_elastic_member.outputs.result, 'false') && github.actor != 'dependabot[bot]'
26+
uses: actions/github-script@v7
3727
with:
38-
labels: |
39-
community
40-
triage
28+
script: |
29+
github.rest.issues.addLabels({
30+
issue_number: context.issue.number,
31+
owner: context.repo.owner,
32+
repo: context.repo.repo,
33+
labels: ["community", "triage"]
34+
})

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- uses: actions/checkout@v4
3838
- uses: actions/setup-node@v4
3939
with:
40-
node-version: 16
40+
node-version: 18
4141
- run: npm ci
4242
- run: npm run lint
4343

.tav.yml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -318,24 +318,28 @@ pug:
318318
- node test/instrumentation/modules/hapi/set-framework.test.js
319319

320320
tedious:
321-
# latest majors subset of '>=1.9.0 <4.0.0 || >4.0.1 <11'
322-
- versions: '1.9.0 || 1.15.0 || 2.7.1 || 3.0.1 || 4.2.0 || 5.0.3 || 6.7.1 || 7.0.0 || 8.3.1 || 9.2.3 || 10.0.0'
321+
- versions:
322+
include: '>=1 <11'
323+
mode: latest-majors
323324
node: '>=6'
324325
commands: node test/instrumentation/modules/tedious.test.js
325-
- versions: '11.0.0 || 11.8.0' # first and last subset of '11.x'
326+
- versions:
327+
include: '>=11 <12'
328+
mode: latest-majors
326329
node: '>=10.17.0'
327330
commands: node test/instrumentation/modules/tedious.test.js
328-
# first and last majors subset of '12.x || 13.x || 14.x'
329-
- versions: '12.0.0 || 12.3.0 || 13.0.0 || 13.2.0 || 14.0.0 || 14.7.0 || >14.7.0 <15'
330-
node: '>=12.3.0'
331-
commands: node test/instrumentation/modules/tedious.test.js
332-
- versions: '15.0.0 || 15.1.3 || >15.1.3 <16' # first and last majors subset of '15.x'
333-
node: '>=14'
334-
commands: node test/instrumentation/modules/tedious.test.js
335-
- versions: '16.0.0 || 16.1.0 || >16.1.0 <17' # first and last majors subset of '16.x'
331+
# Tedious v12,v13,v14 advertise a min-supported Node.js version of 12.3.0.
332+
# Tedious v15 advertises a min-supported Node.js version of 14.
333+
# However, as of @azure/[email protected] they effectively have a
334+
# min-working Node.js of >=16 (possibly >=18).
335+
- versions:
336+
include: '>=12 <17'
337+
mode: latest-majors
336338
node: '>=16'
337339
commands: node test/instrumentation/modules/tedious.test.js
338-
- versions: '>=17.0.0 <19' # first and last majors subset of '17.x' (as for now there is only v17.0.0)
340+
- versions:
341+
include: '>=17 <19'
342+
mode: latest-majors
339343
node: '18.x || >=20'
340344
commands: node test/instrumentation/modules/tedious.test.js
341345

CHANGELOG.asciidoc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,23 @@ Notes:
3333
3434
See the <<upgrade-to-v4>> guide.
3535
36+
[[release-notes-4.5.1]]
37+
==== 4.5.1 - 2024/04/11
38+
39+
[float]
40+
===== Bug fixes
41+
42+
* Fix path resolution for requests that contain invalid characters in its
43+
host header. ({pull}3923[#3923])
44+
* Fix span names for `getMore` command of mongodb. ({pull}3919[#3919])
45+
* Fix undici instrumentation to cope with a bug in [email protected] where
46+
`request.addHeader()` was accidentally removed. (It was re-added in
47+
[email protected].) ({pull}3963[#3963])
48+
* Update undici instrumentation to avoid possibly adding a *second*
49+
'traceparent' header to outgoing HTTP requests, because this can break
50+
Elasticsearch requests. ({issues}3964[#3964])
51+
52+
3653
[[release-notes-4.5.0]]
3754
==== 4.5.0 - 2024/03/13
3855

CONTRIBUTING.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,10 @@ A release involves the following published artifacts:
209209
(The GitHub Actions CI "release" workflow will handle all the release
210210
steps -- including the `npm publish`. See the appropriate run at:
211211
https://github.com/elastic/apm-agent-nodejs/actions/workflows/release.yml)
212-
4. If this is the for the latest major (currently `4.x`), then reset the latest
213-
major branch to point to the current main, e.g.:
214-
`git branch -f 4.x main && git push origin 4.x`
212+
4. If this is for the latest major (currently `4.x`), then the "4.x" branch
213+
needs to be updated to the same state as the release tag on "main".
214+
**Open a PR to rebase all commits from main on to the "4.x" branch,
215+
get it approved, merge with the rebase strategy.**
215216
(The periodic [docs CI job](https://elasticsearch-ci.elastic.co/view/Docs/job/elastic+docs+master+build/)
216217
uses this branch to update the [published docs](https://www.elastic.co/guide/en/apm/agent/nodejs/current/release-notes-4.x.html).)
217218

0 commit comments

Comments
 (0)