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

512 improve configuration of the knowledge engine #569

Merged
merged 14 commits into from
Dec 19, 2024

Conversation

bnouwt
Copy link
Collaborator

@bnouwt bnouwt commented Nov 19, 2024

Using MicroProfile Config version 3.1 specification and the SmallRye Config implementation of this spec. This allows us to change to a different implementation in the future. Replaced all environment variable based configuration with the new framework. Also moved all default values from code to a META-INF/microprofile-config.properties configuration file and the config keys to the SmartConnectorConfig class. I used ConfigValue#getSourceOrdinal() to determine whether the user has overridden the default values, because distributed mode is only started when they set the kd.url.

Things that could/should still be done:

  • Create unit tests.
  • Update/add documentation about configuration.
  • Let code be reviewed.

Also group the configuration keys in a dedicated *Config class.
We no longer use environment variables directly, but we do that through
MicroProfile Config implementation. Values are automatically overridden
by users using environment variables or Java system properties. We can
determine whether a value was overridden by checking whether the
ConfigValue#getSourceOrdinal() of a configuration value is > 100.
@bnouwt bnouwt linked an issue Nov 19, 2024 that may be closed by this pull request
At a later stage we also need to update the documentation in the ./docs/
folder.
They work correctly now.
Not every configuration option could be tested because the message
dispatcher is initialized only once per JVM.
512-improve-configuration-of-the-knowledge-engine
@bnouwt bnouwt requested a review from Sophietje December 12, 2024 15:45
@bnouwt bnouwt merged commit 2071c8c into master Dec 19, 2024
2 checks passed
@bnouwt bnouwt deleted the 512-improve-configuration-of-the-knowledge-engine branch December 19, 2024 16:02
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.

Improve configuration of the knowledge engine.
2 participants