-
Notifications
You must be signed in to change notification settings - Fork 892
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
Add Dynamic Config Service to Core Service #7194
Conversation
❌ Empty Changelog SectionThe Changelog section in your PR description is empty. Please add a valid changelog entry or entries. If you did add a changelog entry, check to make sure that it was not accidentally included inside the comment block in the Changelog section. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7194 +/- ##
==========================================
+ Coverage 63.83% 64.19% +0.36%
==========================================
Files 3661 3671 +10
Lines 81343 81072 -271
Branches 12978 12898 -80
==========================================
+ Hits 51924 52044 +120
+ Misses 26234 25838 -396
- Partials 3185 3190 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
❌ Empty Changelog SectionThe Changelog section in your PR description is empty. Please add a valid changelog entry or entries. If you did add a changelog entry, check to make sure that it was not accidentally included inside the comment block in the Changelog section. |
af53e5e
to
f84dc3c
Compare
Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>
Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>
Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>
60c9a4c
to
af2890a
Compare
Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>
Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>
* Add dynamic config service to core Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> * Add opensearch client implementation Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> * Add descriptions for the DAO clients Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> * Refactor DynamicConfigService Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> * Refactor dynamic config service start Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> --------- Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> (cherry picked from commit 8a96664) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
#7911 The latest artifact of OSD is not able to run, could we mitigate it? |
* Add dynamic config service to core Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> * Add opensearch client implementation Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> * Add descriptions for the DAO clients Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> * Refactor DynamicConfigService Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> * Refactor dynamic config service start Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> --------- Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> (cherry picked from commit 8a96664) Fix issue when bootstrapping on 2.x (opensearch-project#7901) * Fix issue bootstrapping dynamic config service Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> * Changeset file for PR opensearch-project#7901 created/updated --------- Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit 07504f6) Fix mock import (opensearch-project#7922) Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> (cherry picked from commit b370871)
* Add dynamic config service to core Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> * Add opensearch client implementation Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> * Add descriptions for the DAO clients Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> * Refactor DynamicConfigService Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> * Refactor dynamic config service start Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> --------- Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> (cherry picked from commit 8a96664) Fix issue when bootstrapping on 2.x (#7901) * Fix issue bootstrapping dynamic config service Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> * Changeset file for PR #7901 created/updated --------- Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit 07504f6) Fix mock import (#7922) Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> (cherry picked from commit b370871) Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>
Description
This PR adds a
DynamicConfigService
to core, enabling a subset of configs to be dynamically determined at request time. See #7111 for detailed design. By default, the feature is "disabled", meaning that when callingclient.getConfig(...)
, thedynamicConfigService
will return the static config inopensearch_dashboards.yml
. The service will still exist as part of coreTODO
There are several TODO items outside the scope of this PR:
yml
configsexposeToBrowser
Issues Resolved
Partially addresses #7111
Screenshot
The below recording shows
csp.rules
being added as a document in the config store index.opensearch_dashboards_config
(alias for.opensearch_dashboards_config_1
). The site will intentionally break when thecsp.rules
is set todefault-src 'none'
.Screen.Recording.2024-07-08.at.2.36.38.PM.mov
Note: in the recording, I had routes registered to add routes. This is PoC code and is not included in this PR. This is to help demonstrate changes using the OpenSearch client.
Testing the changes
Changelog
Check List
yarn test:jest
yarn test:jest_integration