Skip to content

Cbt 20325#6

Open
chandrajeetn wants to merge 4 commits intoLambdaTest:mainfrom
chandrajeetn:CBT-20325
Open

Cbt 20325#6
chandrajeetn wants to merge 4 commits intoLambdaTest:mainfrom
chandrajeetn:CBT-20325

Conversation

@chandrajeetn
Copy link
Contributor

No description provided.

@chandrajeetn chandrajeetn requested a review from Copilot May 14, 2025 22:23
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a new polling mechanism and a client for connecting to a root organization service, integrating configuration, HTTP request handling, and feature flag evaluation.

  • Added a Poller class for periodic execution of asynchronous callbacks.
  • Implemented a LumsClient class to perform HTTP GET calls with error handling.
  • Updated the client and local evaluation scripts to integrate the new polling and configuration logic.

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
rootOrg/poller.js Introduces a simple polling mechanism with shutdown control.
rootOrg/lumsClient.js Adds an HTTP client based on axios with error handling for fetching root organizations.
rootOrg/index.js Exports the newly introduced modules for easier integration.
rootOrg/config.js Defines configuration with default polling intervals and timeouts.
rootOrg/client.js Implements a client combining polling and HTTP logic to update feature flags.
localEvaluation.js Updates local evaluation process to initialize the new client and integrate feature flag logic.
Files not reviewed (1)
  • package.json: Language not supported
Comments suppressed due to low confidence (1)

localEvaluation.js:10

  • [nitpick] The variable name 'flagConfigPollingIntervalMillis' suggests a value in milliseconds, but it appears to be defined in seconds and later multiplied by 1000. Consider renaming it to avoid confusion.
var flagConfigPollingIntervalMillis = process.env.LOCAL_EVALUATION_CONFIG_POLL_INTERVAL || 120;

let rootOrgClient = null;

var debug = process.env.LOCAL_EVALUATION_CONFIG_DEBUG || false;
var serverUrl = process.env.LOCAL_EVALUATION_CONFIG_SERVER_URL || "http://api.lambdatest.com";
Copy link
Contributor

Choose a reason for hiding this comment

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

https

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