amundsen icon indicating copy to clipboard operation
amundsen copied to clipboard

Feature Proposal: Frontend configuration using a file

Open jsnowacki opened this issue 3 years ago • 3 comments

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.

jsnowacki avatar May 19 '21 13:05 jsnowacki

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)

dorianj avatar May 19 '21 17:05 dorianj

Agree, this would be a real productivity booster.

mgorsk1 avatar May 20 '21 05:05 mgorsk1

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

stale[bot] avatar Jun 03 '21 08:06 stale[bot]

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.

Golodhros avatar Jan 12 '23 23:01 Golodhros