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

Risk Card has "Unknown Risk" after 1.7.0 (RC2) Update (EXPOSUREAPP-3723) #1597

Merged
merged 4 commits into from Nov 16, 2020

Conversation

Oliver-Zimmerman
Copy link
Contributor

Description

Risk card is set to unknown after an update, regardless of state stored in the previous version.

Fix

Initial risk score in RiskLevelRepository was set to UNKNOWN_RISK_INITIAL, it is now changed to the last successfully calculated score which is stored in LocalData. If there isn't one (ie. Fresh install), it is set to the UNDETERMINED state.

Steps to reproduce

  1. App is installed 1.7.0(1) or 1.6 RC7
  2. Risk Card has a state (green or red) - timetravel forward a day if necessary to get LOW risk level
  3. do the update to 1.7.0 (2)
  4. Previously, the risk level would initially be unknown. Now it should stay the same.

@Oliver-Zimmerman Oliver-Zimmerman added the bug Something isn't working label Nov 13, 2020
@Oliver-Zimmerman Oliver-Zimmerman added this to the 1.7.0 milestone Nov 13, 2020
@Oliver-Zimmerman Oliver-Zimmerman requested a review from a team November 13, 2020 13:22
@harambasicluka harambasicluka added the maintainers Tag pull requests created by maintainers label Nov 13, 2020
@kolyaopahle kolyaopahle self-assigned this Nov 16, 2020
Copy link
Contributor

@kolyaopahle kolyaopahle left a comment

Choose a reason for hiding this comment

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

looks kind of weird without error handlingt at first but since LocalData.getLastSuccessfullRisk always returns Undetermined if nothing has been written yet i guess this is fine 👍

@kolyaopahle
Copy link
Contributor

actually, on a second note, is this fine? as before it would be UNKNOWN_RISK_INITIAL and now, if no risk is set it is UNDETERMINED. Could this cause any issues?

@Oliver-Zimmerman
Copy link
Contributor Author

Oliver-Zimmerman commented Nov 16, 2020

actually, on a second note, is this fine? as before it would be UNKNOWN_RISK_INITIAL and now, if no risk is set it is UNDETERMINED. Could this cause any issues?

@kolyaopahle
I believe this will only ever happen in the case of a fresh install, as soon as the appropriate amount of time has passed, it will change to the correct risk level. In the case of a fresh install and having it set to Unknown, the same thing happens.

Also, if you check the function setLastCalculatedRiskLevelAsCurrent() in RiskLevelRepistory, you can see that if it is set to UNDETERMINED, it gets set to UNKNOWN_RISK_INITIAL

@sonarcloud
Copy link

sonarcloud bot commented Nov 16, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@kolyaopahle
Copy link
Contributor

@kolyaopahle
I believe this will only ever happen in the case of a fresh install, as soon as the appropriate amount of time has passed, it will change to the correct risk level. In the case of a fresh install and having it set to Unknown, the same thing happens.
Also, if you check the function setLastCalculatedRiskLevelAsCurrent() in RiskLevelRepistory, you can see that if it is set to UNDETERMINED, it gets set to UNKNOWN_RISK_INITIAL

sounds good :)

@harambasicluka harambasicluka merged commit 73b9fbe into release/1.7.x Nov 16, 2020
@harambasicluka harambasicluka deleted the fix/3723-unknown-risk-after-update branch November 16, 2020 13:19
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