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

fix: paginating fetch multiple users request [WPB-4999] #2165

Merged
merged 3 commits into from
Oct 26, 2023

Conversation

github-actions[bot]
Copy link
Contributor

Cherry pick from the original PR:


⚠️ Conflicts during cherry-pick:


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

Currently when the app needs to fetch multiple users details, it makes a single request with all userIds. When the list contains around 4000 items, the API returns 413 Content Too Large.

Solutions

Make this request paginated.

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

* fix: paginating fetch multiple users request [WPB-4999]

* fix logs to print only sizes

* fix imports

* add tests
@github-actions github-actions bot added the cherry-pick PR is cherry-picking changes from another banch label Oct 24, 2023
@github-actions
Copy link
Contributor Author

github-actions bot commented Oct 24, 2023

Unit Test Results

       1 files   - 462         1 suites   - 462   9s ⏱️ - 3m 41s
1 814 tests  - 762  1 809 ✔️  - 663  5 💤  - 99  0 ±0 

Results for commit 226ec98. ± Comparison against base commit b8dfcb5.

♻️ This comment has been updated with latest results.

@codecov-commenter
Copy link

Codecov Report

Merging #2165 (226ec98) into develop (b8dfcb5) will increase coverage by 0.00%.
The diff coverage is 83.33%.

@@            Coverage Diff             @@
##             develop    #2165   +/-   ##
==========================================
  Coverage      57.97%   57.97%           
  Complexity        21       21           
==========================================
  Files           1064     1064           
  Lines          40309    40319   +10     
  Branches        3733     3733           
==========================================
+ Hits           23368    23376    +8     
- Misses         15329    15330    +1     
- Partials        1612     1613    +1     
Files Coverage Δ
.../com/wire/kalium/logic/data/user/UserRepository.kt 59.38% <83.33%> (+1.85%) ⬆️

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b8dfcb5...226ec98. Read the comment docs.

@datadog-wireapp
Copy link

datadog-wireapp bot commented Oct 26, 2023

Datadog Report

All test runs eb1a686 🔗

2 Total Test Services: 0 Failed, 0 with New Flaky, 2 Passed

Test Services
Service Name Failed Known Flaky New Flaky Passed Skipped Wall Time Branch View
kalium-ios 0 0 0 1787 30 13.1s Link
kalium-jvm 0 0 0 2474 104 11m 45s Link

@saleniuk saleniuk added this pull request to the merge queue Oct 26, 2023
Merged via the queue into develop with commit 2fb391f Oct 26, 2023
15 checks passed
@saleniuk saleniuk deleted the fix/paginating_fetch_users_rc-cherry-pick branch October 26, 2023 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants