Skip to content

Config service fixes & improvements #14

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

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

adams85
Copy link
Collaborator

@adams85 adams85 commented Apr 23, 2025

Describe the purpose of your pull request

This PR makes some corrections and improvements around config services:

  • Use monitonic clock (performance.now) instead of system clock (new Date()) for scheduling poll iterations in Auto Polling mode for improved precision and resistance to system clock adjustments (time sync, daylight saving, user initiated clock adjustments, etc.)
  • Correct the local cache refresh behavior in offline mode: if the client uses an external cache, a synchronization should happen in every case where a fetch operation would happen in online mode. For example, in Auto Polling mode, the background polling loop should sync with the external cache even when it doesn't initiate config fetch operations.
  • Change forceRefreshAsync to report failure and log a warning in offline mode only when the client is not configured to use an external cache. (Low impact behavioral BC.)
  • Make the clientReady event consistent with other SDKs in Auto Polling mode. When the client is offline, clientReady is emitted as soon as the initial sync with the external cache completes. (Low impact behavioral BC.)
  • Correct the intellisense docs for the clientReady event and the waitForReady method as the previous description was misleading.
  • Eliminate possible race condition between initial and user-initiated cache synchronization.
  • Make changes to also emit the configChanged event when the local cache is updated as a result of synchronization with the external cache. (Low impact behavioral BC.)
  • Introduce the configFetched event, which can be used to detect network issues in Auto Polling mode.

Related issues (only if applicable)

https://trello.com/c/XZdBOLY1
https://trello.com/c/mU63054x

How to test? (only if applicable)

n/a

Security (only if applicable)

n/a

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 force-pushed the configservice-improvements branch 4 times, most recently from 3bc4d5a to ca37ce0 Compare April 25, 2025 19:10
@adams85 adams85 force-pushed the configservice-improvements branch from ca37ce0 to 220d8ca Compare May 2, 2025 18:07
@adams85 adams85 marked this pull request as draft May 2, 2025 18:08
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.

1 participant