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

Handle App Config uniformly with caching (EXPOSUREAPP-2747) #1213

Merged
merged 9 commits into from
Sep 28, 2020

Conversation

d4rken
Copy link
Member

@d4rken d4rken commented Sep 23, 2020

Description

Our appconfig handling should meet the desired specs analog to iOS.
Most of the resiliance features were already built in but we didn't fall back to the last valid config all cases, now we do.

  • Some refactoring and better test coverage.

How to test

  • Run the app (fresh install too), check log for "AppConfig"
  • Use the app in adverse conditions (without internet etc.)
  • Check code and unit tests, tech spec should be met (see JIRA ticket)
  • The only case where you should see errors are on a fresh install without internet where no valid config has ever been loaded

* Use "files" instead of "cache" for storing our AppConfigApiTest.
* Add "files" to "cache" migration.
* Refactor CDN related code into an independent "environment module".

TODO: UnitTests, Fallback behavior even if cached AppConfig is stale.
@d4rken d4rken added enhancement Improvement of an existing feature maintainers Tag pull requests created by maintainers 1.5.0 labels Sep 23, 2020
@d4rken d4rken requested a review from a team September 23, 2020 09:04
Copy link
Contributor

@jakobmoellerdev jakobmoellerdev left a comment

Choose a reason for hiding this comment

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

Small Questions, other than that lgtm

@d4rken d4rken requested a review from a team September 23, 2020 16:20
# Conflicts:
#	Corona-Warn-App/src/main/java/de/rki/coronawarnapp/util/di/ApplicationComponent.kt
d4rken added a commit that referenced this pull request Sep 25, 2020
…ies.

TODO: Unit tests, pull supportedCountries from AppConfig (waiting for #1213)
@d4rken d4rken dismissed stale reviews from ralfgehrer and jakobmoellerdev via 9cf0980 September 28, 2020 07:16
@sonarqubecloud
Copy link

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

94.1% 94.1% Coverage
0.0% 0.0% Duplication

@d4rken d4rken merged commit 047ce4f into release/1.5.x Sep 28, 2020
@d4rken d4rken deleted the feature/appconfig-caching-improved branch September 28, 2020 07:57
d4rken added a commit that referenced this pull request Sep 30, 2020
* Update protobuf format

* Addition of contentToFederation and visistedCountries/supportedCountries.

TODO: Unit tests, pull supportedCountries from AppConfig (waiting for #1213)

* Fix invalid package being assigned.
This would break daggers annotation processing as the class could not be resolved.

* Improved existing and implemented new tests.

* Fixed test regression due to refactoring.

* Integrate pulling the supportedCountries data from the AppConfig for the submission transaction.
(Previously wasn't implemented yet, now it's merged)

* Address merge conflicts, and a little refactoring, and a bit more tests.

* Revert file change to Project.xml

* AppConfigProvider should insert "DE" as fallback if the supportedCountry list is empty/not supplied.

* Don't insert the fallback country at application config provider level.
The UI requires the list to be empty, if it is empty in the config.
I've moved the fallback country insertion into the transaction.

* Make detekt happy.

* Make klint happy.
@harambasicluka harambasicluka added this to the 1.5.0 milestone Oct 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Improvement of an existing feature maintainers Tag pull requests created by maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants