-
Notifications
You must be signed in to change notification settings - Fork 543
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
Implemented: getEnvironmentProperty to allow environment variable configuration (OFBIZ-9498) #355
base: trunk
Are you sure you want to change the base?
Conversation
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
I will make some time these days to check the PR and add feedback on it. |
@gilPts : Here is my feedback: The PR looks good overall.
Make it easier to test by passing the env map https://docs.oracle.com/javase/7/docs/api/java/lang/System.html#getenv() . Add extra method:
Write tests that pass whatever environment you want. |
I like this improvement. But it seems to me that there might be more properties that could be applicable (not those related to run-time configuration, which can be retrieved from the SystemProperties table). |
@PierreSmits : True, and maybe we should consider moving those there. I did not saw a guide for how to best handle OFBiz configuration. |
Indeed, Ioan. I guess that applies to most in the config folders of the framework (folder) components. But still there are several there that should be considered as run-time configurations. USD comes to mind, as one example. |
@gilPts with this change, are users forced to use environment variables? Or are the changes in entityengine.xml just for demonstration purposes? |
@mbrohl : ENV is opt-in.
|
I've seen the default values , thanks @ieugen . I'll add some input here in the next coming days, let's see if we can combine this with a centralized configuration approach. |
Happy new year! Otherwise, keeping it in small chunks that follow a plan and getting feedback along the way is the best way IMO. |
Hello @ieugen, @mbrohl indeed, the idea is to make it optional, but defining variable name in entityengine and other place is needed to ease configuration via env variable. Like i explained in : https://issues.apache.org/jira/browse/OFBIZ-9498?focusedCommentId=17466789&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17466789 There soon will be a proposal from Marco that will introduce a centralized configuration management, with overload config mechanism. We just need to le him some time :). |
Hi @gilPts , |
@mbrohl , when I say he will introduce it, it means that he will explain the needs, and the improvements it will produce. Again let's wait for him to be ready, there is no hurry. This PR, can advance in the meantime, implementing Eugen suggestions. |
As long as this is optional and users can still use the property based configuration as usual I am fine with this PR. |
@mbrohl Yes nothing is enforced, the only impact for existing implementation is having the ${env: annotation in some config files, those can be replaced (or only the default value to be replace), like it's need to be done nowadays with the annotation. |
…guration This will enable configuration of one OFBiz instance without modifying source code, using environment variables. Available in : * property files * serviceengine.xml * entityengine.xml * build.gradle (native)
…guration This commit add unit test and documentation regarding the improvement Thanks Eugen for the review
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Hi, what is the status here? |
Implemented: getEnvironmentProperty to allow environment variable configuration (OFBIZ-9498)
This will enable configuration of one OFBiz instance without modifying
source code, using environment variables.
Available in :