Skip to content
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

7639 mpconfig dbsetting #7739

Closed

Conversation

poikilotherm
Copy link
Contributor

@poikilotherm poikilotherm commented Mar 30, 2021

What this PR does / why we need it:
This pull request will

  1. Allow to provision formerly DB-only setting via MPCONFIG, too (or a mix of it)
  2. Remove some unused settings
  3. Introduce the concept of scoped keys to make MPCONFIG values less chaotic

Flaws (not yet) addressed:

  • It does not yet delete the database MPCONFIG source.
  • Due to the concepts used with SystemConfig, SettingsServiceBean and SettingsWrapper, this PR as is will not allow to use MPCONFIG values within JSF.
  • The enum SettingServiceBean.Key should actually live in a file on its own. It's huge and the concept needs to be applied more generally. This would involve in a lot of cruft change works and make a lot of noise.
  • All settings related classes should live in one package. Doing this will generate a noisy commit due to the package/name changes.

Which issue(s) this PR closes:

Closes #7639
Closes #7680

Special notes for your reviewer:
This is a work in progress.

Suggestions on how to test this:
TBD

Does this PR introduce a user interface change? If mockups are available, please link/include them here:
No, it will not.

Is there a release notes update needed for this change?:
Later.

Additional documentation:
None yet.

…ingsServiceBean.Key` enum use of it. IQSS#7639

By adding these scopes as a data structure, we enable a documented approach to define
key names inside of MicroProfile Config Sources. Instead of a collection of Strings,
this is much more explicit. Due to its iterable nature, it may be used to generate documentation
down the road. Changing names gets more trackable.
…m MPCONFIG. IQSS#7639

When the settings service is asked for config data, it will now look up if there
is data available from MPCONFIG and let that take precedence over any database entry.

- To build the key under which the data should be living inside MPCONFIG, it's using
  the formerly introduced keys and scopes.
- If no key can be found for a given String (because the calling codebase uses an
  informally defined setting), it will try to lookup the data in scope called
  "unscoped", with a lowercased key, stripped from any leading colon.

We can now:
1. Retrieve data for formerly defined keys as untyped String data
2. If the setting requires some kind of comma separated list or JSON,
   it's still simple string data, thus retrievable.

We cannot (yet):
1. Retrieve the sort of "mapped" data, where key names are suffixed with a map key
   from properly scoped entries in MPCONFIG, only from unscoped or database.
2. Retrieve localized settings, which are handled in a more specialized way.
@poikilotherm poikilotherm added Type: Feature a feature request Component: Code Infrastructure formerly "Feature: Code Infrastructure" Feature: Installation Guide Feature: Admin Guide User Role: Sysadmin Installs, upgrades, and configures the system, connects via ssh labels Mar 30, 2021
@poikilotherm poikilotherm self-assigned this Mar 30, 2021
@coveralls
Copy link

coveralls commented Jun 8, 2021

Coverage Status

Coverage increased (+0.05%) to 19.375% when pulling ec3439b on poikilotherm:7639-mpconfig-dbsetting into b61b572 on IQSS:develop.

Thanks to @qqmyers, we found out that the config source reading
from the database is having multiple issues. See IQSS#7680 and IQSS#7639
for details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Code Infrastructure formerly "Feature: Code Infrastructure" Feature: Admin Guide Feature: Installation Guide Type: Feature a feature request User Role: Sysadmin Installs, upgrades, and configures the system, connects via ssh
Projects
None yet
2 participants