-
Notifications
You must be signed in to change notification settings - Fork 5
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
RFC for light-4j issue #309 #11
Conversation
I plus one this with the exception that Both I think one way to solve this is to check if the vslue of these variables start with a |
@bkuberek: right, you can use that. This RFC proposes just additional flexibility, which we have observed that it served us well when I updated light-bot with merging status.yml files and had to read from multiple locations. While the light-config-dir stays, this added functionality allows APIs (my client wishes to use it) to separate configs and load API specific YAML files from a different location. It's a utility only |
@ddobrin I think @bkuberek has proposed another approach to support config files to be loaded from multiple directories. As of today, all config files are loaded from the externalized folder specified by -Dlight-4j-config-dir or subfolders relative to that folder. Instead of overriding the existing method with an additional parameter to specify the config directory, why not just support absolute path for the config file? With this feature, the light-bot config file can be something like the following.
As you see, all three files are using the absolute paths in the operating system and we just need to open them directly. In this way, we don't need to add another method to support directory as an additional parameter but only need to check if the configName is started with |
I think yet another option, which is not exclusive but can be added to the one above, is to set the external config path to a list as opposed to a single path, then the application will look for configuration in all paths. Example
If a path is given absolute URL, load it as an absolute path but if not search all the configured external config folders. Similar to the |
@stevehu & @bkuberek : I think that both of you make points which we should add, and I see this used in various use cases. I would like us to maintain the status quo of the @stevehu : using both a relative path (from @bkuberek : I do like the idea of multiple config paths, provided as a list. Client code can simply load a config file, as long as it can be found within that list. If you guys agree, we can amend the doc. |
Multiple externalized config folders are doable but they introduce more challenges. We need to define the overwriting rules between these folders and in the cases of status.yml, we need to define the merging rules. The immediate target is to make it work for absolute paths so that we can have the release out. We can discuss the design and implementation for the multiple externalized folder in a future release. |
After consulting with some folks, looking at options, here's what we'll do; please see the list below. The rationale:
This gives flexibility in addressing them and addresses all needs. I will handle this today |
@ddobrin thanks for handling all this |
@stevehu @NicholasAzar @ChenYan71 @bkuberek: I will close this PR and put 3 separate PRs for the 3 items as discussed above |
This PR will be closed and is replaced by: |
No description provided.