You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.
The build includes docker inspect ... dumps for each of the containers in its artifacts. The failing container here is the "expressapp" container, failing with:
That npm install elastic/apm-agent-nodejs#a34d5892 is not completing before the container is deemed unhealthy and is destroyed. Hence the app is never running. (I guess that "HTTP 000" response is something being handled by some Docker proxy; not sure, but it doesn't matter.)
Running just that command locally shows that npm install <from any git repo> using npm v6 (the npm in node v12 and v14) takes many minutes (almost 8 minutes here):
% time npm install elastic/apm-agent-nodejs#a34d5892
...
npm install elastic/apm-agent-nodejs#a34d5892 12.26s user 4.07s system 3% cpu 7:56.75 total
npm/cli#4896 suggests this is an issue that started on Friday the 13th.
workarounds
So, some possible work arounds for this:
Switch to node v16, which gives us npm v8 which doesn't have this issue, AFAIK.
Add this git config: git config url."ssh://git@".insteadOf git://. Then switch to this argument for the agent install: npm install git+ssh://git@github.com:elastic/apm-agent-nodejs.git#$COMMITSHA. (This is a workaround described by one user on the above npm issue.)
Stop using npm install <something referring to a git repo> for installing a particular commit. Instead we could perhaps do a separate git clone ... && git checkout && npm install ../from/that/git/clone/dir.
Doing #1 is by far the easiest right now, and updating the expressapp to use the current node v16 is definitely reasonable.
The text was updated successfully, but these errors were encountered:
trentm
changed the title
apm-agent-nodejs integration tests are failing
apm-agent-nodejs integration tests are failing because of slow npm install from github
May 16, 2022
…l from github
The switch to node v16 gets use npm v8, to workaround an issue with
slow 'npm install <any github repo dependency>'. See:
npm/cli#4896
In our case the github repo dependency was the command given to docker
run this container:
bash -c "npm install elastic-apm-node#SOME-COMMIT-SHA && node app.js"
This also adds a package.json to more explicitly declare we are working
with a node project workspace. Also avoid generating a package-lock file
we won't use.
Fixes: #1483
…l from github (#1484)
The switch to node v16 gets use npm v8, to workaround an issue with
slow 'npm install <any github repo dependency>'. See:
npm/cli#4896
In our case the github repo dependency was the command given to docker
run this container:
bash -c "npm install elastic-apm-node#SOME-COMMIT-SHA && node app.js"
This also adds a package.json to more explicitly declare we are working
with a node project workspace. Also avoid generating a package-lock file
we won't use.
Fixes: #1483
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
"apm-agent-Node.js" builds of the "APM Integrfation Test MBP Selector" starting failing recently (in the past few days).
For example https://apm-ci.elastic.co/job/apm-integration-tests-selector-mbp/job/main/3832/
repro and cause
The build includes
docker inspect ...
dumps for each of the containers in its artifacts. The failing container here is the "expressapp" container, failing with:That's an odd output. We were able to reproduce locally with these steps from the docs.txt artifact.
When digging into the "expressapp" container while it is failing
ps -ef
shows:That
npm install elastic/apm-agent-nodejs#a34d5892
is not completing before the container is deemed unhealthy and is destroyed. Hence the app is never running. (I guess that "HTTP 000" response is something being handled by some Docker proxy; not sure, but it doesn't matter.)Running just that command locally shows that
npm install <from any git repo>
using npm v6 (the npm in node v12 and v14) takes many minutes (almost 8 minutes here):npm/cli#4896 suggests this is an issue that started on Friday the 13th.
workarounds
So, some possible work arounds for this:
git config url."ssh://git@".insteadOf git://
. Then switch to this argument for the agent install:npm install git+ssh://git@github.com:elastic/apm-agent-nodejs.git#$COMMITSHA
. (This is a workaround described by one user on the above npm issue.)npm install <something referring to a git repo>
for installing a particular commit. Instead we could perhaps do a separategit clone ... && git checkout && npm install ../from/that/git/clone/dir
.Doing #1 is by far the easiest right now, and updating the expressapp to use the current node v16 is definitely reasonable.
The text was updated successfully, but these errors were encountered: