Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Warning package download & scheduling (EXPOSUREAPP-5695,EXPOSUREAPP-5696) #2707

Merged
merged 86 commits into from
Apr 7, 2021

Conversation

chiljamgossow
Copy link
Contributor

@chiljamgossow chiljamgossow commented Mar 29, 2021

This PR adds the download of warnings for tracelocations, wires up the download/calculation logic to be regularly executed. Some additional refactoring and and polishing too.

  • Adds a worker to regularly launch a Task that downloads TraceWarningPackage's and processes them if they have not yet been processed.
  • The worker calls the TraceWarningPackageSyncTool
    • It will clean up inconsistent data states and revoke data if necessary.
    • It compares: Our Check Ins <> What The Server Has <> What We Have Already Processed and download any missing data.
    • New data is unprocessed and thus be available to the CheckInWarningMatcher.
  • Unprocessed packages are given to the CheckInWarningMatcher
    • It will compare them against local CheckIns and possible generate a high risk state by adding data to PresenceTracingRiskRepository.
    • Processed packages are marked, deleted and will not be processed again.

This PR contains #2739.

Testing hints

  • The test menu has entries to execute the task which would trigger both download and matching.
  • Filter log for Warning and TraceWarning.

@chiljamgossow chiljamgossow requested a review from a team March 29, 2021 11:41
@chiljamgossow chiljamgossow marked this pull request as draft March 29, 2021 11:41
@chiljamgossow chiljamgossow changed the title Feature/5696 warning download Downloag warning packages (EXPOSUREAPP-5696) Mar 29, 2021
@chiljamgossow chiljamgossow changed the title Downloag warning packages (EXPOSUREAPP-5696) Download warning packages (EXPOSUREAPP-5696) Mar 29, 2021
@harambasicluka harambasicluka added the maintainers Tag pull requests created by maintainers label Mar 29, 2021
@harambasicluka harambasicluka added this to the 2.0.0 milestone Mar 29, 2021
@d4rken d4rken self-assigned this Mar 30, 2021
d4rken added 7 commits March 31, 2021 10:34
# Conflicts:
#	Corona-Warn-App/src/deviceForTesters/java/de/rki/coronawarnapp/test/eventregistration/ui/EventRegistrationTestFragment.kt
#	Corona-Warn-App/src/deviceForTesters/java/de/rki/coronawarnapp/test/eventregistration/ui/EventRegistrationTestFragmentViewModel.kt
#	Corona-Warn-App/src/deviceForTesters/res/layout/fragment_test_eventregistration.xml
#	Corona-Warn-App/src/main/java/de/rki/coronawarnapp/eventregistration/EventRegistrationModule.kt
@d4rken d4rken removed their assignment Apr 1, 2021
@d4rken d4rken added the prio PRs to review first. label Apr 1, 2021
d4rken added 5 commits April 1, 2021 11:28
# Conflicts:
#	Corona-Warn-App/src/main/java/de/rki/coronawarnapp/eventregistration/EventRegistrationModule.kt
#	Corona-Warn-App/src/main/java/de/rki/coronawarnapp/util/worker/WorkerBinder.kt
@d4rken d4rken changed the title Download warning packages (EXPOSUREAPP-5696) Warning package download & scheduling (EXPOSUREAPP-5695,EXPOSUREAPP-5696) Apr 1, 2021
d4rken added 2 commits April 2, 2021 09:12
# Conflicts:
#	Corona-Warn-App/src/main/java/de/rki/coronawarnapp/eventregistration/checkins/download/TraceTimeIntervalWarningRepository.kt
#	Corona-Warn-App/src/main/java/de/rki/coronawarnapp/presencetracing/risk/CheckInWarningMatcher.kt
#	Corona-Warn-App/src/test/java/de/rki/coronawarnapp/presencetracing/risk/CheckInWarningMatcherTest.kt
@mtwalli mtwalli self-assigned this Apr 7, 2021
BMItr
BMItr previously approved these changes Apr 7, 2021
Copy link
Contributor

@BMItr BMItr left a comment

Choose a reason for hiding this comment

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

thx for addressing comments.
lgtm

@d4rken d4rken added the author merge PR to be merged by author label Apr 7, 2021
harambasicluka and others added 11 commits April 7, 2021 13:41
If there are no CheckIns, the SyncTool will have deleted all matches already.
# Conflicts:
#	Corona-Warn-App/src/deviceForTesters/java/de/rki/coronawarnapp/test/eventregistration/ui/EventRegistrationTestFragment.kt
#	Corona-Warn-App/src/main/java/de/rki/coronawarnapp/contactdiary/ui/overview/ContactDiaryOverviewViewModel.kt
#	Corona-Warn-App/src/test/java/de/rki/coronawarnapp/contactdiary/ui/overview/ContactDiaryOverviewViewModelTest.kt
@d4rken d4rken dismissed stale reviews from BMItr, jurajkusnier, and AlexanderAlferov via c82cd49 April 7, 2021 12:58
@sonarcloud
Copy link

sonarcloud bot commented Apr 7, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

29.2% 29.2% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@mtwalli mtwalli left a comment

Choose a reason for hiding this comment

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

Thanks

@d4rken d4rken merged commit 63050ac into release/2.0.x Apr 7, 2021
@d4rken d4rken deleted the feature/5696-warning-download branch April 7, 2021 13:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
author merge PR to be merged by author maintainers Tag pull requests created by maintainers prio PRs to review first.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants