amundsen-io / amundsen

Amundsen is a metadata driven application for improving the productivity of data analysts, data scientists and engineers when interacting with data.
https://www.amundsen.io/amundsen/
Apache License 2.0
4.42k stars 959 forks source link

Feature Proposal: Frontend configuration using a file #1121

Closed jsnowacki closed 1 year ago

jsnowacki commented 3 years ago

Currently to change the default configuration in the React frontend, you need to edit file frontend/amundsen_application/static/js/config/config-custom.ts, which requires recompilation of the application, and, thus, if someone wants to have different settings in the frontend, one needs to create their own image file for the deployment.

Expected Behavior or Use Case

The application should attempt to read configuration JSON file, which path can be given via environment variable, e.g. FRONTEND_APP_CONFIG_JSON_FILE, which can default to something like ./config-custom.json, and just ignore it if the file is missing. Further overlay of the configuration values over defaults can be done similar as for config-custom.ts, so only the defined keys and values would be changed.

Service or Ingestion ETL

amundsen-frontend service; possibly both React and Flask API.

Possible Implementation

I'm not React expert but I'm not sure if it'd be possible to inject the file to React served as static content by Flask, thus, maybe extra config endpoint in flask serving the config file content would be a solution, and reading it on the application start.

Context

This would allow to have a general image that can be used in various setup, including Kubernetes, in which the configuration can be given e.g. via volume mount or ConfigMap.

dorianj commented 3 years ago

This would be a nice win for us. We have to manage the FE substantially differently due to the need to build the FE with custom files (rather than injecting/overwriting files)

mgorsk1 commented 3 years ago

Agree, this would be a real productivity booster.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

Golodhros commented 1 year ago

We currently have JavaScript functions in our configuration objects, so the format couldn't be .json.

We are open to change the way it loads, but the file type should still be javascript.