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

chore: Fixed aws-sdk-v3 bedrock tests (again) #2212

Merged
merged 1 commit into from
May 23, 2024

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.

@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
27 checks passed
@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