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: connect to upgrade-personal-to-team API #WPB-11992 #3103

Merged
merged 29 commits into from
Nov 20, 2024

Conversation

damian-kaczmarek
Copy link
Contributor

@damian-kaczmarek damian-kaczmarek commented Nov 13, 2024

TaskWPB-11992 [Android] Team creation for personal user - connect to the API - /upgrade-personal-to-team


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

Adds calls to the API when migrating from personal to team account.

Needs releases with:

Testing

Test Coverage (Optional)

Work in Progress

  • I have added automated test to this contribution

How to Test

To test you need to switch to anta
https://wearezeta.atlassian.net/wiki/spaces/ENGINEERIN/pages/300351887/Testing+environments+for+federation#anta

The html with deeplinks switching can be downloaded here. You must logout first before switching. https://wearezeta.atlassian.net/wiki/spaces/ENGINEERIN/pages/300351887/Testing+environments+for+federation#anta

To get signup code you must read the email from inbucket.
Password is on 1password.

Then:

  • create personal account
  • go to you profile page, at the top you will see migration banner
  • go through the process
  • at the you should see success screen
  • currently you will only see changes to your account after app restart, WIP: https://wearezeta.atlassian.net/browse/WPB-12187

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.

Copy link
Contributor

github-actions bot commented Nov 13, 2024

Test Results

3 299 tests  +10   3 192 ✅ +10   5m 12s ⏱️ +2s
  563 suites + 2     107 💤 ± 0 
  563 files   + 2       0 ❌ ± 0 

Results for commit e8b7477. ± Comparison against base commit 3bf74f0.

♻️ This comment has been updated with latest results.

@datadog-wireapp
Copy link

datadog-wireapp bot commented Nov 13, 2024

Datadog Report

Branch report: feature/upgrade-persona-team-api
Commit report: 0a755dd
Test service: kalium-jvm

✅ 0 Failed, 3192 Passed, 107 Skipped, 34.05s Total Time

@codecov-commenter
Copy link

codecov-commenter commented Nov 14, 2024

Codecov Report

Attention: Patch coverage is 41.90476% with 61 lines in your changes missing coverage. Please review.

Project coverage is 54.03%. Comparing base (3bf74f0) to head (e8b7477).

Files with missing lines Patch % Lines
...mocks/responses/MigrationUserToTeamResponseJson.kt 0.00% 31 Missing ⚠️
...etwork/api/authenticated/user/CreateUserTeamDTO.kt 0.00% 5 Missing ⚠️
...etworkContainer/AuthenticatedNetworkContainerV0.kt 0.00% 3 Missing ⚠️
...etworkContainer/AuthenticatedNetworkContainerV2.kt 0.00% 3 Missing ⚠️
...etworkContainer/AuthenticatedNetworkContainerV3.kt 0.00% 3 Missing ⚠️
...etworkContainer/AuthenticatedNetworkContainerV4.kt 0.00% 3 Missing ⚠️
...etworkContainer/AuthenticatedNetworkContainerV5.kt 0.00% 3 Missing ⚠️
...etworkContainer/AuthenticatedNetworkContainerV6.kt 0.00% 3 Missing ⚠️
...etworkContainer/AuthenticatedNetworkContainerV7.kt 0.00% 3 Missing ⚠️
...api/base/authenticated/UpgradePersonalToTeamApi.kt 0.00% 2 Missing ⚠️
... and 2 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3103      +/-   ##
===========================================
- Coverage    54.07%   54.03%   -0.05%     
===========================================
  Files         1232     1244      +12     
  Lines        36006    36111     +105     
  Branches      3653     3653              
===========================================
+ Hits         19469    19511      +42     
- Misses       15128    15190      +62     
- Partials      1409     1410       +1     
Files with missing lines Coverage Δ
.../com/wire/kalium/logic/data/user/UserRepository.kt 68.65% <100.00%> (+0.96%) ⬆️
...user/migration/MigrateFromPersonalToTeamUseCase.kt 100.00% <100.00%> (ø)
...api/v2/authenticated/UpgradePersonalToTeamApiV2.kt 100.00% <100.00%> (ø)
...api/v3/authenticated/UpgradePersonalToTeamApiV3.kt 100.00% <100.00%> (ø)
...api/v4/authenticated/UpgradePersonalToTeamApiV4.kt 100.00% <100.00%> (ø)
...api/v5/authenticated/UpgradePersonalToTeamApiV5.kt 100.00% <100.00%> (ø)
...api/v6/authenticated/UpgradePersonalToTeamApiV6.kt 100.00% <100.00%> (ø)
...api/v7/authenticated/UpgradePersonalToTeamApiV7.kt 100.00% <100.00%> (ø)
.../networkContainer/AuthenticatedNetworkContainer.kt 24.50% <ø> (ø)
.../com/wire/kalium/logic/data/user/CreateUserTeam.kt 0.00% <0.00%> (ø)
... and 11 more

... and 3 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 3bf74f0...e8b7477. Read the comment docs.

---- 🚨 Try these New Features:

@damian-kaczmarek damian-kaczmarek marked this pull request as ready for review November 18, 2024 07:12
}

sealed class MigrateFromPersonalToTeamResult {
data class Success(val teamId: String, val teamName: String) : MigrateFromPersonalToTeamResult()
Copy link
Member

@ohassine ohassine Nov 18, 2024

Choose a reason for hiding this comment

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

Do we need to pass to the app teamId and teamName ?, the app is already having those values

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed id as we don't use it. Left the team name and updated the state just in case API somehow changed the name

Copy link
Member

Choose a reason for hiding this comment

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

Yeah but API should not change a name provided by the user

Base automatically changed from feature/api-v7 to develop November 18, 2024 17:47
damian-kaczmarek and others added 7 commits November 19, 2024 13:42
Co-authored-by: Oussama Hassine <[email protected]>
…sona-team-api' into feature/upgrade-persona-team-api
…re/upgrade-persona-team-api

# Conflicts:
#	network/src/commonMain/kotlin/com/wire/kalium/network/api/v7/authenticated/networkContainer/AuthenticatedNetworkContainerV7.kt
Copy link
Contributor

@ohassine ohassine added this pull request to the merge queue Nov 20, 2024
Merged via the queue into develop with commit 2dccbfe Nov 20, 2024
22 checks passed
@ohassine ohassine deleted the feature/upgrade-persona-team-api branch November 20, 2024 12:45
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