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

feat: handle adding participants while some of their backends are down (WPB-462) #1900

Merged
merged 21 commits into from
Jul 21, 2023

Conversation

yamilmedina
Copy link
Contributor

@yamilmedina yamilmedina commented Jul 19, 2023


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

In federated environments, there is a chance of unavailability backends while adding remote users.

Causes (Optional)

The whole operation fails and provides no feedback to the user.

Solutions

Parse new error when it is a federated error, handle the domain list to exclude those users and retry, finally generates a system message with MessageContent.MemberChange.FailedToAdd.

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.

@yamilmedina yamilmedina self-assigned this Jul 19, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jul 19, 2023

Unit Test Results

   405 files  +1     405 suites  +1   3m 7s ⏱️ + 1m 18s
2 189 tests +4  2 091 ✔️ +4  98 💤 ±0  0 ±0 

Results for commit c01d690. ± Comparison against base commit 0eeaf2c.

♻️ This comment has been updated with latest results.

@codecov-commenter
Copy link

Codecov Report

Merging #1900 (f8df876) into develop (d6fae62) will increase coverage by 0.05%.
The diff coverage is 85.45%.

@@              Coverage Diff              @@
##             develop    #1900      +/-   ##
=============================================
+ Coverage      54.91%   54.96%   +0.05%     
- Complexity      1627     1630       +3     
=============================================
  Files           1013     1014       +1     
  Lines          37299    37343      +44     
  Branches        3351     3359       +8     
=============================================
+ Hits           20481    20524      +43     
+ Misses         15450    15449       -1     
- Partials        1368     1370       +2     
Impacted Files Coverage Δ
...com/wire/kalium/logic/feature/auth/LoginUseCase.kt 85.93% <0.00%> (+1.56%) ⬆️
...onMain/kotlin/com/wire/kalium/logic/CoreFailure.kt 19.09% <40.00%> (+0.39%) ⬆️
...ic/data/conversation/AddingMembersFailureMapper.kt 66.66% <66.66%> (ø)
...c/data/conversation/ConversationGroupRepository.kt 94.66% <100.00%> (+0.63%) ⬆️
...ation/NewGroupConversationSystemMessagesCreator.kt 89.79% <100.00%> (+1.15%) ⬆️
.../kotlin/com/wire/kalium/logic/di/MapperProvider.kt 91.66% <100.00%> (+0.14%) ⬆️
...ire/kalium/network/api/base/model/ErrorResponse.kt 75.00% <100.00%> (+25.00%) ⬆️

... and 1 file 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 d6fae62...f8df876. Read the comment docs.

@yamilmedina yamilmedina marked this pull request as ready for review July 20, 2023 12:44
Copy link
Contributor

@Garzas Garzas left a comment

Choose a reason for hiding this comment

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

Looks awesome 🚀 Just some comment about magic numbers in tests

@yamilmedina yamilmedina enabled auto-merge (squash) July 21, 2023 09:31
@yamilmedina yamilmedina merged commit 82a1705 into develop Jul 21, 2023
9 checks passed
@yamilmedina yamilmedina deleted the feat/fed-addingparticipants branch July 21, 2023 09:54
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.

4 participants