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

Use key package day/hour to determine data staleness (EXPOSUREAPP-4042) #1748

Merged

Conversation

d4rken
Copy link
Member

@d4rken d4rken commented Nov 27, 2020

  • Use the actual files in the key pkg store to determine whether our results are outdated, not the last time the key files were fetched.
  • If no key files are available yet treat it as "outdated" and abort, instead of throwing an exception.

Testing

Do some time traveling. If you time travel 48h past the last time for which packages are available, we display the error state card. "Risiko-Ermittlung nicht möglich".

@d4rken d4rken added bug Something isn't working maintainers Tag pull requests created by maintainers labels Nov 27, 2020
@d4rken d4rken added this to the 1.8.0 milestone Nov 27, 2020
@d4rken d4rken requested a review from a team November 27, 2020 13:20
@BMItr BMItr self-assigned this Nov 27, 2020
@BMItr
Copy link
Contributor

BMItr commented Nov 27, 2020

Screenshot_20201129-191928
little issues regarding error state. I'll send you details

defined threshold because [UNKNOWN_RISK_INITIAL] overrules [UNKNOWN_RISK_OUTDATED_RESULTS] */
return (timeSinceLastDiagnosisKeyFetchFromServer.millisecondsToHours() >
TimeVariables.getMaxStaleExposureRiskRange() && isActiveTracingTimeAboveThreshold()).also {
private suspend fun areKeyPkgsOutDated(nowUTC: Instant): Boolean {
Copy link
Contributor

@chris-cwa chris-cwa Nov 30, 2020

Choose a reason for hiding this comment

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

great!

@chris-cwa chris-cwa self-assigned this Nov 30, 2020
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.

already deep checked last friday.
code lgtm.
card issue will probably be solved with #1751 .
As this issue is unrelated a little here,.. approved

@sonarcloud
Copy link

sonarcloud bot commented Nov 30, 2020

Kudos, SonarCloud Quality Gate passed!

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

27.5% 27.5% Coverage
0.0% 0.0% Duplication

@harambasicluka harambasicluka merged commit cf863f0 into release/1.8.x Nov 30, 2020
@harambasicluka harambasicluka deleted the fix/4042-error-when-exiting-app-during-download branch November 30, 2020 14:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working maintainers Tag pull requests created by maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants