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

#217 implement krausening as a light weight config store #234

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

cwoods-cpointe
Copy link
Contributor

Leverage Krausening file watching. No need to pre load all the config on server init. Use env var to dictate which storage option to use

#217 refactor universal config vault storage

@cwoods-cpointe cwoods-cpointe linked an issue Jul 25, 2024 that may be closed by this pull request
8 tasks
@@ -48,7 +48,7 @@ public boolean checkEmpty() {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i: File moved from extensions-configuration-store-vault. That service was the implemented to set the application.properties propertyDaoClass value. Because we are now getting that value from an env var, we no longer need to have vault in a separate module to override the application.properties.

@cwoods-cpointe cwoods-cpointe force-pushed the 217-light-weight-configs branch from fca2a02 to 664598f Compare July 25, 2024 17:21
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

i: Used for the integration tests to set system properties


logger.info("Successfully initialized store configuration properties and policies.");
status = Status.LOAD_COMPLETE;
configLoader.updateLoadStatus(true);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

i: load status is used to skip loading properties and polices. Previously it was only set to skip after the properties were loaded. Updated to set to skip after both properties and policies are loaded

@cwoods-cpointe cwoods-cpointe force-pushed the 217-light-weight-configs branch 2 times, most recently from 272ecb9 to 01d908b Compare July 25, 2024 18:17
<KRAUSENING_BASE>${project.basedir}/src/test/resources/configurations/base</KRAUSENING_BASE>
<KRAUSENING_EXTENSIONS>${project.basedir}/src/test/resources/configurations/example-env</KRAUSENING_EXTENSIONS>
<KRAUSENING_PASSWORD>3uQ2j_=wmP5A2q8b</KRAUSENING_PASSWORD>
<version.aissemble.vault>${project.version}</version.aissemble.vault>
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this property variable necessary if vault out of the picture?

Copy link
Contributor Author

@cwoods-cpointe cwoods-cpointe Jul 25, 2024

Choose a reason for hiding this comment

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

Good point. Its only used in the integration test. For that test it needs to start up a vault instance so it needs to version

@cwoods-cpointe cwoods-cpointe force-pushed the 217-light-weight-configs branch from 01d908b to 8ebac72 Compare July 25, 2024 21:22
Given the config loader to configured to use "vault"
And the properties are loaded
When the configurations are written
Then the properties can be read
Copy link
Contributor

Choose a reason for hiding this comment

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

Q: Do we need one for Given the config loader to configured to use "krausening" or is this covered in the other scenarios?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I should add that. Looking at it, Ill refactor the tests to pull the test resources from target so any changes during the updates are not saved into the code base

@cwoods-cpointe cwoods-cpointe force-pushed the 217-light-weight-configs branch from 8ebac72 to 15309d5 Compare July 30, 2024 14:17

try {
ConfigLoader configLoader = CDI.current().select(ConfigLoader.class,new Any.Literal()).get();
configLoader.setPropertyDaoClass(propertyDaoClass);
if (configLoader.isFullyLoaded()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: polices -> policies

@cwoods-cpointe cwoods-cpointe force-pushed the 217-light-weight-configs branch 2 times, most recently from 315cd13 to 35e4a99 Compare July 30, 2024 19:40
Leverage Krausening file watching. No need to pre load all the config on
server init. Use env var to dictate which storage option to use

 #217 refactor universal config vault storage
@cwoods-cpointe cwoods-cpointe force-pushed the 217-light-weight-configs branch from 35e4a99 to fc64573 Compare August 1, 2024 14:24
@cwoods-cpointe cwoods-cpointe merged commit b97a37e into dev Aug 1, 2024
@cwoods-cpointe cwoods-cpointe deleted the 217-light-weight-configs branch August 1, 2024 14:24
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.

Feature: Universal config: Enable a light weight config storage option
5 participants