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(deps): update deps matching "@opentelemetry/*"; add dependency-check #72

Merged
merged 8 commits into from
Feb 13, 2024

Conversation

trentm
Copy link
Member

@trentm trentm commented Feb 12, 2024

0.34.1 -> 0.35.0 @opentelemetry/host-metrics (range-bump)
0.34.1 -> 0.35.0 @opentelemetry/instrumentation-express (range-bump)
0.47.0 -> 0.48.0 @opentelemetry/exporter-logs-otlp-proto (range-bump)
0.47.0 -> 0.48.0 @opentelemetry/exporter-metrics-otlp-proto (range-bump)
0.47.0 -> 0.48.0 @opentelemetry/exporter-trace-otlp-grpc (range-bump)
0.47.0 -> 0.48.0 @opentelemetry/exporter-trace-otlp-http (range-bump)
0.47.0 -> 0.48.0 @opentelemetry/exporter-trace-otlp-proto (range-bump)
0.47.0 -> 0.48.0 @opentelemetry/instrumentation-http (range-bump)
0.47.0 -> 0.48.0 @opentelemetry/sdk-node (range-bump)
1.20.0 -> 1.21.0 @opentelemetry/resources
  • update OTel deps to latest
  • add a dependency-check to npm run lint to watch for missing or unused deps
  • try out preferring deduped npm installs for now

    0.34.1 -> 0.35.0 @opentelemetry/host-metrics (range-bump)
    0.34.1 -> 0.35.0 @opentelemetry/instrumentation-express (range-bump)
    0.47.0 -> 0.48.0 @opentelemetry/exporter-logs-otlp-proto (range-bump)
    0.47.0 -> 0.48.0 @opentelemetry/exporter-metrics-otlp-proto (range-bump)
    0.47.0 -> 0.48.0 @opentelemetry/exporter-trace-otlp-grpc (range-bump)
    0.47.0 -> 0.48.0 @opentelemetry/exporter-trace-otlp-http (range-bump)
    0.47.0 -> 0.48.0 @opentelemetry/exporter-trace-otlp-proto (range-bump)
    0.47.0 -> 0.48.0 @opentelemetry/instrumentation-http (range-bump)
    0.47.0 -> 0.48.0 @opentelemetry/sdk-node (range-bump)
    1.20.0 -> 1.21.0 @opentelemetry/resources
@trentm trentm self-assigned this Feb 12, 2024
@trentm
Copy link
Member Author

trentm commented Feb 12, 2024

The package-lock changes show that we are using some deps without including in package.json deps, e.g. @opentelemetry/sdk-logs. I started adding the dependency-check tool that we using in elastic-apm-node.git to help guard against this. However, after npm dedupe and just installing that tool I now get this breakage:

[15:29:00 trentm@pink:~/el/elastic-otel-node3/packages/mockotlpserver (git:trentm/maint-update-otel-deps-20240212)]
% npm run lint:types

> @elastic/[email protected] lint:types
> tsc

../../node_modules/@types/glob/index.d.ts:29:42 - error TS2694: Namespace '"/Users/trentm/el/elastic-otel-node3/node_modules/minimatch/dist/cjs/index"' has no exported member 'IOptions'.

29     interface IOptions extends minimatch.IOptions {
                                            ~~~~~~~~

../../node_modules/@types/glob/index.d.ts:74:30 - error TS2724: '"/Users/trentm/el/elastic-otel-node3/node_modules/minimatch/dist/cjs/index"' has no exported member named 'IMinimatch'. Did you mean 'Minimatch'?

74         minimatch: minimatch.IMinimatch;
                                ~~~~~~~~~~


Found 2 errors in the same file, starting at: ../../node_modules/@types/glob/index.d.ts:29

npm ERR! Lifecycle script `lint:types` failed with error:
npm ERR! Error: command failed
npm ERR!   in workspace: @elastic/[email protected]
npm ERR!   at location: /Users/trentm/el/elastic-otel-node3/packages/mockotlpserver

What a PITA.

@trentm
Copy link
Member Author

trentm commented Feb 12, 2024

just installing that tool I now get this breakage:

My workaround here is to use --skipLibCheck with tsc in the mockotlpserver package as we are already doing (for a separate reason) in the opentelemetry-node package. Is this reasonable?

@trentm trentm changed the title chore(deps): update deps matching "@opentelemetry/*" chore(deps): update deps matching "@opentelemetry/*"; add dependency-check Feb 12, 2024
Copy link
Member

@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.

My workaround here is to use --skipLibCheck with tsc in the mockotlpserver package as we are already doing (for a separate reason) in the opentelemetry-node package. Is this reasonable?

Typing issues in Otel packages are well known and also its dependencies may have it as well. This is somethign we need to work in the upstream repo. I agree to use --skipLibCheck since we have to comply with the exposed APIs that we use in our code but IMHO its not mandatory to do this kind of checks internally. Another benefit is that the int process becomes lighter/faster.
Maybe we could have a specific script to do this deep checking for inspection and analysis locally.

NOTE: tsc init command which starts a TypeScript project generates a tsconfig.json file with recommended config options and one of them is "skipLibCheck": true

@trentm trentm merged commit 9fca1ec into main Feb 13, 2024
11 checks passed
@trentm trentm deleted the trentm/maint-update-otel-deps-20240212 branch February 13, 2024 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants