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: add min version in TAV matrix #3531

Merged
merged 19 commits into from Aug 3, 2023
Merged

Conversation

david-luna
Copy link
Member

@david-luna david-luna commented Aug 1, 2023

Tweak tav.json file and tav.yml and tav-command.yml actions so we can specify which is the min version where the module should be tested. The matrix generated contains only one row where each element contains module node_version in a single place.

set to draft to test it and discuss with the team

Checklist

  • Implement code
  • Add tests
  • Update TypeScript typings
  • Update documentation
  • Add CHANGELOG.asciidoc entry
  • Commit message follows commit guidelines

trentm and others added 4 commits July 31, 2023 16:28
This is a start at a major version bump, primarily to move the min
supported Node.js to v14 (from v8.6).
@github-actions github-actions bot added the agent-nodejs Make available for APM Agents project planning. label Aug 1, 2023
@elastic-apm-tech elastic-apm-tech added this to In Progress in APM-Agents (OLD) Aug 1, 2023
Copy link
Member Author

@david-luna david-luna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/test tav

Copy link
Member Author

@david-luna david-luna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/test tav

@david-luna
Copy link
Member Author

The matrix workflow shows the values of each dimension for each run. In our case dimensions are

  • nodeAndVersion: which contains the string to use in the TAV command (eg. hapi 16)
  • count: the total number of elements in the matrix

When looking at the workflow, the list of runs differs a little bit of what we are used to
Screenshot 2023-08-01 at 16 57 09

Copy link
Member Author

@david-luna david-luna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/test tav fastify

Copy link
Member Author

@david-luna david-luna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/test tav fastify 20

Copy link
Member Author

@david-luna david-luna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/test tav fastify 10

@david-luna
Copy link
Member Author

david-luna commented Aug 1, 2023

/test tav fastify 10

this did not run anything since min node version set is higher than 10

Copy link
Member Author

@david-luna david-luna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/test tav unknown

Copy link
Member Author

@david-luna david-luna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/test tav unknown

@david-luna
Copy link
Member Author

/test tav unknown

this fails because the package name is not in listed in tav.json

Copy link
Member Author

@david-luna david-luna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/test tav

.ci/tav.json Outdated
"@koa/router,koa-router",
"handlebars,pug",
"bluebird,got"
{"name": "@apollo/server", "minVersion": 18 },
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for reviewer: to run less tests we add minVersion to 18. This shall be updated with the proper versions if the PR is okay to merge

@david-luna david-luna requested review from trentm and v1v August 1, 2023 17:44
@david-luna david-luna changed the base branch from dev/4.x to main August 1, 2023 18:10
.ci/tav.json Show resolved Hide resolved
.ci/tav.json Outdated Show resolved Hide resolved
.github/workflows/tav-command.yml Outdated Show resolved Hide resolved
.github/workflows/tav-command.yml Outdated Show resolved Hide resolved
.github/workflows/tav-command.yml Outdated Show resolved Hide resolved
.github/workflows/test.yml Outdated Show resolved Hide resolved
@david-luna david-luna self-assigned this Aug 2, 2023
Copy link
Member Author

@david-luna david-luna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/test tav express

Copy link
Member Author

@david-luna david-luna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/test tav express,fastify 20

@david-luna
Copy link
Member Author

Turns out you can pass a single array (so it's a 1 dimension matrix). Now the list of the tasks looks nicer showing.the module name and the node version separated by a space.

Screenshot 2023-08-02 at 12 42 08

Copy link
Member Author

@david-luna david-luna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/test tav express,nonExistingPackage,fastify

@david-luna
Copy link
Member Author

/test tav express,nonExistingPackage,fastify

Now it fails and logs the name of the wrong package
Screenshot 2023-08-02 at 12 50 19

Copy link
Member Author

@david-luna david-luna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/test tav

Copy link
Member Author

@david-luna david-luna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/test tav

@david-luna david-luna marked this pull request as ready for review August 2, 2023 14:14
@david-luna david-luna requested a review from trentm August 2, 2023 14:56
Copy link
Member

@trentm trentm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. A couple of nits is all.

.ci/tav.json Outdated
{"name": "ws", "minVersion": 8 },
{"name": "@koa/router,koa-router", "minVersion": 8 },
{"name": "handlebars,pug", "minVersion": 8 },
{"name": "bluebird,got", "minVersion": 8 }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hrm, I guess with all these minVersion: 8s, it means there won't be a large reduction in the number of jobs. Still probably worth keeping.

(Not part of this PR, but I wonder if we could consider dropping testing for versions of these packages that are, say, older than 2y and not of the latest major version. That might enable raising the minVersion here.)

Copy link
Member Author

@david-luna david-luna Aug 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can leverage the multiple package option we have, here we are testing 2 packages in the same job

{"name": "bluebird,got", "minVersion": 8 }

This is actually what I want to do for @aws-sdk/client-* to test all of them at once for each version. There might be other groups we could make perhaps @opentelemetry/* or mysql? Of course some test review is needed to see compatibility. Also I think the runTestFixtures util introduced in the ESM support PR would come handy

we could consider dropping testing for versions of these packages that are, say, older than 2y
I agree and also I think it could be something to motivate users to update

.ci/tav.json Show resolved Hide resolved
.github/workflows/tav-command.yml Outdated Show resolved Hide resolved
.github/workflows/tav-command.yml Outdated Show resolved Hide resolved
dev-utils/lint-tav-json.js Show resolved Hide resolved
david-luna and others added 4 commits August 3, 2023 10:12
Copy link
Member Author

@david-luna david-luna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/test tav fastify 20

@david-luna david-luna merged commit 8b006ab into main Aug 3, 2023
38 checks passed
APM-Agents (OLD) automation moved this from In Progress to Done Aug 3, 2023
@david-luna david-luna deleted the dluna/tav-matrix-on-a-diet branch August 3, 2023 09:45
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
Development

Successfully merging this pull request may close these issues.

None yet

2 participants