-
Notifications
You must be signed in to change notification settings - Fork 538
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
fix(instr-perf-hooks): avoid 'prepare' npm script because that runs on 'npm install' #1955
Conversation
…n 'npm install' Having a prepare script in the monorepo means that it runs during 'npm ci' which can break if some needed deps for that script haven't yet been installed.
Actually, I'm not sure the usage of a separate |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1955 +/- ##
=======================================
Coverage 91.04% 91.04%
=======================================
Files 147 147
Lines 7530 7530
Branches 1507 1507
=======================================
Hits 6856 6856
Misses 674 674 |
I mostly copied files from existing packages for
I think I must have copied an older version of another package that used
All of the dependencies in So this change LGTM. |
Thanks. I'll merge this now, and leave aligning the versions to a separate PR. |
* chore: remove the non-publishing packages from the npm workspace Because they cause difficulties with updating `@opentelemetry/*` dependencies. This is "Option 3" from #1917 Refs: #1917 * undo #1917 option 1 work (adding non-publishing packages to release-please config) from #1928 * move express example (haven't adjusted build / docs yet) * express example updates to get it working * remove non-publishing packages from release-please manifest * move koa example * fix up the koa-example-related files * move the mongodb/examples files to the top-level * fixup the mongodb-example files * move mysql-example files * fixup the mysql-example files * move redis-example files to top level examples/ dir * fixup redis-example files * update examples README to no longer suggest moving to instruemtnation package dirs * regenerate package-lock.json to rm the '.../examples' dir entries 'npm install --package-lock-only' did not accomplish this. This regen was necessary because those vestigial entries caused surprising breakage in some 'npm install --no-save ...' commands such as TAV is doing. It broke TAV tests with [email protected]. * compile:examples is no longer a thing * fix for 'npm ci' failures imported from PR #1955 * regenerate package-lock.json 'undici-types', required by the version of @types/node used by the new instrumentation-perf-hooks, was lost in the merge from main. * add some more test output information to try to help debug flaky test * fix tweaks to the test * undo the instr-perf-hooks test assert tweaks, leaving that to a separate PR
Done in #1967, FYI. |
Having a prepare script in the monorepo means that it runs during 'npm ci' which can break if some needed deps for that script haven't yet been installed.
details
This is the same change that was part of #1771
From that PR's description:
I hit a breakage in
npm ci
in a separate PR (#1938). A few of the checks started failing:E.g.: https://github.com/open-telemetry/opentelemetry-js-contrib/actions/runs/8023208091/job/21919224572?pr=1938 shows that
instrumentation-perf-hooks
's prepare and compile scripts were running duringnpm ci
:I don't fully understand the type issue here. I think a contributing factor is that the instrumentation-perf-hooks package has a dependency on a newer version of
@types/node
than is used in all other packages in this repo:@d4nyll Do you happen to know if the newer
@types/node
is required for the types used in instrumentation-perf-hooks?