-
Notifications
You must be signed in to change notification settings - Fork 518
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: fix contrib build #1374
chore: fix contrib build #1374
Conversation
Looks like this isn't supported in node 14. Another possibility is to drop mongo v3 right? |
Drop the support from the instrumentation or just not run the test? Looks like mongo latest 3 - |
The only other option I see besides that is to patch |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1374 +/- ##
==========================================
- Coverage 96.08% 92.72% -3.36%
==========================================
Files 14 133 +119
Lines 893 6639 +5746
Branches 191 1307 +1116
==========================================
+ Hits 858 6156 +5298
- Misses 35 483 +448
|
@open-telemetry/javascript-approvers @open-telemetry/javascript-maintainers since our build is currently broken, please have a look so we can merge fast. Thanks! |
Please note that this will raise the minimum required TS version to 4.4 because of a change in TS 4.4 which affects the output that causes older versions to fail to read it. The SDK and API already have 4.4.4 so this should be no impact to end users. In a future SIG meeting we will discuss a more general policy for upgrading typescript (not this week or next due to maintainer vacations). |
The referenced PR has been merged into logform. |
contrib CI and build is broken for several days due to 2 dependencies that were released lately and contained breaking changes:
MongoDB
MongoDB instrumentation supports both v3 and v4. for v3 we depend on the
@types/mongodb@3
package, which in turn depends on@types/bson@*
(This is a bug in definitely typed!). MongoDB released v5 last week which contains breaking changes (removing theObjectID
export). Since the types dependency does not limit a version range, the new version is used and since it's not compatible with v3 typescript fails.See related issue in defiantly typed.
To fix this, we have to depend on the real version of
bson
and not the incompatible latest.Things we tried and didn't work:
@types/mongodb
and we couldn't find any process for updating and releasing types packages for older major versions.@types/mongodb
altogether - this failed to compile and we were not knowledgable enough in ts to figure out how to make it work.The fix that resolved the issue was to introduce our own dependency on
@types/bson
which links to the correct version.Winston
Winston depends on
logform@^2.4.0
which published a new version yesterdayv2.5.0
.This version introduced types in the public API that are not a dependency of the package, thus breaking everyone using typescript. See more discussion in this issue and a fix (not yet merged) in this PR. Since the PR is not yet merged and the fix is not published, we need to fix this in our codebase to make our build work. In the future, when winston fixes the issue, we can remove the dependency on
@types/triple-beam
.The other issue is that the new
logform
version introduced this change which is only implemented in typescript in this PR which is not part of our current dependency4.3.5
. To fix this, we had to bump the dependency version (to4.5.5
) which also meant that all thecatch
clauses were nowunknown
instead ofany
introduced in[email protected]
. So for the code to transpile correctly, we had to type all those exceptions asany
which is not great, but it's the best we can do for now. This can be fixed in a followup PR if someone is up for it.CI is now green which will allow all other PRs to get merged.