Skip to content

Conversation

krishagarwal278
Copy link
Member

No description provided.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 13, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Aug 13, 2025

@krishagarwal278: This pull request references CONSOLE-4693 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.20.0" version, but no target version was set.

In response to this:

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.

@krishagarwal278
Copy link
Member Author

/label docs-approved
/label px-approved

@openshift-ci openshift-ci bot added docs-approved Signifies that Docs has signed off on this PR px-approved Signifies that Product Support has signed off on this PR labels Aug 13, 2025
@openshift-ci openshift-ci bot requested review from jhadvig and rhamilto August 13, 2025 20:24
@openshift-ci openshift-ci bot added the component/core Related to console core functionality label Aug 13, 2025
Copy link
Contributor

openshift-ci bot commented Aug 13, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: krishagarwal278
Once this PR has been reviewed and has the lgtm label, please assign christoph-jerolimov for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@krishagarwal278
Copy link
Member Author

/assign @yanpzhan

@jhadvig
Copy link
Member

jhadvig commented Aug 15, 2025

/retest

1 similar comment
@krishagarwal278
Copy link
Member Author

/retest

@yanpzhan
Copy link
Contributor

There is not regression issue for the pr.
/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Aug 18, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Aug 18, 2025

@krishagarwal278: This pull request references CONSOLE-4693 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.20.0" version, but no target version was set.

In response to this:

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.

@@ -208,7 +208,7 @@ const ConsolePluginsTable: React.FC<ConsolePluginsTableProps> = ({ obj, rows, lo
const compare = React.useCallback<Comparator<ConsolePluginTableRow>>(
(a, b) => {
const { index, direction } = sortBy;
const { id } = columns[index];
const { id } = columns[index ?? 0];
Copy link
Contributor

Choose a reason for hiding this comment

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

Would default at destructuring not be cleaner?
const { index = 0, direction } = sortBy;

@@ -96,6 +96,10 @@ export const getControlPlaneHealth: PrometheusHealthHandler = (
resource,
infrastructure,
) => {
if (!t) {
return { state: HealthState.NOT_AVAILABLE };
Copy link
Contributor

Choose a reason for hiding this comment

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

Returning HealthState.NOT_AVAILABLE from the function if t is undefined doesn't seem right to me, but I might be wrong.
cc: @vojtechszocs

@@ -9,7 +9,7 @@ const ConsolePluginCSPStatusDetail: React.FC<DetailsItemComponentProps> = ({ obj
const pluginStore = usePluginStore();
const pluginName = React.useMemo(() => obj?.metadata?.name, [obj?.metadata?.name]);

const pluginInfo = React.useMemo(() => pluginStore.findDynamicPluginInfo(pluginName), [
const pluginInfo = React.useMemo(() => pluginStore.findDynamicPluginInfo(pluginName ?? ''), [
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be better to be consistent with the default value for pluginName = obj?.metadata?.name. The 'unknown' is used as the default in another place.

@krishagarwal278
Copy link
Member Author

/label tide/merge-method-squash

@openshift-ci openshift-ci bot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Aug 21, 2025
@krishagarwal278 krishagarwal278 requested a review from cajieh August 21, 2025 19:48
@@ -7,7 +7,7 @@ import { ConsolePluginCSPStatus } from './ConsoleOperatorConfig';

const ConsolePluginCSPStatusDetail: React.FC<DetailsItemComponentProps> = ({ obj }) => {
const pluginStore = usePluginStore();
const pluginName = React.useMemo(() => obj?.metadata?.name, [obj?.metadata?.name]);
const pluginName = React.useMemo(() => obj?.metadata?.name ?? 'unknown', [obj?.metadata?.name]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Unsure of "unknown" and empty string "", which should be the default for plugin name.
Let's discus this in scrum.

Alternatively, we could make pluginInfo to either return an object or null, which would fix this SNC.

const pluginInfo = React.useMemo(() => {
  return pluginName ? pluginStore.findDynamicPluginInfo(pluginName) : null;
}, [pluginStore, pluginName]);

@openshift-ci openshift-ci bot added the component/sdk Related to console-plugin-sdk label Aug 26, 2025
@krishagarwal278 krishagarwal278 requested a review from cajieh August 26, 2025 17:29
@@ -8,7 +8,7 @@ const ConsolePluginDescriptionDetail: React.FC<DetailsItemComponentProps> = ({ o
const pluginStore = usePluginStore();
const pluginName = React.useMemo(() => obj?.metadata?.name, [obj?.metadata?.name]);

const pluginInfo = React.useMemo(() => pluginStore.findDynamicPluginInfo(pluginName), [
const pluginInfo = React.useMemo(() => pluginStore.findDynamicPluginInfo(pluginName ?? ''), [
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this still throw an SNC error after making plugin.metadata.name optional?

@@ -15,7 +15,7 @@ const ConsolePluginEnabledStatusDetail: React.FC<DetailsItemComponentProps> = ({

const pluginName = React.useMemo(() => obj?.metadata?.name, [obj?.metadata?.name]);

const pluginInfo = React.useMemo(() => pluginStore.findDynamicPluginInfo(pluginName), [
const pluginInfo = React.useMemo(() => pluginStore.findDynamicPluginInfo(pluginName ?? ''), [
Copy link
Contributor

Choose a reason for hiding this comment

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

The same as stated previously.

@@ -25,11 +25,11 @@ const ConsolePluginEnabledStatusDetail: React.FC<DetailsItemComponentProps> = ({

return consoleOperatorConfigLoaded ? (
<ConsolePluginEnabledStatus
pluginName={pluginName}
pluginName={pluginName ?? ''}
Copy link
Contributor

Choose a reason for hiding this comment

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

The same as stated previously.

pluginName,
]);
const pluginManifest = React.useMemo(
() => pluginStore.getDynamicPluginManifest(pluginName ?? ''),
Copy link
Contributor

Choose a reason for hiding this comment

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

The same as stated previously.

@@ -8,7 +8,7 @@ const ConsolePluginStatusDetail: React.FC<DetailsItemComponentProps> = ({ obj })
const pluginStore = usePluginStore();
const pluginName = React.useMemo(() => obj?.metadata?.name, [obj?.metadata?.name]);

const pluginInfo = React.useMemo(() => pluginStore.findDynamicPluginInfo(pluginName), [
const pluginInfo = React.useMemo(() => pluginStore.findDynamicPluginInfo(pluginName ?? ''), [
Copy link
Contributor

Choose a reason for hiding this comment

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

The same as stated previously.

@@ -8,7 +8,7 @@ const ConsolePluginVersionDetail: React.FC<DetailsItemComponentProps> = ({ obj }
const pluginStore = usePluginStore();
const pluginName = React.useMemo(() => obj?.metadata?.name, [obj?.metadata?.name]);

const pluginInfo = React.useMemo(() => pluginStore.findDynamicPluginInfo(pluginName), [
const pluginInfo = React.useMemo(() => pluginStore.findDynamicPluginInfo(pluginName ?? ''), [
Copy link
Contributor

Choose a reason for hiding this comment

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

The same as stated previously.

@@ -11,7 +11,7 @@ const ClusterOperatorStatusRow: React.FC<OperatorRowProps<ClusterOperator>> = ({
<Status value={operatorStatus.status.title} icon={operatorStatus.status.icon}>
<ResourceLink
kind={referenceForModel(ClusterOperatorModel)}
name={operatorStatus.operators[0].metadata.name}
name={operatorStatus.operators[0]?.metadata?.name ?? ''}
Copy link
Contributor

Choose a reason for hiding this comment

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

Could be fine without a fallback value.

@krishagarwal278
Copy link
Member Author

/retest

@krishagarwal278
Copy link
Member Author

/label acknowledge-critical-fixes-only

@openshift-ci openshift-ci bot added the acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. label Aug 28, 2025
@krishagarwal278
Copy link
Member Author

/retest

Copy link
Contributor

openshift-ci bot commented Aug 28, 2025

@krishagarwal278: The following tests 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/frontend ee0a8f4 link true /test frontend
ci/prow/e2e-gcp-console ee0a8f4 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
acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. component/core Related to console core functionality component/sdk Related to console-plugin-sdk docs-approved Signifies that Docs has signed off on this PR jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. px-approved Signifies that Product Support has signed off on this PR qe-approved Signifies that QE has signed off on this PR tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants