-
Notifications
You must be signed in to change notification settings - Fork 100
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
feat(config): unify properties files #2766
base: main
Are you sure you want to change the base?
Conversation
Rearrange the application.yml in test to look more like source. BREAKING CHANGE: Move the health endpoint from `/resource/health` to `/resource/api/health` for OpenAPI documentations to be easy to use. Signed-off-by: Gaurav Mishra <[email protected]>
Unify all `sw360.properties` files to a single file in datahandler library. Also, move all loaders for the property file to SW360Constants class and datahandler.common package. Signed-off-by: Gaurav Mishra <[email protected]>
Add a new actuator at `/config` to expose the contents of properties files. Signed-off-by: Gaurav Mishra <[email protected]>
50e6d13
to
63cc839
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. I think need a second pair of eyes to review it.
public static final Boolean REST_IS_JWKS_VALIDATION_ENABLED; | ||
public static final String REST_SERVER_PATH_URL; | ||
|
||
// UI Portlet Constants |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just wondering if UI constants are required anymore or it can be sanitized?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will recheck once which constants from this section are used by backend and which are not. The ones not used can be moved to the frontend project.
My initial thought was to have minimal changes the existing sw360.properties
files. But yes, the best approach would be to separate the backend and frontend configs.
@GMishx Question: Do we need a property files at all ? |
63cc839
to
e94180c
Compare
Signed-off-by: Gaurav Mishra <[email protected]>
e94180c
to
fb171c9
Compare
That would be the ultimate goal. If anyone is interested in doing can work on it. Till we have a working release with the new front-end and back-end, it would be a low priority imo. But the solution from this PR would be good for the front-end to at least have idea how the back-end is configured. |
@heliocastro @GMishx, I am currently investigating and implementing a POC for storing some configurations in CouchDB. My idea is to store configurations in the sw360config database in CouchDB (similar to the FOSSology configuration). This approach will allow users to modify them through the GUI. However, I don't intend to move all configurations from the properties file into the database, as some are related to migration scripts and the connections between back-end services. I will create a PR for this in a few weeks. |
That sounds awesome @hoangnt2 , we can hold this PR then and use it just to unify the remaining configuration files. |
Putting this PR on hold in favor of #2815 |
sw360.properties
resources into a single file under datahandler.org.eclipse.sw360.datahandler.common.SW360Constants
where applicable.org.eclipse.sw360.datahandler.common
package extending theSW360Constants
class.Closes #2765
Suggest Reviewer
@smrutis1 @heliocastro
How To Test?
Check the
/api/config
endpoint.Checklist
Must:
This PR needs changes from #2709 and should be merged after it.