-
Notifications
You must be signed in to change notification settings - Fork 167
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
Added @typescript-eslint/explicit-module-boundary-types rule #2298
Conversation
type InferenceServicek8sError = { | ||
kind: string; | ||
apiVersion: string; | ||
metadata: Record<string, unknown>; | ||
status: string; | ||
message: string; | ||
reason: string; | ||
details: { | ||
name: string; | ||
group: string; | ||
kind: string; | ||
causes: { | ||
reason: string; | ||
message: string; | ||
field: string; | ||
}[]; | ||
}; | ||
}; | ||
|
||
export const mockInferenceServicek8sError = (): InferenceServicek8sError => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be a variant on the K8sStatus
type we have in the backend. We should bring a similar type to the frontend. Add to frontend/src/types.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we do have k8sStatus in k8types.ts file in frontend folder ,Can we make use of that and write it in this way in src/types.ts?
export type InferenceStatus = K8sStatus & {
metadata: Record<string, unknown>;
details: {
name: string;
group: string;
kind: string;
causes: {
reason: string;
message: string;
field: string;
}[];
};
};
Is it okay if I change the code key to optional in K8sTypes.ts? since we don't have it here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pnaik1 I'd like to match the kubernetes Status definition. I just need to find it first :) I'll report back
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's address this in a followup PR because having to rebase this issue to keep up with changes is painful.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: christianvogt The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Closes: RHOAIENG-506
Description
Added @typescript-eslint/explicit-module-boundary-types as an error frontend/backend
How Has This Been Tested?
npm run test
Test Impact
Request review criteria:
Self checklist (all need to be checked):
If you have UI changes:
After the PR is posted & before it merges:
main