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: detect team app lock change (WPB-4476) #2183

Merged
merged 17 commits into from
Nov 8, 2023

Conversation

ohassine
Copy link
Member

@ohassine ohassine commented Nov 1, 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?

Description

In this PR I:

  • Added w new feature flag to default.json, to enforce team app lock from there.
  • Added isChanged value that will be used by client to display a dialog in case the config has changed.
  • Refactored abit to avoid some duplication
  • Added/adjusted some unit test

Dependencies (Optional)

Needed for wireapp/wire-android#2388

How to Test

Not testable only logic here


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.

…ck_change

# Conflicts:
#	logic/src/commonMain/kotlin/com/wire/kalium/logic/data/event/Event.kt
#	logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/UserSessionScope.kt
#	logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/applock/AppLockTeamFeatureConfigObserver.kt
#	logic/src/commonTest/kotlin/com/wire/kalium/logic/feature/applock/AppLockTeamFeatureConfigObserverTest.kt
Copy link
Contributor

github-actions bot commented Nov 2, 2023

Unit Test Results

   384 files   -   83     384 suites   - 83   18s ⏱️ - 2m 12s
2 241 tests  - 364  2 175 ✔️  - 326  66 💤  - 38  0 ±0 

Results for commit d217e60. ± Comparison against base commit 323edb6.

♻️ This comment has been updated with latest results.

@datadog-wireapp
Copy link

datadog-wireapp bot commented Nov 2, 2023

Datadog Report

Branch report: detect_team_app_lock_change
Commit report: 80fcc8e

kalium-jvm: 0 Failed, 0 New Flaky, 2508 Passed, 104 Skipped, 7m 10s Wall Time

@ohassine ohassine requested review from a team, yamilmedina, alexandreferris, MohamadJaara, vitorhugods, mchenani, Garzas, saleniuk and borichellow and removed request for a team November 2, 2023 08:02
Copy link
Contributor

@borichellow borichellow left a comment

Choose a reason for hiding this comment

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

LGTM, just a small code style suggestion :)

@codecov-commenter
Copy link

Codecov Report

Merging #2183 (d217e60) into develop (323edb6) will decrease coverage by 0.02%.
The diff coverage is 62.33%.

@@              Coverage Diff              @@
##             develop    #2183      +/-   ##
=============================================
- Coverage      57.94%   57.93%   -0.02%     
  Complexity        21       21              
=============================================
  Files           1067     1069       +2     
  Lines          40544    40588      +44     
  Branches        3749     3757       +8     
=============================================
+ Hits           23495    23515      +20     
- Misses         15433    15453      +20     
- Partials        1616     1620       +4     
Files Coverage Δ
...re/kalium/logic/configuration/AppLockTeamConfig.kt 100.00% <100.00%> (ø)
...ium/logic/data/featureConfig/FeatureConfigModel.kt 100.00% <100.00%> (ø)
...eature/applock/AppLockTeamFeatureConfigObserver.kt 100.00% <100.00%> (ø)
.../applock/MarkTeamAppLockStatusAsNotifiedUseCase.kt 100.00% <100.00%> (ø)
...om/wire/kalium/logic/featureFlags/KaliumConfigs.kt 100.00% <100.00%> (ø)
...n/kotlin/com/wire/kalium/logic/data/event/Event.kt 80.59% <0.00%> (ø)
...um/logic/data/featureConfig/FeatureConfigMapper.kt 70.78% <50.00%> (-1.13%) ⬇️
...ture/featureConfig/handler/AppLockConfigHandler.kt 72.72% <66.66%> (-27.28%) ⬇️
...ire/kalium/persistence/config/UserConfigStorage.kt 75.12% <57.14%> (-4.34%) ⬇️
...kalium/logic/configuration/UserConfigRepository.kt 52.63% <37.93%> (-1.84%) ⬇️

... and 5 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 323edb6...d217e60. Read the comment docs.

@ohassine ohassine added this pull request to the merge queue Nov 8, 2023
@ohassine ohassine removed this pull request from the merge queue due to a manual request Nov 8, 2023
@ohassine ohassine merged commit 603c0a3 into develop Nov 8, 2023
17 checks passed
@ohassine ohassine deleted the detect_team_app_lock_change branch November 8, 2023 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants