Skip to content

chore: upgrade lerna #2836

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

Open
wants to merge 66 commits into
base: main
Choose a base branch
from

Conversation

david-luna
Copy link
Contributor

Which problem is this PR solving?

This is a follow up PR of #2493. It updates lerna to version v8.2.2, which indirectly updates nx. Dev scripts are using nx directly but publish workflows and tasks keep using lerna

Changes

  • remove unnecessary scripts in packages (precompile & prewatch)
  • upgrade lerna dependency
  • update scripts/peer-api-check.mjs to work at the root level and the dependant workflows
  • update scripts/check-release-please.mjs, simplification
  • added a focus npm script for people who does not want to compile all project to start developing
  • update docs

Supersedes: #2526

Copy link

codecov bot commented May 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.68%. Comparing base (55cc256) to head (1773343).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2836      +/-   ##
==========================================
+ Coverage   89.63%   89.68%   +0.04%     
==========================================
  Files         184      184              
  Lines        9003     9003              
  Branches     1845     1845              
==========================================
+ Hits         8070     8074       +4     
+ Misses        933      929       -4     

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@david-luna david-luna marked this pull request as draft May 19, 2025 17:12
@david-luna david-luna marked this pull request as ready for review May 19, 2025 21:41
Copy link
Contributor

This package does not have an assigned component owner and is considered unmaintained. As such this package is in feature-freeze and this PR will be closed with 14 days unless a new owner or a sponsor (a member of @open-telemetry/javascript-approvers) for the feature is found. It is the responsibility of the author to find a sponsor for this feature.
Are you familiar with this package? Consider becoming a component owner.

@david-luna david-luna marked this pull request as ready for review May 20, 2025 12:30
Copy link
Member

@pichlermarc pichlermarc left a comment

Choose a reason for hiding this comment

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

looks good % a few nits, thanks for working on this 🙂

I think RELEASING.md can be removed as we likely won't release manually anymore now that we also add provenance statements to our published packages.

popd
done
```sh
npx lerna publish from-package --no-push --no-private --no-git-tag-version --no-verify-access --yes
Copy link
Member

Choose a reason for hiding this comment

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

I think the whole RELEASING.md can be removed, or we can refer to the release-please workflow that basically handles all the releases now. 🙂

(In the 2.5 years I've been a maintainer, I've never needed to do a manual release in the contrib repo 🙂)

"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
"precompile": "lerna run version --scope @opentelemetry/propagator-aws-xray --include-dependencies",
"prewatch": "npm run precompile"
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json"
Copy link
Contributor

Choose a reason for hiding this comment

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

Q: I am ignorant here. Does removing this precompile mean that I see the npm run compile at the top-level before working on this package? (Maybe that is already a requirement.)

CONTRIBUTING.md Outdated
@@ -119,6 +119,29 @@ Some tests depend on other packages to be installed, so these steps are also req

Each of these commands can also be run in individual packages, as long as the initial install and compile are done first in the root directory.

If you're going to work on a single package and want to quickly jump into its development you can make use of the `focus` script. This scritp will run
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:

Suggested change
If you're going to work on a single package and want to quickly jump into its development you can make use of the `focus` script. This scritp will run
If you're going to work on a single package and want to quickly jump into its development you can make use of the `focus` script. This script will run

@@ -119,6 +119,29 @@ Some tests depend on other packages to be installed, so these steps are also req

Each of these commands can also be run in individual packages, as long as the initial install and compile are done first in the root directory.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it woudl be helpful to have a separate section header for this new focus thing.

popd
done
```sh
npx lerna publish from-package --no-push --no-private --no-git-tag-version --no-verify-access --yes
Copy link
Contributor

@trentm trentm May 21, 2025

Choose a reason for hiding this comment

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

From the top of this file:

For posterity, or in the event of any failures with release-please, the process for performing a manual release is below.

Given this gets out of date, it would possibly be better to drop it. I'd defer to @pichlermarc for an opinion on that as he does most of the releasing.

Update: Marc already gave an opinion on this above (#2836 (comment)).

> NX Successfully ran target compile for project @opentelemetry/resource-detector-aws and 3 tasks it depends on (7s)
```

Once the command is done you can `cd` into the package and start using the usual commands.
Copy link
Contributor

Choose a reason for hiding this comment

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

(non-blocking) I'm not opposed to this command, but it would be kind of nice to not have to type out both (a) the package name and (b) the directory for that package.

Possible alternative:

cd detectors/node/opentelemetry-resource-detector-aws   # or whatever package to focus on
npm run compile:include-deps

Or perhaps others would find a command at the top-level more convenient? My personal typical development process is that I cd into the package dir I am working on and work from there. So an npm run ... script in that package dir would be convenient for me.

david-luna and others added 2 commits May 21, 2025 20:39
Co-authored-by: Marc Pichler <[email protected]>
Co-authored-by: Marc Pichler <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg:auto-configuration-propagators pkg:auto-instrumentations-node pkg:auto-instrumentations-web pkg:host-metrics pkg:id-generator-aws-xray pkg:instrumentation-amqplib pkg:instrumentation-aws-lambda pkg:instrumentation-aws-sdk pkg:instrumentation-bunyan pkg:instrumentation-cassandra-driver pkg:instrumentation-connect pkg:instrumentation-cucumber pkg:instrumentation-dataloader pkg:instrumentation-dns pkg:instrumentation-document-load pkg:instrumentation-express pkg:instrumentation-fastify pkg:instrumentation-fs pkg:instrumentation-generic-pool pkg:instrumentation-graphql pkg:instrumentation-hapi pkg:instrumentation-ioredis pkg:instrumentation-kafkajs pkg:instrumentation-knex pkg:instrumentation-koa pkg:instrumentation-long-task pkg:instrumentation-lru-memoizer pkg:instrumentation-memcached pkg:instrumentation-mongodb pkg:instrumentation-mongoose pkg:instrumentation-mysql pkg:instrumentation-mysql2 pkg:instrumentation-nestjs-core pkg:instrumentation-net pkg:instrumentation-oracledb pkg:instrumentation-pg pkg:instrumentation-pino pkg:instrumentation-redis pkg:instrumentation-redis-4 pkg:instrumentation-restify pkg:instrumentation-router pkg:instrumentation-runtime-node pkg:instrumentation-socket.io pkg:instrumentation-tedious pkg:instrumentation-undici pkg:instrumentation-user-interaction pkg:instrumentation-winston pkg:plugin-react-load pkg:propagation-utils pkg:propagator-aws-xray pkg:propagator-aws-xray-lambda pkg:propagator-instana pkg:propagator-ot-trace pkg:redis-common pkg:resource-detector-alibaba-cloud pkg:resource-detector-aws pkg:resource-detector-azure pkg:resource-detector-container pkg:resource-detector-gcp pkg:resource-detector-github pkg:resource-detector-instana pkg:sampler-aws-xray pkg:sql-common pkg:test-utils pkg-status:unmaintained:autoclose-scheduled pkg-status:unmaintained This package is unmaintained. Only bugfixes may be acceped until a new owner has been found.
Projects
None yet
Development

Successfully merging this pull request may close these issues.