Skip to content

Commit

Permalink
update 4.x from main for v4.5.1 docs build (#3967)
Browse files Browse the repository at this point in the history
  • Loading branch information
trentm authored Apr 11, 2024
1 parent 587e98d commit bdc1f50
Show file tree
Hide file tree
Showing 44 changed files with 994 additions and 982 deletions.
2 changes: 2 additions & 0 deletions .ci/docker/docker-compose-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,5 @@ volumes:
driver: local
nodekafkadata:
driver: local
nodezookeeperdata:
driver: local
6 changes: 6 additions & 0 deletions .ci/docker/docker-compose-edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ services:
extends:
file: docker-compose.yml
service: kafka
zookeeper:
extends:
file: docker-compose.yml
service: zookeeper
node_tests:
extends:
file: docker-compose-node-edge-test.yml
Expand Down Expand Up @@ -84,3 +88,5 @@ volumes:
driver: local
nodekafkadata:
driver: local
nodezookeeperdata:
driver: local
6 changes: 2 additions & 4 deletions .ci/docker/docker-compose-kafka.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ services:
file: docker-compose-node-test.yml
service: node_tests
depends_on:
- kafka
# TODO: uncomment this if health_check is necessary
# kafka:
# condition: service_healthy
kafka:
condition: service_healthy

volumes:
nodekafkadata:
Expand Down
20 changes: 13 additions & 7 deletions .ci/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ services:

mssql:
image: mcr.microsoft.com/mssql/server
platform: linux/amd64
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=Very(!)Secure
Expand Down Expand Up @@ -149,6 +150,13 @@ services:
- nodezookeeperdata:/bitnami
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
healthcheck:
# Using 'srvr' instead of the more common 'ruok' because this bitnami
# image does not have 'ruok' on the '4lw.commands.whitelist' in zoo.cfg.
test: ["CMD-SHELL", "echo srvr | nc -w 2 localhost 2181"]
interval: 5s
timeout: 5s
retries: 5

kafka:
# https://hub.docker.com/r/bitnami/kafka/tags
Expand All @@ -168,14 +176,12 @@ services:
- KAFKA_CFG_DELETE_TOPIC_ENABLE=true
depends_on:
- zookeeper
# TODO: maybe not necessary but figure out how to do this
healthcheck:
# use netcat to check tcp connection available
# test: nc -z localhost 9093 || exit -1
# start_period: 15s
# interval: 5s
# timeout: 10s
# retries: 5
# Kafka healthcheck ideas from https://github.com/wurstmeister/kafka-docker/issues/167
test: kafka-cluster.sh cluster-id --bootstrap-server localhost:9092 || exit 1
interval: 30s
timeout: 10s
retries: 5

volumes:
nodepgdata:
Expand Down
111 changes: 0 additions & 111 deletions .eslintrc.json

This file was deleted.

34 changes: 14 additions & 20 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,30 @@ on:
pull_request_target:
types: [opened]

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

jobs:
triage:
runs-on: ubuntu-latest
steps:
- name: Add agent-nodejs label
uses: actions-ecosystem/action-add-labels@v1
with:
labels: agent-nodejs

- name: Check team membership for user
uses: elastic/get-user-teams-membership@1.1.0
id: checkUserMember
- id: is_elastic_member
uses: elastic/apm-pipeline-library/.github/actions/is-member-elastic-org@current
with:
username: ${{ github.actor }}
team: 'apm'
usernamesToExclude: |
apmmachine
dependabot
dependabot[bot]
GITHUB_TOKEN: ${{ secrets.APM_TECH_USER_TOKEN }}
token: ${{ secrets.APM_TECH_USER_TOKEN }}

- name: Add community and triage labels
if: steps.checkUserMember.outputs.isTeamMember != 'true' && steps.checkUserMember.outputs.isExcluded != 'true'
uses: actions-ecosystem/action-add-labels@v1
if: contains(steps.is_elastic_member.outputs.result, 'false') && github.actor != 'dependabot[bot]'
uses: actions/github-script@v7
with:
labels: |
community
triage
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ["community", "triage"]
})
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
- run: npm ci
- run: npm run lint

Expand Down
28 changes: 16 additions & 12 deletions .tav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -318,24 +318,28 @@ pug:
- node test/instrumentation/modules/hapi/set-framework.test.js

tedious:
# latest majors subset of '>=1.9.0 <4.0.0 || >4.0.1 <11'
- 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'
- versions:
include: '>=1 <11'
mode: latest-majors
node: '>=6'
commands: node test/instrumentation/modules/tedious.test.js
- versions: '11.0.0 || 11.8.0' # first and last subset of '11.x'
- versions:
include: '>=11 <12'
mode: latest-majors
node: '>=10.17.0'
commands: node test/instrumentation/modules/tedious.test.js
# first and last majors subset of '12.x || 13.x || 14.x'
- versions: '12.0.0 || 12.3.0 || 13.0.0 || 13.2.0 || 14.0.0 || 14.7.0 || >14.7.0 <15'
node: '>=12.3.0'
commands: node test/instrumentation/modules/tedious.test.js
- versions: '15.0.0 || 15.1.3 || >15.1.3 <16' # first and last majors subset of '15.x'
node: '>=14'
commands: node test/instrumentation/modules/tedious.test.js
- versions: '16.0.0 || 16.1.0 || >16.1.0 <17' # first and last majors subset of '16.x'
# Tedious v12,v13,v14 advertise a min-supported Node.js version of 12.3.0.
# Tedious v15 advertises a min-supported Node.js version of 14.
# However, as of @azure/core-rest-pipeline@1.15.0 they effectively have a
# min-working Node.js of >=16 (possibly >=18).
- versions:
include: '>=12 <17'
mode: latest-majors
node: '>=16'
commands: node test/instrumentation/modules/tedious.test.js
- versions: '>=17.0.0 <19' # first and last majors subset of '17.x' (as for now there is only v17.0.0)
- versions:
include: '>=17 <19'
mode: latest-majors
node: '18.x || >=20'
commands: node test/instrumentation/modules/tedious.test.js

Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,23 @@ Notes:
See the <<upgrade-to-v4>> guide.
[[release-notes-4.5.1]]
==== 4.5.1 - 2024/04/11
[float]
===== Bug fixes
* Fix path resolution for requests that contain invalid characters in its
host header. ({pull}3923[#3923])
* Fix span names for `getMore` command of mongodb. ({pull}3919[#3919])
* Fix undici instrumentation to cope with a bug in undici@6.11.0 where
`request.addHeader()` was accidentally removed. (It was re-added in
undici@6.11.1.) ({pull}3963[#3963])
* Update undici instrumentation to avoid possibly adding a *second*
'traceparent' header to outgoing HTTP requests, because this can break
Elasticsearch requests. ({issues}3964[#3964])
[[release-notes-4.5.0]]
==== 4.5.0 - 2024/03/13
Expand Down
7 changes: 4 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,10 @@ A release involves the following published artifacts:
(The GitHub Actions CI "release" workflow will handle all the release
steps -- including the `npm publish`. See the appropriate run at:
https://github.com/elastic/apm-agent-nodejs/actions/workflows/release.yml)
4. If this is the for the latest major (currently `4.x`), then reset the latest
major branch to point to the current main, e.g.:
`git branch -f 4.x main && git push origin 4.x`
4. If this is for the latest major (currently `4.x`), then the "4.x" branch
needs to be updated to the same state as the release tag on "main".
**Open a PR to rebase all commits from main on to the "4.x" branch,
get it approved, merge with the rebase strategy.**
(The periodic [docs CI job](https://elasticsearch-ci.elastic.co/view/Docs/job/elastic+docs+master+build/)
uses this branch to update the [published docs](https://www.elastic.co/guide/en/apm/agent/nodejs/current/release-notes-4.x.html).)
Expand Down
Loading

0 comments on commit bdc1f50

Please sign in to comment.