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 1828611: Add events for Noobaa for activity card #5142

Merged

Conversation

a2batic
Copy link
Contributor

@a2batic a2batic commented Apr 22, 2020

Add events for Noobaa Backing store, Noobaa Bucket class, OBC and OB for Object dashboard activity card

Screenshot from 2020-04-28 18-26-54

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

cc: @afreen23

@openshift-ci-robot openshift-ci-robot added the component/noobaa Related to noobaa-storage-plugin label Apr 22, 2020

const eventsResource: FirehoseResource = { isList: true, kind: EventModel.kind, prop: 'events' };

const isNoobaaEventObject = (event: EventKind): boolean => {
const eventName: string = _.get(event, 'involvedObject.name');
return _.startsWith(eventName, 'noobaa');
const component: string = _.get(event, 'source.component');
Copy link
Contributor

Choose a reason for hiding this comment

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

optional chaining is preferred, even for the line below

@rawagner
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 23, 2020
@afreen23
Copy link
Contributor

/retitle Add events for Noobaa for activity card

@openshift-ci-robot openshift-ci-robot changed the title Bug: Add events for Noobaa for activity card Add events for Noobaa for activity card Apr 24, 2020
@afreen23
Copy link
Contributor

/bugzilla refresh

@openshift-ci-robot
Copy link
Contributor

@afreen23: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

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

/retest

@afreen23
Copy link
Contributor

/test

@openshift-ci-robot
Copy link
Contributor

@afreen23: The /test command needs one or more targets.
The following commands are available to trigger jobs:

  • /test analyze
  • /test backend
  • /test e2e-gcp-console
  • /test frontend
  • /test images

Use /test all to run all jobs.

In response to this:

/test

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

/test all

@afreen23
Copy link
Contributor

/lgtm cancel

Just to fix this, cancelling.
Screenshot from 2020-04-24 19-46-06

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Apr 24, 2020
Comment on lines 20 to 22
import { DATA_RESILIENCE_QUERIES } from '../../queries';
import './activity-card.scss';
import { NooBaaBackingStoreModel, NooBaaBucketClassModel } from '../../models';
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit:
Can you fix the order of imports ?

if (
eventKind === PodModel.kind ||
eventKind === StatefulSetModel.kind ||
eventKind === NooBaaBackingStoreModel.kind ||
Copy link
Contributor

Choose a reason for hiding this comment

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

Backing store is a Noobaa entity, isNoobaaEventObject(event) can be avoided for this.

const eventKind: string = event?.involvedObject?.kind;
return (
_.startsWith(eventName, 'noobaa') ||
_.startsWith(component, 'noobaa') ||
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we using component and eventName both here ?

Comment on lines +22 to +25
import {
NooBaaBackingStoreModel,
NooBaaBucketClassModel,
NooBaaObjectBucketClaimModel,
} from '../../models';
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
import {
NooBaaBackingStoreModel,
NooBaaBucketClassModel,
NooBaaObjectBucketClaimModel,
} from '../../models';
import {
NooBaaBackingStoreModel,
NooBaaBucketClassModel,
NooBaaObjectBucketClaimModel,
} from '../../models';
import './activity-card.scss';

@a2batic a2batic force-pushed the noobaa-activity-card branch 2 times, most recently from f3a07ac to 5cc5fc4 Compare April 27, 2020 12:55
Comment on lines 35 to 43
const otherNoobaaEvents = (event: EventKind): boolean => {
const eventKind: string = event?.involvedObject?.kind;
return (
eventKind === NooBaaBackingStoreModel.kind ||
eventKind === NooBaaBucketClassModel.kind ||
eventKind === NooBaaObjectBucketClaimModel.kind
);
};

Copy link
Contributor

Choose a reason for hiding this comment

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

const noobaaResources = [ NooBaaBackingStoreModel.kind, NooBaaBucketClassModel.kind , NooBaaObjectBucketClaimModel.kind];

Comment on lines 49 to 52
if (otherNoobaaEvents(event)) {
return true;
}
return false;
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
if (otherNoobaaEvents(event)) {
return true;
}
return false;
return noobaaResources.includes(eventKind)

@a2batic
Copy link
Contributor Author

a2batic commented Apr 27, 2020

/retitle Bug 1828611: Add events for Noobaa for activity card

@openshift-ci-robot openshift-ci-robot changed the title Add events for Noobaa for activity card Bug 1828611: Add events for Noobaa for activity card Apr 27, 2020
@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-unspecified Referenced Bugzilla bug's severity is unspecified for the PR. label Apr 27, 2020
@openshift-ci-robot
Copy link
Contributor

@a2batic: This pull request references Bugzilla bug 1828611, 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 1828611: Add events for Noobaa for activity card

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 27, 2020
@openshift-ci-robot
Copy link
Contributor

@a2batic: This pull request references Bugzilla bug 1828611, 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:

Bug 1828611: Add events for Noobaa for activity card

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.

for Object dashboard activity card

Signed-off-by: Kanika <kmurarka@redhat.com>
@afreen23
Copy link
Contributor

/bugzilla refresh

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

@afreen23: This pull request references Bugzilla bug 1828611, 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.

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.

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

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

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 d7542c5 into openshift:master Apr 29, 2020
@openshift-ci-robot
Copy link
Contributor

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

In response to this:

Bug 1828611: Add events for Noobaa for activity card

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 Apr 29, 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-low Referenced Bugzilla bug's severity is low 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/noobaa Related to noobaa-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

6 participants