-
Notifications
You must be signed in to change notification settings - Fork 231
test: fix @aws-sdk/client-s3 TAV test failures #3312
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
test: fix @aws-sdk/client-s3 TAV test failures #3312
Conversation
I've run the tests in local with the command ./.ci/scripts/test.sh -b "release" -t "@aws-sdk/client-s3" "20" I'm still getting an error when testing v3.0.0 of the module though with a similar error message
|
Perhaps we don't need to go back that far for support. It was released in 2020:
|
Our test starts failing at v3.14.0. I'll add a commit to make that our base supported version. This will broaden the scope of this PR to fix #3311 |
Versions before that don't work with our current instrumentation. v3.15.0 was released almost 2y ago, so this is fine.
Before this change the sorting would be broken on an 'error' intake event. This could result in a spurious test failure if the intake request happened to send the expected "error" event before the "transaction" event was serialized and sent, resulting in a sorted set like this: [ { timestamp: 1683143107599773, id: 'ef6704', type: 'span' }, { timestamp: 1683143107641831, id: '7282b2', type: 'span' }, { timestamp: 1683143107661564, id: 'c8f2e5', type: 'span' }, { timestamp: 1683143107687906, id: '826e4d', type: 'span' }, { timestamp: 1683143107706615, id: 'be0dbf', type: 'span' }, { timestamp: 1683143107830302, id: 'bcaa46', type: 'span' }, { timestamp: 1683143107851506, id: '3edc44', type: 'span' }, { timestamp: 1683143107874000, id: 'a03f5d', type: 'error' }, { timestamp: 1683143107595038, id: 'a9a302', type: 'transaction' }, <-- not sorted by timestamp { timestamp: 1683143107874152, id: '02f35b', type: 'span' } ]
Some context on commit 396fd6c. I was testing locally with a manually started 'localstack' docker container. From an earlier test failure the test bucket had not been deleted. A subsequent test run resulted in the
After the sorting fix it was this clearer error:
|
…re/support-specific-modules * 'main' of github.com:elastic/apm-agent-nodejs: (54 commits) chore: fix dev-utils/ci-tav-slow-jobs.sh (elastic#3319) test: reduce TAV test matrix for slowest jobs (elastic#3321) chore: sync package-lock so 'npm ci' can work (elastic#3318) docs: document `useElasticTraceparentHeader` config var (elastic#3316) chore, test: test driver improvements (elastic#3293) test: drop node 14 from RC tests now that it is EOL (elastic#3315) test: fix running fastify.test.js with node v8 (elastic#3317) feat: add @apollo/server@4 support (elastic#3203) chore: update nvm (elastic#3309) tests: stop testing 'express-graphql' instrumentation (elastic#3304) chore: fix bitrot.js dev util for recent changes (elastic#3308) test: restore testing of Azure Functions on node >=18.x (elastic#3307) fix: support Lambda instrumentation for `contextManager: 'patch'`; refactor Lambda tests (elastic#3305) test: fix fastify TAV test failures (elastic#3314) test: fix @aws-sdk/client-s3 TAV test failures (elastic#3312) feat: add instrumentation for aws-sdk S3 client (elastic#3287) feat(fastify): add captureBody support (elastic#2681) feat: mysql2@3 support (elastic#3301) chore(deps): bump @opentelemetry/exporter-prometheus from 0.37.0 to 0.38.0 in /test/opentelemetry-metrics/fixtures (elastic#3295) chore(deps-dev): bump fastify from 4.16.3 to 4.17.0 (elastic#3296) ...
* fix resolution of docker compose file for CI tests of client-s3 * bump min supported @aws-sdk/client-s3 to v3.15.0 * Fix an issue in the tests sorting APM intake events to be tested. Fixes: #3311 Co-authored-by: Trent Mick <[email protected]>
* fix resolution of docker compose file for CI tests of client-s3 * bump min supported @aws-sdk/client-s3 to v3.15.0 * Fix an issue in the tests sorting APM intake events to be tested. Fixes: elastic#3311 Co-authored-by: Trent Mick <[email protected]>
@aws-sdk/client-s3
. Test script was selecting the default one instead of using one with localstack.Fixes: #3311
Checklist