Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tracking issue for spurious Windows CI failures due to azure-functions-core-tools dep #3107

Closed
trentm opened this issue Jan 18, 2023 · 4 comments · Fixed by #3123
Closed
Assignees
Labels
agent-nodejs Make available for APM Agents project planning.
Milestone

Comments

@trentm
Copy link
Member

trentm commented Jan 18, 2023

In #3071 the "azure-functions-core-tools" package was added to the top-level "devDependencies". This dep installs a func CLI tool that is used for test/instrumentation/azure-functions/azure-functions.test.js to run (running Azure Functions locally). This package has a postinstall step that downloads a large support package -- on the order of a couple hundred MBs.

After this merged to main, it was noticed that the Jenkins Windows CI failed a number of times with:

...
[2023-01-17T18:14:15.071Z] > azure-functions-core-tools@4.0.4915 postinstall C:\Users\jenkins\workspace\main-575-b9426742-7d40-4659-89fb-27ecdcc35fc2\src\github.com\elastic\apm-agent-nodejs\node_modules\azure-functions-core-tools
[2023-01-17T18:14:15.071Z] > node lib/install.js
[2023-01-17T18:14:15.071Z] 
[2023-01-17T18:14:15.377Z] attempting to GET "https://functionscdn.azureedge.net/public/4.0.4915/Azure.Functions.Cli.win-x64.4.0.4915.zip"
[2023-01-17T18:14:34.518Z] Error: read ECONNRESET
[2023-01-17T18:14:37.151Z] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents):
[2023-01-17T18:14:37.151Z] npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
[2023-01-17T18:14:37.151Z] 
[2023-01-17T18:14:37.151Z] npm ERR! code ELIFECYCLE
[2023-01-17T18:14:37.151Z] npm ERR! errno 1
[2023-01-17T18:14:37.151Z] npm ERR! azure-functions-core-tools@4.0.4915 postinstall: `node lib/install.js`
[2023-01-17T18:14:37.152Z] npm ERR! Exit status 1
[2023-01-17T18:14:37.152Z] npm ERR! 
[2023-01-17T18:14:37.152Z] npm ERR! Failed at the azure-functions-core-tools@4.0.4915 postinstall script.
[2023-01-17T18:14:37.152Z] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
...

Currently this issue is to track such failures to see if we want/need to deal with it.

A weird side-effect of this failure: Currently the test run with retry the npm install. In the cases below (so far), the second npm install passes, then the tests fail. The test failure is in the "http2" tests. This failure is actually likely due to the first npm install failure, because the "https-pem" devDependency post install script somehow now wasn't run -- at least not run properly -- such that there isn't a pem file to use for http2/https testing.

noticed failures

possible fix/workaround options

If this becomes too-frequent of a flaky-test issue then some possible options are:

  1. Move the dep to the fixture at "test/instrumentation/azure-functions/fixtures/AJsAzureFnApp/package.json" (currently possible because we currently only have a single test Azure Function app fixture), npm install manually in "test/instrumentation/azure-functions/azure-functions.test.js" on first run, skip running tests on Windows.
  2. Ditto, but retry the "npm install" one or more times on failure.

So far, if this tends to be a failure only for Windows CI, then I prefer option 1.

@github-actions github-actions bot added the agent-nodejs Make available for APM Agents project planning. label Jan 18, 2023
@trentm
Copy link
Member Author

trentm commented Jan 19, 2023

Another failure on the "main" branch Jenkins CI windows build:
https://apm-ci.elastic.co/blue/organizations/jenkins/apm-agent-nodejs%2Fapm-agent-nodejs-mbp/detail/main/583/pipeline

@trentm trentm changed the title tracking issue for Windows CI failures due to azure-functions-core-tools dep tracking issue for spurious Windows CI failures due to azure-functions-core-tools dep Jan 24, 2023
@trentm
Copy link
Member Author

trentm commented Jan 24, 2023

@trentm
Copy link
Member Author

trentm commented Jan 24, 2023

@trentm
Copy link
Member Author

trentm commented Jan 24, 2023

And again (on the same PR): https://apm-ci.elastic.co/blue/organizations/jenkins/apm-agent-nodejs%2Fapm-agent-nodejs-mbp/detail/PR-3121/3/pipeline

This issue needs to be resolved now.

@trentm trentm self-assigned this Jan 24, 2023
@trentm trentm added this to the 8.7 milestone Jan 24, 2023
trentm added a commit that referenced this issue Jan 24, 2023
This is because the 'azure-function-core-tools' package install on
Windows is too flaky in CI.

Closes: #3107
trentm added a commit that referenced this issue Jan 24, 2023
This is because the 'azure-function-core-tools' package install on
Windows is too flaky in CI.

Closes: #3107
fpm-peter pushed a commit to fpm-git/apm-agent-nodejs that referenced this issue Aug 20, 2024
This is because the 'azure-function-core-tools' package install on
Windows is too flaky in CI.

Closes: elastic#3107
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent-nodejs Make available for APM Agents project planning.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant