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

Added @typescript-eslint/explicit-module-boundary-types rule #2298

Merged
merged 1 commit into from
Dec 15, 2023

Conversation

pnaik1
Copy link
Contributor

@pnaik1 pnaik1 commented Dec 12, 2023

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):

  • The developer has manually tested the changes and verified that the changes work
  • Commits have been squashed into descriptive, self-contained units of work (e.g. 'WIP' and 'Implements feedback' style messages have been removed)
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has added tests or explained why testing cannot be added (unit tests & storybook for related changes)

If you have UI changes:

  • Included any necessary screenshots or gifs if it was a UI change.
  • Included tags to the UX team if it was a UI/UX change (find relevant UX in the SMEs section).

After the PR is posted & before it merges:

  • The developer has tested their solution on a cluster by using the image produced by the PR to main

Comment on lines +16 to +35
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 => ({
Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Contributor

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

Copy link
Contributor

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.

frontend/src/utilities/useDraggableTable.ts Outdated Show resolved Hide resolved
@openshift-merge-robot openshift-merge-robot added the needs-rebase PR needs to be rebased label Dec 13, 2023
@christianvogt
Copy link
Contributor

/lgtm
/approve

Copy link
Contributor

openshift-ci bot commented Dec 15, 2023

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 542eb96 into opendatahub-io:main Dec 15, 2023
6 checks passed
@pnaik1 pnaik1 deleted the RHOAIENG-506 branch July 22, 2024 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants