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: update patch dependencies #1595

Merged
merged 5 commits into from
Aug 2, 2023

Conversation

haddasbronfman
Copy link
Member

@haddasbronfman haddasbronfman commented Jul 17, 2023

Which problem is this PR solving?

  • renovate PR fix(deps): update all patch versions #1593 was broken due to changes in @types/hapi__hapi which required manual fixes in hapi instrumentation. These changes are applied in this PR ( + renovate original changes).
  • The full log of error is here:
> @opentelemetry/instrumentation-hapi@0.32.0 compile
> tsc -p .

src/instrumentation.ts:105:38 - error TS2345: Argument of type '(originalRouter: <Refs extends Partial<Record<keyof ReqRefDefaults, unknown>> = ReqRefDefaults>(route: ServerRoute<Refs> | ServerRoute<Refs>[]) => void) => (this: Server, route: HapiServerRouteInput) => void' is not assignable to parameter of type '(original: <Refs extends Partial<Record<keyof ReqRefDefaults, unknown>> = ReqRefDefaults>(route: ServerRoute<Refs> | ServerRoute<Refs>[]) => void) => <Refs extends Partial<...> = ReqRefDefaults>(route: ServerRoute<...> | ServerRoute<...>[]) => void'.
  Type '(this: Hapi.Server, route: HapiServerRouteInput) => void' is not assignable to type '<Refs extends Partial<Record<keyof ReqRefDefaults, unknown>> = ReqRefDefaults>(route: ServerRoute<Refs> | ServerRoute<Refs>[]) => void'.
    Types of parameters 'route' and 'route' are incompatible.
      Type 'ServerRoute<Refs> | ServerRoute<Refs>[]' is not assignable to type 'HapiServerRouteInput'.
        Type 'ServerRoute<Refs>' is not assignable to type 'HapiServerRouteInput'.
          Type 'ServerRoute<Refs>' is not assignable to type 'PatchableServerRoute'.
            Type 'ServerRoute<Refs>' is not assignable to type 'ServerRoute<ReqRefDefaults>'.
              Types of property 'options' are incompatible.
                Type 'RouteOptions<Refs> | ((server: Server) => RouteOptions<Refs>) | undefined' is not assignable to type 'RouteOptions<ReqRefDefaults> | ((server: Server) => RouteOptions<ReqRefDefaults>) | undefined'.
                  Type 'RouteOptions<Refs>' is not assignable to type 'RouteOptions<ReqRefDefaults> | ((server: Server) => RouteOptions<ReqRefDefaults>) | undefined'.
                    Type 'RouteOptions<Refs>' is not assignable to type 'RouteOptions<ReqRefDefaults>'.
                      Types of property 'pre' are incompatible.
                        Type 'RouteOptionsPreArray<Refs> | undefined' is not assignable to type 'RouteOptionsPreArray<ReqRefDefaults> | undefined'.
                          Type 'RouteOptionsPreArray<Refs>' is not assignable to type 'RouteOptionsPreAllOptions<ReqRefDefaults>[]'.
                            Type 'RouteOptionsPreAllOptions<Refs>' is not assignable to type 'RouteOptionsPreAllOptions<ReqRefDefaults>'.
                              Type 'Method<Refs, ReturnValue<Refs>>' is not assignable to type 'RouteOptionsPreAllOptions<ReqRefDefaults>'.
                                Type 'Method<Refs, ReturnValue<Refs>>' is not assignable to type 'Method<ReqRefDefaults, ReturnValue<ReqRefDefaults>>'.
                                  Types of parameters 'request' and 'request' are incompatible.
                                    Type 'Request<ReqRefDefaults>' is not assignable to type 'Request<Refs>'.
                                      Type 'ReqRefDefaults' is not assignable to type 'Refs'.
                                        'ReqRefDefaults' is assignable to the constraint of type 'Refs', but 'Refs' could be instantiated with a different subtype of constraint 'Partial<Record<keyof ReqRefDefaults, unknown>>'.

105       self._wrap(newServer, 'route', originalRouter => {
                                         ~~~~~~~~~~~~~~~~~~~

src/instrumentation.ts:279:35 - error TS2345: Argument of type '(original: <Refs extends Partial<Record<keyof ReqRefDefaults, unknown>> = ReqRefDefaults>(route: ServerRoute<Refs> | ServerRoute<Refs>[]) => void) => (this: Server, route: HapiServerRouteInput) => void' is not assignable to parameter of type '(original: <Refs extends Partial<Record<keyof ReqRefDefaults, unknown>> = ReqRefDefaults>(route: ServerRoute<Refs> | ServerRoute<Refs>[]) => void) => <Refs extends Partial<...> = ReqRefDefaults>(route: ServerRoute<...> | ServerRoute<...>[]) => void'.
  Type '(this: Hapi.Server, route: HapiServerRouteInput) => void' is not assignable to type '<Refs extends Partial<Record<keyof ReqRefDefaults, unknown>> = ReqRefDefaults>(route: ServerRoute<Refs> | ServerRoute<Refs>[]) => void'.

279       self._wrap(server, 'route', original => {
                                      ~~~~~~~~~~~~~

src/instrumentation.ts:335:24 - error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'object | null'.

335           return await method(...params);
                           ~~~~~~~~~~~~~~~~~


Found 3 errors.

Short description of the changes

@haddasbronfman haddasbronfman changed the title Renovate hapi fix(Renovate hapi) Jul 17, 2023
@codecov
Copy link

codecov bot commented Jul 17, 2023

Codecov Report

Merging #1595 (2412206) into main (b5fc0c4) will decrease coverage by 2.42%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1595      +/-   ##
==========================================
- Coverage   96.06%   93.64%   -2.42%     
==========================================
  Files          14      111      +97     
  Lines         914     4973    +4059     
  Branches      199      918     +719     
==========================================
+ Hits          878     4657    +3779     
- Misses         36      316     +280     
Impacted Files Coverage Δ
...lemetry-instrumentation-hapi/src/internal-types.ts 100.00% <ø> (ø)
...tapackages/auto-instrumentations-node/src/utils.ts 98.78% <100.00%> (ø)
...emetry-instrumentation-hapi/src/instrumentation.ts 99.31% <100.00%> (ø)

... and 94 files with indirect coverage changes

@haddasbronfman haddasbronfman changed the title fix(Renovate hapi) fix(renovate): update hapi Jul 17, 2023
@blumamir blumamir changed the title fix(renovate): update hapi chore: update patch dependencies Jul 18, 2023
@haddasbronfman haddasbronfman merged commit db50d00 into open-telemetry:main Aug 2, 2023
12 of 13 checks passed
NurimOnsemiro pushed a commit to NurimOnsemiro/opentelemetry-js-contrib that referenced this pull request Aug 2, 2023
* fix(deps): update all patch versions

* fix(hapi): fix hapi test with new @types

* fix(hapi): lint

---------

Co-authored-by: Mend Renovate <bot@renovateapp.com>
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.