Enhance Info Endpoints to Display Feature Flag Status
Description:
ADR: osdu/platform/system/lib/core/os-core-common#86
- Configured FeatureFlagState resolvers from Core-Common as Spring beans.
- Updated integration tests to verify all FFs are present in the /info endpoint response.
- Updated FF configuration classes to decouple them from the DpsHeader bean.
How to test:
Via int tests in the pipeline.
You may also test it by requesting the info endpoint.
Response for GC Indexer:
curl --location 'https://community.gcp.gnrg-osdu.projects.epam.com/api/indexer/v2/info'
{
"groupId": "org.opengroup.osdu.indexer",
"artifactId": "indexer-gc",
"version": "0.29.0-SNAPSHOT",
"buildTime": "2025-04-01T08:02:02.766Z",
"branch": "trusted-feature-flag-info-endpoint",
"commitId": "34e67958f52d9c9b74b564c20513517461d9076c",
"commitMessage": "simplify tests update, undo spring migration",
"connectedOuterServices": [
{
"name": "Redis-RedisCacheBuilder$2",
"version": "7.2.7"
},
{
"name": "Redis-RedisCacheBuilder$2",
"version": "7.2.7"
},
{
"name": "Redis-RedisCacheBuilder$2",
"version": "7.2.7"
},
{
"name": "ElasticSearch-osdu",
"version": "8.15.3"
},
{
"name": "ElasticSearch-second",
"version": "8.15.3"
}
],
"featureFlagStates": [
{
"name": "featureFlag.bagOfWords.enabled",
"enabled": true,
"partition": "osdu",
"source": "dataPartition"
},
{
"name": "featureFlag.bagOfWords.enabled",
"enabled": false,
"partition": "second",
"source": "dataPartition"
},
{
"name": "collaborations-enabled",
"enabled": false,
"partition": "osdu",
"source": "dataPartition"
},
{
"name": "collaborations-enabled",
"enabled": false,
"partition": "second",
"source": "dataPartition"
},
{
"name": "featureFlag.keywordLower.enabled",
"enabled": true,
"partition": "osdu",
"source": "dataPartition"
},
{
"name": "featureFlag.keywordLower.enabled",
"enabled": false,
"partition": "second",
"source": "dataPartition"
},
{
"name": "featureFlag.asIngestedCoordinates.enabled",
"enabled": true,
"partition": "osdu",
"source": "dataPartition"
},
{
"name": "featureFlag.asIngestedCoordinates.enabled",
"enabled": false,
"partition": "second",
"source": "dataPartition"
},
{
"name": "custom-index-analyzer-enabled",
"enabled": true,
"partition": "osdu",
"source": "dataPartition"
},
{
"name": "custom-index-analyzer-enabled",
"enabled": true,
"partition": "second",
"source": "dataPartition"
},
{
"name": "index-augmenter-enabled",
"enabled": true,
"partition": "osdu",
"source": "dataPartition"
},
{
"name": "index-augmenter-enabled",
"enabled": true,
"partition": "second",
"source": "dataPartition"
},
{
"name": "featureFlag.mapBooleanToString.enabled",
"enabled": true,
"partition": "osdu",
"source": "dataPartition + dataPartition"
},
{
"name": "featureFlag.mapBooleanToString.enabled",
"enabled": false,
"partition": "second",
"source": "dataPartition + dataPartition"
}
]
}
Changes include:
-
Refactor (a non-breaking change that improves code maintainability). -
Bugfix (a non-breaking change that solves an issue). -
New feature (a non-breaking change that adds functionality). -
Breaking change (a change that is not backward-compatible and/or changes current functionality).
Changes in:
-
Common code
Dev Checklist:
-
Added Unit Tests, wherever applicable. -
Updated the Readme, if applicable. -
Existing Tests pass -
Verified functionality locally -
Self Reviewed my code for formatting and complex business logic.
Other comments:
Indexer uses different sources to resolve feature flag configuration, thus I had to implement different resolvers to provide state for the info endpoint.
Edited by Rustam Lotsmanenko (EPAM)