Skip to content

Commit

Permalink
handle relational config api not returning (#2531)
Browse files Browse the repository at this point in the history
  • Loading branch information
MauricioUyaguari authored Aug 21, 2023
1 parent ca6c293 commit f07c3d2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
4 changes: 4 additions & 0 deletions .changeset/strange-otters-press.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
'@finos/legend-application-studio': patch
'@finos/legend-graph': patch
---
Original file line number Diff line number Diff line change
Expand Up @@ -1579,7 +1579,7 @@ const RelationalConnectionGeneralEditor = observer(
const databseTypeConfigs =
connectionValueState.editorStore.graphState
.relationalDatabseTypeConfigurations;
const availableDbTypes = databseTypeConfigs
const availableDbTypes = databseTypeConfigs?.length
? // Currently H2 Flow is not returned in relational configs. We will remove this once it is properly returned as a supported flow in engine
uniq([DatabaseType.H2, ...databseTypeConfigs.map((e) => e.type)])
: Object.values(DatabaseType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3099,7 +3099,6 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
return config;
});
} catch (error) {
assertErrorThrown(error);
assertErrorThrown(error);
this.logService.error(
LogEvent.create(GRAPH_MANAGER_EVENT.RELATIONAL_CONNECTION),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1065,16 +1065,12 @@ export class V1_Engine {
async getAvailableRelationalDatabaseTypeConfigurations(): Promise<
V1_RelationalConnectionBuilder[]
> {
try {
return (
await this.engineServerClient.getAvailableRelationalDatabaseTypeConfigurations()
).map((dbTypeToDataSourceAndAuthMap) =>
V1_RelationalConnectionBuilder.serialization.fromJson(
dbTypeToDataSourceAndAuthMap,
),
);
} catch (error) {
return [];
}
return (
await this.engineServerClient.getAvailableRelationalDatabaseTypeConfigurations()
).map((dbTypeToDataSourceAndAuthMap) =>
V1_RelationalConnectionBuilder.serialization.fromJson(
dbTypeToDataSourceAndAuthMap,
),
);
}
}

0 comments on commit f07c3d2

Please sign in to comment.