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

chore(RHINENG-6147): Paginated requests #1163

Merged
merged 7 commits into from
Mar 5, 2024

Conversation

mkholjuraev
Copy link
Contributor

@mkholjuraev mkholjuraev commented Feb 15, 2024

Description

Associated Jira ticket: # RHINENG-6147

  1. Selection of all items was using API calls with limit=-1 across all pages where bulk selection is enabled. This PR converts it to use paginated requests.

  2. remediation issues fetching also fetching 1000 items per request, now it is reduced to 100.

  3. Unassigning/assigning templates had another usage of limit=-1. Now they are converted to use paginated requests.

How to test the PR

Please include steps to test your PR.

  1. Run the PR locally
  2. Observe that bulk selection works as expected in all tables
  3. Observe that you can assign/unassign templates as expected and there is no change in functionality
  4. Play with the remediation using both in bulk or from the table row actions, and observe the number of issues is correct.

Before the change

After the change

Resolves: RHINENG

Dependent work link

Checklist:

  • The commit message has the Jira ticket linked
  • PR has a short description
  • Screenshots before and after the change are added
  • Tests for the changes have been added
  • README.md is updated if necessary
  • Needs additional dependent work

@mkholjuraev mkholjuraev marked this pull request as ready for review February 16, 2024 13:11
@mkholjuraev mkholjuraev requested a review from a team as a code owner February 16, 2024 13:11
@codecov-commenter
Copy link

codecov-commenter commented Feb 16, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (ab9b4d5) 63.60% compared to head (daa004e) 63.69%.

Files Patch % Lines
src/Utilities/RemediationPairs.js 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1163      +/-   ##
==========================================
+ Coverage   63.60%   63.69%   +0.09%     
==========================================
  Files         126      126              
  Lines        3154     3173      +19     
  Branches      817      822       +5     
==========================================
+ Hits         2006     2021      +15     
- Misses       1148     1152       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gkarat gkarat changed the title Paginated requests chore(RHINENG-6147): Paginated requests Feb 27, 2024
@gkarat gkarat added enhancement New feature or request refactor labels Feb 27, 2024
@mkholjuraev
Copy link
Contributor Author

/retest

src/Utilities/hooks/useOnSelect.js Outdated Show resolved Hide resolved
src/Utilities/RemediationPairs.js Show resolved Hide resolved
src/SmartComponents/Advisories/Advisories.js Show resolved Hide resolved
Copy link
Contributor

@gkarat gkarat left a comment

Choose a reason for hiding this comment

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

OK, it feels like RedHatInsights/frontend-components#1954 hasn't been released yet for some reason. Let's merge this PR if you feel ready.

@mkholjuraev
Copy link
Contributor Author

@gkarat thank you for the review!

@mkholjuraev mkholjuraev merged commit b9294b4 into RedHatInsights:master Mar 5, 2024
1 of 2 checks passed
@mkholjuraev
Copy link
Contributor Author

🎉 This PR is included in version 1.67.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants