Yicong-Huang commented on code in PR #5545:
URL: https://github.com/apache/texera/pull/5545#discussion_r3393706149


##########
frontend/src/app/common/service/gui-config.service.ts:
##########
@@ -83,10 +85,11 @@ export class GuiConfigService {
    */
   loadPostLogin(): Observable<Partial<GuiConfig>> {
     const guiConfig$ = 
this.http.get<GuiOnlyConfig>(`${AppSettings.getApiEndpoint()}/config/gui`);
+    const amberConfig$ = 
this.http.get<AmberConfig>(`${AppSettings.getApiEndpoint()}/config/amber`);
     const userSystemConfig$ = 
this.http.get<UserSystemConfig>(`${AppSettings.getApiEndpoint()}/config/user-system`);
-    return forkJoin([guiConfig$, userSystemConfig$]).pipe(
-      tap(([guiConfig, userSystemConfig]) => {
-        this.config = { ...this.config, ...guiConfig, ...userSystemConfig };
+    return forkJoin([guiConfig$, amberConfig$, userSystemConfig$]).pipe(
+      tap(([guiConfig, amberConfig, userSystemConfig]) => {
+        this.config = { ...this.config, ...guiConfig, ...amberConfig, 
...userSystemConfig };

Review Comment:
   this design is horrible. it merges configs from different sources into one 
map, essentially loses the isolated information. I think in a future PR we 
should at least make them reserve the source of the config. e.g.,
   
   this.config['amber'] = amberConfig



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to