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

Bug 1829885: Snapshot code cleanup #5204

Merged
merged 1 commit into from Apr 30, 2020

Conversation

a2batic
Copy link
Contributor

@a2batic a2batic commented Apr 27, 2020

Screenshot from 2020-04-28 02-20-56
Screenshot from 2020-04-28 02-21-07

The PR:

  1. Removes snap scheduler code
  2. Removes Labels column for snapshot list
  3. Changes the format of Time using Timestamp component

Fixes: https://issues.redhat.com/browse/RHSTOR-1057
Signed-off-by: Kanika kmurarka@redhat.com

Comment on lines 56 to 61
handlePromise(k8sCreate(VolumeSnapshotModel, snapshotTemplate))
.then(close)
.catch((error) => {
// eslint-disable-next-line no-console
console.error(error);
});
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO logging can be avoided. Internally handlePromise will throw error.

Suggested change
handlePromise(k8sCreate(VolumeSnapshotModel, snapshotTemplate))
.then(close)
.catch((error) => {
// eslint-disable-next-line no-console
console.error(error);
});
// eslint-disable-next-line promise/catch-or-return
handlePromise(k8sCreate(VolumeSnapshotModel, snapshotTemplate))
.then(close)

Comment on lines 18 to 23
} from '@console/internal/components/factory';
import { SnapshotScheduleModel, VolumeSnapshotModel } from '../../../models';
import { cronLink, numberOfSnapshot, snapshotTypes } from './volume-snapshot';
import { VolumeSnapshotModel } from '../../../models';
import { snapshotTypes } from './volume-snapshot';
import { getName, getNamespace } from '@console/shared';

import { PersistentVolumeClaimModel } from '@console/internal/models';
Copy link
Contributor

Choose a reason for hiding this comment

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

console/shared and internal could be moved up.

@@ -169,7 +162,7 @@ export const VolumeSnapshotTableRow: RowFunction<K8sResourceKind> = ({
export const VolumeSnapshotList: React.FC<TableProps> = (props) => (
<Table
{...props}
aria-label="Volume Snapshot"
aria-label={VolumeSnapshotModel.labelPlural}
Copy link
Contributor

Choose a reason for hiding this comment

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

Should it not be more elaborate like Volume Snapshot List ?

Comment on lines 3 to 5
// CronJob: 'CronJob',
// Monthly: 'Monthly',
// Weekly: 'Weekly',
Copy link
Contributor

Choose a reason for hiding this comment

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

A comment for commenting would be nice or rather remove it.

</TableData>
<TableData className={snapshotTableColumnClasses[3]}>
{obj?.status?.restoreSize || 'No Data'}
{obj.status.restoreSize || 'No Data'}
Copy link
Contributor

Choose a reason for hiding this comment

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

In console if I am not wrong, if some data is not available then a dash is used - for lists.

export const snapshotTypes = {
Single: 'Single',
/* Other ways to create snapshot
Copy link
Contributor

Choose a reason for hiding this comment

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

Since you have removed all the code for snapshot other than single, it makes sense to remove these comments too. WDYT?

Copy link
Contributor

@afreen23 afreen23 left a comment

Choose a reason for hiding this comment

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

One minor comment.

@@ -169,7 +160,7 @@ export const VolumeSnapshotTableRow: RowFunction<K8sResourceKind> = ({
export const VolumeSnapshotList: React.FC<TableProps> = (props) => (
<Table
{...props}
aria-label="Volume Snapshot"
aria-label={'Volume Snapshot List'}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
aria-label={'Volume Snapshot List'}
aria-label='Volume Snapshot List'

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 30, 2020
Fixes: https://issues.redhat.com/browse/RHSTOR-1057
Signed-off-by: Kanika <kmurarka@redhat.com>
@a2batic
Copy link
Contributor Author

a2batic commented Apr 30, 2020

/retitle Bug 1829885: Snapshot code cleanup

@openshift-ci-robot openshift-ci-robot changed the title Snapshot code cleanup Bug 1829885: Snapshot code cleanup Apr 30, 2020
@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-unspecified Referenced Bugzilla bug's severity is unspecified for the PR. label Apr 30, 2020
@openshift-ci-robot
Copy link
Contributor

@a2batic: This pull request references Bugzilla bug 1829885, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

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

In response to this:

Bug 1829885: Snapshot code cleanup

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/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Apr 30, 2020
@a2batic
Copy link
Contributor Author

a2batic commented Apr 30, 2020

/bugzilla refresh

@openshift-ci-robot openshift-ci-robot added bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. and removed bugzilla/severity-unspecified Referenced Bugzilla bug's severity is unspecified for the PR. labels Apr 30, 2020
@openshift-ci-robot
Copy link
Contributor

@a2batic: This pull request references Bugzilla bug 1829885, which is valid.

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

In response to this:

/bugzilla refresh

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/test-infra repository.

@afreen23
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 30, 2020
@bipuladh
Copy link
Contributor

/approve

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: a2batic, afreen23, bipuladh

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-robot openshift-merge-robot merged commit 474f0e6 into openshift:master Apr 30, 2020
@openshift-ci-robot
Copy link
Contributor

@a2batic: All pull requests linked via external trackers have merged: openshift/console#5204. Bugzilla bug 1829885 has been moved to the MODIFIED state.

In response to this:

Bug 1829885: Snapshot code cleanup

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/test-infra repository.

@spadgett spadgett added this to the v4.5 milestone May 1, 2020
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. bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/ceph Related to ceph-storage-plugin lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants