-
Notifications
You must be signed in to change notification settings - Fork 284
Conversation
Add guard to prevent config processing if it didn't change.
# Conflicts: # src/xcode/ENA/ENA.xcodeproj/project.pbxproj
let bundle = Bundle(for: CachingHTTPClientMock.self) | ||
// there is a test for this (`testStaticAppConfiguration`), let's keep it short. | ||
guard | ||
let fixtureUrl = bundle.url(forResource: "de-config-int-2020-09-25", withExtension: nil), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just FYI, the app configuration format will change in the next two sprints which will likely break the deserialization. However, with the default app configuration on the horizon we might have this covered!
Unless we have a need for a bespoke config, we could use the static default configuration, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Made use if CachingHTTPClientMock.staticAppConfig
self.packageStore?.revokationList = revokationList // for future package-operations | ||
// validate currently stored key packages | ||
do { | ||
try self.packageStore?.validateCachedKeyPackages(revokationList: revokationList) | ||
} catch { | ||
Log.error("Error while removing invalidated key packages.", log: .localData, error: error) | ||
Log.error("[App Config] Error while removing invalidated key packages.", log: .localData, error: error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could create custom OSLog keys for .cache
and .appConfig
!? This would allow nicer filtering for the different components.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added .appConfig and used it.
Description
This PR prevents the race condition which is leading to trigger risk detection more then the timeframe (24h) allows.
The meta data and the cached app config are persisted at once, preventing data collisions when the cache called multiple times.
Link to Jira
links follows. Cant access jira atm.