Skip to content

Conversation

@jsumners-nr
Copy link
Contributor

@jsumners-nr jsumners-nr commented May 23, 2024

It seems like the passing versioned tests when I ran locally were a fluke. I managed to get a run locally that exhibits the CI failure (https://github.com/newrelic/node-newrelic/actions/runs/9211125804/job/25339758931), and that allowed me to inspect what is happening. It turns out that we have the following dependency tree for the actual agent:

❯ npm ls @smithy/smithy-client
[email protected] /Users/jsumners/Projects/team-repos/node-newrelic
├─┬ @aws-sdk/[email protected]
│ ├─┬ @aws-sdk/[email protected]
│ │ └── @smithy/[email protected] deduped
│ ├─┬ @aws-sdk/[email protected]
│ │ └── @smithy/[email protected] deduped
│ ├─┬ @aws-sdk/[email protected]
│ │ └── @smithy/[email protected] deduped
│ ├─┬ @aws-sdk/[email protected]
│ │ ├─┬ @aws-sdk/[email protected]
│ │ │ └── @smithy/[email protected] deduped
│ │ └─┬ @aws-sdk/[email protected]
│ │   └─┬ @aws-sdk/[email protected]
│ │     └── @smithy/[email protected] deduped
│ ├─┬ @aws-sdk/[email protected]
│ │ └── @smithy/[email protected] deduped
│ ├─┬ @smithy/[email protected]
│ │ └── @smithy/[email protected] deduped
│ ├─┬ @smithy/[email protected]
│ │ └── @smithy/[email protected] deduped
│ ├── @smithy/[email protected]
│ ├─┬ @smithy/[email protected]
│ │ └── @smithy/[email protected] deduped
│ └─┬ @smithy/[email protected]
│   └── @smithy/[email protected] deduped
└─┬ @aws-sdk/[email protected]
  └── @smithy/[email protected] deduped

And then we can have the tree in the test suite as:

❯ npm ls @smithy/smithy-client         
[email protected] /Users/jsumners/Projects/team-repos/node-newrelic/test/versioned/aws-sdk-v3
└─┬ @aws-sdk/[email protected] extraneous
  ├─┬ @aws-sdk/[email protected] extraneous
  │ └── @smithy/[email protected] deduped
  ├─┬ @aws-sdk/[email protected] extraneous
  │ └── @smithy/[email protected] deduped
  ├─┬ @aws-sdk/[email protected] extraneous
  │ └── @smithy/[email protected] deduped
  ├─┬ @aws-sdk/[email protected] extraneous
  │ └── @smithy/[email protected] deduped
  ├─┬ @smithy/[email protected] extraneous
  │ └── @smithy/[email protected] deduped
  ├─┬ @smithy/[email protected] extraneous
  │ └── @smithy/[email protected] deduped
  ├── @smithy/[email protected] extraneous
  ├─┬ @smithy/[email protected] extraneous
  │ └── @smithy/[email protected] deduped
  └─┬ @smithy/[email protected] extraneous
    └── @smithy/[email protected] deduped

Notice that the agent's tree has a different version of @smithy/smithy-client than the test suite tree. This is the crux of the problem. So we have updated the test suite to not need the package.json from @smithy/smithy-client at all. Instead, we look for the expected metric by its prefix and treat that as a good hit.

@jsumners-nr jsumners-nr force-pushed the fix-bedrock-tests-again branch from 0260808 to 8cef266 Compare May 23, 2024 17:20
@jsumners-nr jsumners-nr requested a review from bizob2828 May 23, 2024 17:47
@bizob2828 bizob2828 added the dev:tests Indicates only changes to tests label May 23, 2024
@jsumners-nr jsumners-nr merged commit 330cc4b into newrelic:main May 23, 2024
@jsumners-nr jsumners-nr deleted the fix-bedrock-tests-again branch May 23, 2024 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev:tests Indicates only changes to tests

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants