-
Notifications
You must be signed in to change notification settings - Fork 615
chore(ci): pick better which packages should compile and test #3208
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
base: main
Are you sure you want to change the base?
chore(ci): pick better which packages should compile and test #3208
Conversation
|
In https://github.com/open-telemetry/opentelemetry-js-contrib/actions/runs/19137279065/job/54692601282?pr=3208 some of the test fails because network issues in Commit 20e7409 added a change in pg instrumentation and the |
|
|
||
| // No need to instrument files/modules | ||
| protected override init() { | ||
| override init() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: mismerge? (Same thing below)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did this change on purpose to validate the workflow was picking correctly. Will remove it before merging. Thanks for the heads up
ref: #3136
This is an alternative to using a cache for speeding up the CI time spent in PRs.
This approach uses a different way to resolve which packages need to be compiled and tested. The result is we get only the list of packages which sources are modified and this is what we pass to the
nx run-manycommand.Why
nx affected -t compilecompiles so many packages?The reason is because internally the command takes in consideration
nx.jsondependencies on tasks. The script iterates over each package and runs the "compile" task if:So
nx.jsonis expanding the dependency graph. Now we know a bit more about the behaviour of the command.Which solution is proposed?
The command
nx affectedif called without params gives a list with only the changed packages (which is what we want). Then we can pass that list tonx run-manycommand to narrow the list of packages that should run the given task (compile, test). Here is an exampleyou can see that the command takes care of dependencies like
@opentelemetry/contrib-test-utils