Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
703ca71
chore: upgrde lerna and remove saucelabs from scripts
david-luna Oct 17, 2025
36fb377
chore: restore java opts
david-luna Oct 17, 2025
59e6dd5
chore: remove temp fix for npm ci
david-luna Oct 17, 2025
775d10c
chore: update dependencies to remove fibers
david-luna Oct 18, 2025
41b398b
chore: lint files
david-luna Oct 18, 2025
8746dbf
chore: remove workaround for docker
david-luna Oct 19, 2025
9b8595c
chore: bump stack version
david-luna Oct 19, 2025
d138112
chore: dump docker compose logs if fails on testing
david-luna Oct 19, 2025
4c59e15
chore: restore java options
david-luna Oct 19, 2025
ae6543a
chore: add docker logs
david-luna Oct 19, 2025
79c36e0
chore: remove stack snapshot
david-luna Oct 19, 2025
9b700ae
chore: revert angular-devkit update
david-luna Oct 19, 2025
64af869
chore: add logs for react config
david-luna Oct 19, 2025
096653b
chore: add logs
david-luna Oct 19, 2025
00efd76
chore: more logs
david-luna Oct 19, 2025
50b0427
chore: change karma config
david-luna Oct 19, 2025
3e51247
chore: restore object-configurable
david-luna Oct 19, 2025
794f273
chore: attempt to workaround module patching
david-luna Oct 20, 2025
63e0e65
chore: set node version to 20
david-luna Oct 20, 2025
d1bee3a
chore: restore fetch tests
david-luna Oct 20, 2025
091dd82
chore: remove comments
david-luna Oct 20, 2025
20827bd
chore: restore snapshot for tests
david-luna Oct 20, 2025
a3ccf3c
chore: pin node version for testing
david-luna Oct 20, 2025
a61e0f7
chore: add missing env var
david-luna Oct 20, 2025
cce743e
chore: change base stack version
david-luna Oct 20, 2025
051607f
chore: change stack version
david-luna Oct 20, 2025
c059413
chore: change stack version in CI
david-luna Oct 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .ci/docker/node-puppeteer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ FROM ubuntu:jammy
ARG NODEJS_VERSION

# Install node
RUN apt-get update && apt-get install -y ca-certificates curl gnupg && \
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note for reviewer: just formatting

mkdir -p /etc/apt/keyrings && \
curl -sL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODEJS_VERSION.x nodistro main" | \
tee /etc/apt/sources.list.d/nodesource.list && \
apt-get update && apt-get install nodejs -y && \
rm -rf /etc/apt/keyrings && rm /etc/apt/sources.list.d/nodesource.list
RUN apt-get update && apt-get install -y ca-certificates curl gnupg && \
mkdir -p /etc/apt/keyrings && \
curl -sL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODEJS_VERSION.x nodistro main" | \
tee /etc/apt/sources.list.d/nodesource.list && \
apt-get update && apt-get install nodejs -y && \
rm -rf /etc/apt/keyrings && rm /etc/apt/sources.list.d/nodesource.list

# the node-gyp we use is only compatible with Python versions less than 3.10,
# so we need to make sure we use a previous version
Expand Down
2 changes: 1 addition & 1 deletion .ci/scripts/load-testing.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

STACK_VERSION=${1:-8.6.1}
STACK_VERSION=${1:-8.19.5}
USER_ID="$(id -u):$(id -g)"
# The migration of this to Node.js 18 will wait. To update playwright (and browsers)
# to make it work in Node.js 18 and latest version in ubuntu (or another OS)
Expand Down
2 changes: 1 addition & 1 deletion .ci/scripts/pull_and_build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
export NODEJS_VERSION=$(cat .nvmrc)
export STACK_VERSION=${STACK_VERSION:-8.6.1}
export STACK_VERSION=${STACK_VERSION:-8.19.5}

STACK_VERSION=${STACK_VERSION} \
docker --log-level INFO compose -f ./dev-utils/docker-compose.yml pull --quiet --ignore-pull-failures
Expand Down
21 changes: 7 additions & 14 deletions .ci/scripts/test.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
#!/usr/bin/env bash
set -xo pipefail

STACK_VERSION=${STACK_VERSION:-"8.6.1"}
STACK_VERSION=${STACK_VERSION:-"8.19.5"}
APM_SERVER_PORT=${APM_SERVER_PORT:-"8200"}
APM_SERVER_URL=${APM_SERVER_URL:-"http://apm-server:8200"}
KIBANA_URL=${KIBANA_URL:-"http://kibana:5601"}

# As long as there are issues with the ssl lets use 6.1.3
# see https://github.com/docker/docker-py/issues/3194
pip3 uninstall docker
pip3 install docker==6.1.3

pip install docker-compose>=1.25.4

# https://github.com/docker/docker-py/issues/3256
pip3 uninstall requests
pip3 install requests==2.31.0


# Tests are run within the node-puppeteer container and can fails.
# To avoid flakiness, we retry up to 3 times to run them.
for i in {1..3};
Expand All @@ -34,10 +22,15 @@ do
--quiet-pull \
--exit-code-from node-puppeteer \
--remove-orphans \
node-puppeteer;
node-puppeteer \
>docker-compose.log 2>docker-compose.err;
status=${?}
if [ "${status}" -eq "0" ]; then
break
else
echo "Docker compose failed, see the below log output"
cat docker-compose.log && rm docker-compose.log
cat docker-compose.err && rm docker-compose.err
fi
sleep 5;
done
Expand Down
85 changes: 0 additions & 85 deletions .github/workflows/ci-saucelabs.yml

This file was deleted.

11 changes: 2 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
strategy:
matrix:
stack-version:
- '8.0.0-SNAPSHOT'
- '8.2.0-SNAPSHOT'
- '8.19.5'
scope:
- '@elastic/apm-rum'
Expand All @@ -75,6 +75,7 @@ jobs:
- '@elastic/apm-rum-vue'
steps:
- uses: actions/checkout@v5

- name: Run puppeteer tests
uses: ./.github/workflows/run-test
with:
Expand All @@ -87,14 +88,6 @@ jobs:
steps:
- uses: actions/checkout@v5

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note for reviewer: fix was for saucelabs tests which is gone

# Temporary fix for "ValueError: invalid mode: 'rU' while trying to load binding.gyp"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note for reviewer: fix was for saucelabs tests which is gone

# See https://github.com/nodejs/node-gyp/issues/2219
# This can be removed when "node-gyp" is updated
- name: Set up Python 3.10
uses: actions/setup-python@v6
with:
python-version: '3.10'

- uses: actions/setup-node@v5
with:
node-version-file: '.nvmrc'
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,6 @@ jobs:
with:
github-token: ${{ steps.get_token.outputs.token }}

# Temporary fix for "ValueError: invalid mode: 'rU' while trying to load binding.gyp"
# See https://github.com/nodejs/node-gyp/issues/2219
# This can be removed when "node-gyp" is updated
- name: Set up Python 3.10
uses: actions/setup-python@v6
with:
python-version: '3.10'

- uses: actions/setup-node@v5
with:
node-version-file: '.nvmrc'
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,6 @@ jobs:
with:
github-token: ${{ steps.get_token.outputs.token }}

# Temporary fix for "ValueError: invalid mode: 'rU' while trying to load binding.gyp"
# See https://github.com/nodejs/node-gyp/issues/2219
# This can be removed when "node-gyp" is updated
- name: Set up Python 3.10
uses: actions/setup-python@v6
with:
python-version: '3.10'

- uses: actions/setup-node@v5
with:
node-version-file: '.nvmrc'
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/run-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@ inputs:
type: choice
options:
- none
- saucelabs
sauce-username:
description: 'Sauce username'
required: false
sauce-access-key:
description: 'Sauce access key'
required: false

runs:
using: "composite"
Expand All @@ -37,17 +30,6 @@ runs:
- name: Pull and build docker infra
run: './.ci/scripts/pull_and_build.sh'
shell: bash
- if: |
(inputs.mode == 'saucelabs')
&& (inputs.sauce-access-key != null && inputs.sauce-access-key != '')
&& (inputs.sauce-username != null && inputs.sauce-username != '')
shell: bash
run: |
echo "SAUCE_ACCESS_KEY=$SAUCE_ACCESS_KEY" >> $GITHUB_ENV
echo "SAUCE_USERNAME=$SAUCE_USERNAME" >> $GITHUB_ENV
env:
SAUCE_ACCESS_KEY: ${{ inputs.sauce-access-key }}
SAUCE_USERNAME: ${{ inputs.sauce-username }}
- name: Run tests Elastic Stack ${{ matrix.stack-version }} - ${{ matrix.scope }} - ${{ fromJSON('{"none":"Puppeteer"}')[inputs.mode] || inputs.mode }}
run: './.ci/scripts/test.sh'
shell: bash
Expand All @@ -70,9 +52,3 @@ runs:
name: test-results-${{ steps.slug.outputs.slug }}
path: |
packages/**/reports/TESTS-*.xml
- name: Reset environment
if: always()
shell: bash
run: |
echo "SAUCE_ACCESS_KEY=" >> $GITHUB_ENV
echo "SAUCE_USERNAME=" >> $GITHUB_ENV
1 change: 0 additions & 1 deletion .github/workflows/test-reporter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
workflow_run:
workflows:
- ci
- ci-saucelabs
types:
- completed

Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
20
8 changes: 0 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,6 @@ $ npx lerna run --scope @elastic/apm-rum karma:dev -- --grep <path-to-test-file>
$ npx lerna run --scope @elastic/apm-rum test:integration
```

##### E2E tests (Saucelabs)

E2E tests are run on Saucelabs, Before running these tests we have to set some environment variables to run all the tests on Saucelabs

```sh
$ MODE=saucelabs SAUCE_USERNAME=<username> SAUCE_ACCESS_KEY=<access-key> npx lerna run --scope @elastic/apm-rum test:sauce
```

### Linting

We use [prettier](https://github.com/prettier/prettier) for formatting code and [eslint](https://github.com/eslint/eslint) for other linting.
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
[![codecov](https://codecov.io/gh/elastic/apm-agent-rum-js/branch/main/graph/badge.svg)](https://codecov.io/gh/elastic/apm-agent-rum-js)
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lernajs.io/)

[![Sauce Test Status](https://saucelabs.com/browser-matrix/elastic-apm-base.svg)](https://saucelabs.com/u/elastic-apm-base)
<br><sup>Cross Browser testing is provided by [Sauce Labs](https://saucelabs.com/)</sup>

This is the official Real User Monitoring JavaScript agent.

## Documentation
Expand Down
2 changes: 1 addition & 1 deletion dev-utils/.node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
20
11 changes: 4 additions & 7 deletions dev-utils/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
version: "2.1"
services:
elasticsearch:
container_name: elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION:-8.6.1}
image: docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION:-8.19.5}
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-XX:UseAVX=2 -Xms1g -Xmx1g"
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
- "cluster.routing.allocation.disk.threshold_enabled=false"
- "discovery.type=single-node"
- "xpack.security.authc.anonymous.roles=remote_monitoring_collector"
Expand Down Expand Up @@ -47,7 +46,7 @@ services:

fleet-server:
container_name: apm-server
image: docker.elastic.co/beats/elastic-agent:${STACK_VERSION:-8.6.1}
image: docker.elastic.co/beats/elastic-agent:${STACK_VERSION:-8.19.5}
entrypoint: "/bin/bash"
command:
- "-l"
Expand Down Expand Up @@ -82,7 +81,7 @@ services:

kibana:
container_name: kibana
image: docker.elastic.co/kibana/kibana:${STACK_VERSION:-8.6.1}
image: docker.elastic.co/kibana/kibana:${STACK_VERSION:-8.19.5}
environment:
ELASTICSEARCH_HOSTS: http://elasticsearch:9200
ELASTICSEARCH_USERNAME: "${KIBANA_ES_USER:-kibana_system_user}"
Expand Down Expand Up @@ -146,8 +145,6 @@ services:
- BUILD_NUMBER=${BUILD_NUMBER}
- BRANCH_NAME=${BRANCH_NAME}
- CI=${CI}
- SAUCE_USERNAME=${SAUCE_USERNAME}
- SAUCE_ACCESS_KEY=${SAUCE_ACCESS_KEY}
- MODE=${MODE}
- GOAL=${GOAL}
- WORKSPACE=${WORKSPACE}
Expand Down
Loading
Loading