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

Dead code removal #2862

Merged
merged 1 commit into from
Jun 3, 2024
Merged

Conversation

rsun19
Copy link
Contributor

@rsun19 rsun19 commented May 29, 2024

Closes: RHOAIENG-2497

Description

Changed code based on feedback from the google doc linked on this ticket.

How Has This Been Tested?

npm run test

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 or cypress tests for related changes)

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

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress This PR is in WIP state label May 29, 2024
Copy link
Contributor

openshift-ci bot commented May 29, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@rsun19 rsun19 changed the title Dead code v2 [WIP] Dead code removal May 29, 2024
Copy link

codecov bot commented May 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.04%. Comparing base (2dc72ad) to head (c12ba9f).
Report is 32 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2862      +/-   ##
==========================================
+ Coverage   77.49%   78.04%   +0.54%     
==========================================
  Files        1109     1094      -15     
  Lines       23394    23246     -148     
  Branches     5890     5874      -16     
==========================================
+ Hits        18129    18142      +13     
+ Misses       5265     5104     -161     
Files Coverage Δ
frontend/src/api/k8s/dashboardConfig.ts 90.00% <ø> (+3.04%) ⬆️
frontend/src/api/k8s/projects.ts 97.43% <ø> (-0.53%) ⬇️
frontend/src/api/k8s/pvcs.ts 100.00% <ø> (+6.25%) ⬆️
frontend/src/api/k8s/roleBindings.ts 96.55% <ø> (+4.65%) ⬆️
frontend/src/api/modelRegistry/k8s.ts 100.00% <ø> (+20.00%) ⬆️
frontend/src/concepts/design/utils.ts 87.06% <ø> (+15.23%) ⬆️
...rc/concepts/pipelines/apiHooks/usePipelineQuery.ts 100.00% <ø> (ø)
frontend/src/concepts/pipelines/const.ts 100.00% <ø> (ø)
...tifacts/charts/confusionMatrix/ConfusionMatrix.tsx 75.00% <ø> (ø)
...nes/content/pipelineSelector/useCreateSelectors.ts 95.00% <ø> (+18.07%) ⬆️
... and 17 more

... and 25 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2dc72ad...c12ba9f. Read the comment docs.

@rsun19 rsun19 marked this pull request as ready for review May 30, 2024 22:37
@openshift-ci openshift-ci bot requested review from alexcreasy and ppadti May 30, 2024 22:38
@rsun19
Copy link
Contributor Author

rsun19 commented May 30, 2024

@christianvogt Up to date with confirmed changes/deletions

@rsun19 rsun19 changed the title [WIP] Dead code removal Dead code removal May 31, 2024
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress This PR is in WIP state label May 31, 2024
@rsun19 rsun19 changed the title Dead code removal [WIP ]Dead code removal May 31, 2024
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress This PR is in WIP state label May 31, 2024
@rsun19 rsun19 changed the title [WIP ]Dead code removal [WIP] Dead code removal May 31, 2024
@@ -23,8 +24,7 @@ const useDataConnections = (namespace?: string): FetchState<DataConnection[]> =>
).then((secrets) =>
secrets
.filter<AWSSecretKind>( // TODO: this will make more sense when we have more data connection types
(secret): secret is AWSSecretKind =>
!!secret.metadata.labels?.[KnownLabels.DATA_CONNECTION_AWS], // note, always true is fine for now
(secret): secret is AWSSecretKind => isSecretAWSSecretKind(secret), // note, always true is fine for now
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you not simply use the function as is?

Suggested change
(secret): secret is AWSSecretKind => isSecretAWSSecretKind(secret), // note, always true is fine for now
isSecretAWSSecretKind

@rsun19 rsun19 changed the title [WIP] Dead code removal Dead code removal Jun 3, 2024
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress This PR is in WIP state label Jun 3, 2024
@christianvogt
Copy link
Contributor

/lgtm
/approve

Copy link
Contributor

openshift-ci bot commented Jun 3, 2024

[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-ci openshift-ci bot added the approved label Jun 3, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit f52c060 into opendatahub-io:main Jun 3, 2024
8 checks passed
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.

2 participants