[MOB-16285] Get latest non pending shared state#800
Merged
cdhoffmann merged 14 commits intoadobe:dev-v3.5.1from May 9, 2022
Merged
[MOB-16285] Get latest non pending shared state#800cdhoffmann merged 14 commits intoadobe:dev-v3.5.1from
cdhoffmann merged 14 commits intoadobe:dev-v3.5.1from
Conversation
Codecov Report
@@ Coverage Diff @@
## dev-v3.5.1 #800 +/- ##
==============================================
- Coverage 87.90% 87.85% -0.06%
==============================================
Files 129 129
Lines 5671 5694 +23
==============================================
+ Hits 4985 5002 +17
- Misses 686 692 +6 |
kevinlind
reviewed
May 3, 2022
Contributor
kevinlind
left a comment
There was a problem hiding this comment.
Can you add test cases to cover the lines marked by Codecov as not covered?
…ter for resolution" This reverts commit fc4500f.
kevinlind
approved these changes
May 4, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In order to allow extensions to read cached config until the remote config is downloaded, a new API has been added to the
ExtensionRuntimewhich allows us to fetch the latest.setshared state before an event.In order to support this new API, we have added a new parameter to the
ExtensionRuntime'sgetSharedStatemethod, namelyresolution: SharedStateResolutionwhich is a new public Enum which currently holds the following values:.lastSetand.any. The API has a default parameter of resolution set to.anywhich will therefore not break compatibility.NOTE: If you are using a
TestableExtensionRuntimein your Extension, you will need to update it to use the new api though.In order to read the cached config until the remote config is downloaded, simply set the
resolutionparameter to.lastSetin your extension. This will get the last set sharedState which will contain the cachedConfig.