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

OCPBUGS-30973: Update @types/react-redux #14680

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TheRealJon
Copy link
Member

@TheRealJon TheRealJon commented Jan 14, 2025

  • Update react-redux to latest v7 release, which includes @types/react
  • Remove dev dependency on @types/react-redux
  • Remove all @ts-ignore comments
  • Fix ts errors that were being hidden by @ts-ignore comments

@openshift-ci-robot openshift-ci-robot added jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Jan 14, 2025
@openshift-ci-robot
Copy link
Contributor

@TheRealJon: This pull request references Jira Issue OCPBUGS-30973, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.19.0) matches configured target version for branch (4.19.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @yapei

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

  • Update @types/react-redux to be in sync with react-redux version
  • Remove all @ts-ignore comments
  • Fix ts errors that were being hidden by @ts-ignore comments

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added component/core Related to console core functionality component/dashboard Related to dashboard approved Indicates a PR has been approved by an approver from all required OWNERS files. component/dev-console Related to dev-console component/gitops Related to gitops-plugin component/knative Related to knative-plugin component/network-attachment-definition Related to network-attachment-definition component/olm Related to OLM component/pipelines Related to pipelines-plugin component/sdk Related to console-plugin-sdk component/shared Related to console-shared component/topology Related to topology labels Jan 14, 2025
@TheRealJon
Copy link
Member Author

Replaces #14660

@@ -42,54 +34,4 @@ export const usePrometheusQuery: UsePrometheusQuery = (query, humanize) => {
return results;
};

const customSelectorCreator = createSelectorCreator(defaultMemoize, shallowEqual);
Copy link
Member Author

Choose a reason for hiding this comment

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

This was all dead code. Removed instead of fixing type definitions.

Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

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

Fantastic work 👍

/lgtm

Comment on lines -9 to +7
const userName = _.replace(user?.metadata?.name ?? '', /[^a-zA-Z0-9-]/g, '');
const userName = _.replace(user?.username ?? '', /[^a-zA-Z0-9-]/g, '');
Copy link
Member

Choose a reason for hiding this comment

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

Oh nice, found and fixed a bug here?

@@ -65,7 +63,7 @@ export const useK8sWatchResources: UseK8sWatchResources = (initResources) => {
k8sModelsRef.current = allK8sModels.filter(
(model) =>
requiredModels.includes(getReferenceForModel(model)) || requiredModels.includes(model.kind),
);
) as ImmutableMap<string, K8sModel>;
Copy link
Member

Choose a reason for hiding this comment

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

Would be good to understand why as is needed here. It's not obvious to me looking at the code.

But I definitely don't want to hold the PR on this.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 14, 2025
Copy link
Contributor

openshift-ci bot commented Jan 14, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: spadgett, TheRealJon

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

Update @types/react-redux to be in sync with react-redux version
Remove all @ts-ignore comments
Fix ts errors that were being hidden by @ts-ignore comments
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jan 14, 2025
Copy link
Contributor

openshift-ci bot commented Jan 14, 2025

New changes are detected. LGTM label has been removed.

Comment on lines -24 to -35
type WithPluralProps = {
kindObj?: K8sKind;
modelRef?: K8sResourceKindReference;
kindsInFlight?: boolean;
};

export type ConnectToPlural = <P extends WithPluralProps>(
C: React.ComponentType<P>,
) => React.ComponentType<Omit<P, keyof WithPluralProps>> & {
WrappedComponent: React.ComponentType<P>;
};

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed these types because they are incorrect, overly complex, and deprecated. Fixing the ts errors they cause are not worthwhile.

@TheRealJon
Copy link
Member Author

/retest

Copy link
Contributor

openshift-ci bot commented Jan 15, 2025

@TheRealJon: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-gcp-console 69b60bd link true /test e2e-gcp-console

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. component/core Related to console core functionality component/dashboard Related to dashboard component/dev-console Related to dev-console component/gitops Related to gitops-plugin component/knative Related to knative-plugin component/network-attachment-definition Related to network-attachment-definition component/olm Related to OLM component/pipelines Related to pipelines-plugin component/sdk Related to console-plugin-sdk component/shared Related to console-shared component/topology Related to topology jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants