Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement non-blocking synchronous evaluation (snapshot API) #81

Merged
merged 9 commits into from
Apr 29, 2024

Conversation

adams85
Copy link
Contributor

@adams85 adams85 commented Nov 9, 2023

Describe the purpose of your pull request

Adds an API which makes it possible to synchronously evaluate feature flags/settings without block waiting for potential underlying I/O operations: consumers can create a snapshot of the client by IConfigCatClient.Snapshot(), which captures the client's state (including the latest config fetched) at that point, then, using the returned object, they can execute non-blocking synchronous evaluation operations.

Also

  • adds a parameter named CacheState to the event args of the ClientReady hook, by means of which consumers can get information about the initialization state of the client,
  • adds warnings to the XML documentation of the blocking synchronous methods of IConfigCatClient.

Requirement checklist (only if applicable)

  • I have covered the applied changes with automated tests.
  • I have executed the full automated test set against my changes.
  • I have validated my changes against all supported platform versions.
  • I have read and accepted the contribution agreement.

@adams85 adams85 requested a review from a team as a code owner November 9, 2023 15:15
@adams85 adams85 marked this pull request as draft November 9, 2023 15:20
@adams85 adams85 force-pushed the snapshot-api branch 3 times, most recently from de68209 to a5f4a7f Compare November 18, 2023 20:14
@adams85 adams85 marked this pull request as ready for review November 18, 2023 20:26
Copy link

sonarcloud bot commented Nov 28, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

85.8% 85.8% Coverage
0.2% 0.2% Duplication

Copy link

sonarcloud bot commented Jan 9, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

10 New issues
0 Security Hotspots
85.4% Coverage on New Code
0.2% Duplication on New Code

See analysis details on SonarCloud

# Conflicts:
#	src/ConfigCat.Client.Tests/ConfigCatClientTests.cs
#	src/ConfigCatClient/ConfigCatClient.cs
#	src/ConfigCatClient/Hooks/Hooks.cs
#	src/ConfigCatClient/Hooks/SafeHooksWrapper.cs
Copy link

sonarcloud bot commented Apr 29, 2024

@adams85 adams85 merged commit 718440b into master Apr 29, 2024
5 checks passed
@adams85 adams85 deleted the snapshot-api branch April 29, 2024 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants