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

fix: mongodb types fails to compile with latest tsc v4.8 #1141

Merged

Conversation

osherv
Copy link
Member

@osherv osherv commented Aug 31, 2022

There were some sub-packages that used the latest typescript version and caused errors against the deprecated @types/mongodb: 3.6.20 dependency.

Short description of the changes

  1. Moved the deprecated MongoDB dependency to a devDependency:

    • The use of @types/mongodb in the instrumentation itself was minor.
      All the places that used the MongoDB types were replaced with any as it applied in many other instrumentations,
      in order to avoid the use of deprecated dependencies.
  2. Aligned all typescript versions in the project to 4.3.5:
    There were three packages that were used latest typescript version (duo to "^version):

    • "koa-example"
    • express-example
    • @opentelemetry/resource-detector-docker

Also, we have to think about how to restrict those typescript version update changes.

Checklist

  • Ran npm run test-all-versions for the edited package(s) on the latest commit if applicable.

@osherv osherv requested a review from a team August 31, 2022 12:46
@codecov
Copy link

codecov bot commented Aug 31, 2022

Codecov Report

Merging #1141 (7b7b1cf) into main (11ab701) will decrease coverage by 3.68%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1141      +/-   ##
==========================================
- Coverage   96.07%   92.38%   -3.69%     
==========================================
  Files          14       28      +14     
  Lines         892     1511     +619     
  Branches      191      348     +157     
==========================================
+ Hits          857     1396     +539     
- Misses         35      115      +80     
Impacted Files Coverage Δ
...try-instrumentation-mongodb/src/instrumentation.ts 68.93% <100.00%> (ø)
...tor-docker/src/detectors/DockerCGroupV1Detector.ts 93.33% <0.00%> (ø)
...opentelemetry-instrumentation-mongodb/src/types.ts 100.00% <0.00%> (ø)
...opentelemetry-instrumentation-express/src/utils.ts 97.36% <0.00%> (ø)
...try-instrumentation-express/src/instrumentation.ts 99.29% <0.00%> (ø)
...lemetry-instrumentation-koa/src/instrumentation.ts 97.67% <0.00%> (ø)
...nstrumentation-express/src/enums/AttributeNames.ts 100.00% <0.00%> (ø)
...opentelemetry-instrumentation-express/src/types.ts 100.00% <0.00%> (ø)
...ode/opentelemetry-instrumentation-koa/src/utils.ts 100.00% <0.00%> (ø)
... and 5 more

@osherv osherv changed the title fix(compile-examples): fixed compile examples error fix: mongodb types not fail compilation with latest tsc v4.8 Aug 31, 2022
@blumamir blumamir changed the title fix: mongodb types not fail compilation with latest tsc v4.8 fix: mongodb types fails to compile with latest tsc v4.8 Aug 31, 2022
@blumamir
Copy link
Member

Thank you @osherv
Merging since this PR fixes our currently broken CI, and it already has 3 approves.

@blumamir blumamir merged commit ec9ee13 into open-telemetry:main Aug 31, 2022
@dyladan dyladan mentioned this pull request Aug 31, 2022
@osherv osherv deleted the fix/fix-compile-examples-failure branch September 1, 2022 07:44
@dyladan dyladan mentioned this pull request Feb 13, 2024
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.

4 participants