powerplatform-vscode icon indicating copy to clipboard operation
powerplatform-vscode copied to clipboard

ECS support infra - Introducing ECS feature flag read call via a common module

Open tyaginidhi opened this issue 2 years ago • 0 comments

This module can be consumed for reading the latest feature flags set for a user in both desktop and web extension. The API call will currently honor userId, tenantId, region and tenantId filters. More filters support will be introduced in subsequent PR.

Covered: Why direct ECS API consumption here: ECS JS library is currently not supported for external repo - so this integration has a go ahead to directly consume the ECS API.

NOTE: AI generated details below this line:


This pull request introduces a new feature configuration system for the project, including the addition of a new ECSFeaturesClient class and related utilities. The most significant changes involve the creation of a set of new files in the src/common/ecs-features directory, each of which contributes to the overall functionality of the feature configuration system. Additionally, a minor change was made to src/web/client/utilities/commonUtil.ts.

Here is a detailed summary of the changes:

New Constants and Types:

  • src/common/ecs-features/constants.ts: Added constants related to the ECS feature system, such as ECS_REQUEST_URL_TEMPLATE and PowerPagesClientName.

New Client for ECS Features:

  • src/common/ecs-features/ecsFeatureClient.ts: Introduced the ECSFeaturesClient class, which is responsible for initializing and getting the configuration of ECS features.

New Interfaces for ECS Features:

  • src/common/ecs-features/ecsFeatureFlagFilters.ts: Added the ECSAPIFeatureFlagFilters interface, which represents the filters used for ECS API feature flags.
  • src/common/ecs-features/ecsFeatureProperties.ts: Introduced the ECSFeatureDefinition and ECSFeatureInfo interfaces, which represent the properties of an ECS feature. Also added a function createECSFeatureDefinition to create a feature object based on the feature definition.

New Utilities for ECS Features:

  • src/common/ecs-features/ecsFeatureUtil.ts: Added utility functions like getECSRequestURL and powerPagesFeatureClient to support the ECS feature system.

Feature Gates:

  • src/common/ecs-features/ecsFeatureGates.ts: Defined the EnableMultifileVscodeWeb feature and its fallback configuration.

Minor Change:

  • src/web/client/utilities/commonUtil.ts: A line break was added after the getBackToStudioURL function.

tyaginidhi avatar Nov 23 '23 11:11 tyaginidhi