Merge back into a single lerna monorepo#2892
Merge back into a single lerna monorepo#2892legendecas merged 20 commits intoopen-telemetry:mainfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2892 +/- ##
==========================================
- Coverage 92.76% 92.48% -0.29%
==========================================
Files 163 151 -12
Lines 5516 4841 -675
Branches 1159 1022 -137
==========================================
- Hits 5117 4477 -640
+ Misses 399 364 -35
|
|
AFAICT, Lerna can only bump all changed packages to the same version -- this is not what we expect of stable packages and experimental packages release works. Is yarn workspace an available choice? I found that react is using yarn workspace and publishes packages with different versions (scheduler v0.21.0, and react v18.0.0) at one time. |
My current plan is to use lerna independent mode and to create automations to ensure the stable packages are versioned together and the experimental packages are versioned together.
We considered yarn workspaces a long time ago and I can't remember exactly why it was rejected. I think it had to do with supporting old node versions but I could be wrong. NPM now also has workspace support but only for npm 7+. |
Oh, now I know lerna supports independent mode :O. This sounds great and may fit our use case. |
|
@open-telemetry/javascript-approvers sorry for the delay but this is ready to be reviewed now. Its a lot of files changed but should be relatively easy to review. |
experimental/packages/opentelemetry-api-metrics/src/types/Metric.ts
Outdated
Show resolved
Hide resolved
| "devDependencies": { | ||
| "@opentelemetry/api": "~1.1.0", | ||
| "@opentelemetry/api": "^1.0.0", | ||
| "@opentelemetry/context-async-hooks": "1.1.0", |
| @@ -54,10 +54,10 @@ | |||
| "@opentelemetry/sdk-trace-node": "~1.1.1" | |||
There was a problem hiding this comment.
Is it intended to use ~ here even for components which are now in the same lerna project?
There was a problem hiding this comment.
I think we should probably pin them
| "peerDependencies": { | ||
| "@opentelemetry/api": ">=1.1.0 <1.2.0", | ||
| "@opentelemetry/api": ">=1.0.0 <1.2.0", | ||
| "@opentelemetry/api-metrics": "~0.27.0" |
There was a problem hiding this comment.
Is it intended to have api-metrics as peer dependency here but as dependency in opentelemetry-sdk-metrics-base?
legendecas
left a comment
There was a problem hiding this comment.
I'm confused by the @opentelemetry/api version change. What benefit can we gain on that change?
The specification requires that an SDK support old API versions. This allows users to freely update their SDK without fear that dependencies which use an older API will break. |
experimental/packages/opentelemetry-api-metrics/src/types/Metric.ts
Outdated
Show resolved
Hide resolved
vmarchaud
left a comment
There was a problem hiding this comment.
looks fine for lerna but i'm not sure to understand why we changed back to SpanAttributes instead of Attributes ? Is this to support TS user with latest SDK but API <1.1 ?
Yes |
This is attempting to solve several pain points we've had which stem from the fact that our stable and experimental packages are not linked by lerna and aren't released together.
^1.0.0or>=1.0.0 <1.2.0in order to facilitate using older APIsKeeping this as a draft for now