-
Notifications
You must be signed in to change notification settings - Fork 365
Use the count directly to avoid 2 notifications calls per page #9536
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
Use the count directly to avoid 2 notifications calls per page #9536
Conversation
Depends on ManageIQ/manageiq-api#1293, which ensures that `count` actually is the full count we are looking for. Fixes ManageIQ#9448
.then((data) => { | ||
const notifications = data.resources.map(convert); | ||
|
||
return { | ||
notifications, | ||
subcount: data.subcount, | ||
subcount: data.count |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was going to rename this key to count
also, but that feels like a much more invasive change, so I left it for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great change.
Fixing the count in the notifications query was definitely the right approach.
@asirvadAbrahamVarghese Can you look at the failures on this one? I think we were expecting the notifications calls in the failing tests and now they're gone due to the changes in this PR. Can you try this PR locally and see if it's the explicit wait on the notifications that's the problem:
|
Oh I can remove them. I didn't realize we had waits on notifications |
Is this a blocker for an urgent release? PR #9516 will remove it |
Bumping CI after #9516 merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, 💚 tests. Thanks @asirvadAbrahamVarghese. LGTM @Fryguy.
Depends on ManageIQ/manageiq-api#1293, which ensures that
count
actually is the full count we are looking for.Fixes #9448
@kbrock Please review.