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 type error for dummyApplicationLiveState #5071

Merged
merged 1 commit into from
Jul 25, 2024
Merged

Conversation

ffjlabo
Copy link
Member

@ffjlabo ffjlabo commented Jul 25, 2024

What this PR does / why we need it:

I found the type some errors. This is for type ApplicationLiveState.

It does not affect the behavior because it's just a fixture.
The proto definition has changed in #4979.

I checked the type error for ApplicationLiveState disappeared.

Before

% npm run typecheck                                                                            (git)-[fix-dummy-fixture]

> [email protected] typecheck
> tsc --noEmit

src/__fixtures__/dummy-application-live-state.ts:60:14 - error TS2741: Property 'ecs' is missing in type '{ applicationId: string; healthStatus: ApplicationLiveStateSnapshot.Status.HEALTHY; kind: ApplicationKind.KUBERNETES; pipedId: string; version: { index: number; timestamp: number; }; ... 4 more ...; kubernetes: { ...; }; }' but required in type 'Required<AsObject>'.

60 export const dummyApplicationLiveState: ApplicationLiveState = {
                ~~~~~~~~~~~~~~~~~~~~~~~~~

  model/application_live_state_pb.d.ts:72:5
    72     ecs?: ECSApplicationLiveState.AsObject,
           ~~~
    'ecs' is declared here.

src/api/client.ts:10:17 - error TS2694: Namespace '"grpc-web"' has no exported member 'Error'.

10   (err: grpcWeb.Error, response: { toObject: () => Res }): void;
                   ~~~~~


Found 2 errors.

After

% npm run typecheck                                                                            (git)-[fix-dummy-fixture]

> [email protected] typecheck
> tsc --noEmit

src/api/client.ts:10:17 - error TS2694: Namespace '"grpc-web"' has no exported member 'Error'.

10   (err: grpcWeb.Error, response: { toObject: () => Res }): void;
                   ~~~~~


Found 1 error.

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

  • How are users affected by this change:
  • Is this breaking change:
  • How to migrate (if breaking change):

Copy link
Member

@t-kikuc t-kikuc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!
i noticed that too today #5021

Copy link

codecov bot commented Jul 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 22.80%. Comparing base (b0e40d5) to head (a8859dd).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5071   +/-   ##
=======================================
  Coverage   22.79%   22.80%           
=======================================
  Files         410      410           
  Lines       43382    43382           
=======================================
+ Hits         9891     9895    +4     
+ Misses      32712    32709    -3     
+ Partials      779      778    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@khanhtc1202 khanhtc1202 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, thanks 👍

@ffjlabo ffjlabo merged commit 804d963 into master Jul 25, 2024
16 of 18 checks passed
@ffjlabo ffjlabo deleted the fix-dummy-fixture branch July 25, 2024 08:53
This was referenced Jul 29, 2024
This was referenced Aug 13, 2024
@github-actions github-actions bot mentioned this pull request Aug 26, 2024
This was referenced Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants