-
Notifications
You must be signed in to change notification settings - Fork 114
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
WIP: Use PMCD returned by mappinganalysis to build minimal graph for query #3488
base: master
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 136f682 The changes in this PR will be included in the next version bump. This PR includes changesets to release 26 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
2375853
to
b8520b0
Compare
aab4beb
to
e84388e
Compare
]; | ||
} | ||
|
||
getExtraQueryBuilderPropagateExecutionContextChangeHelper?(): QueryBuilderPropagateExecutionContextChangeHelper[] { |
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.
HEADS-UP: create an extension method for propagateExecutionContextChange
because for dataspace, it depends on editorStore (@finos/legend-application-query) and dataspaceQueryBuilderState (@finos/legend-extension-dsl-data-space).
#2523 put this function's implementaion at module @finos/legend-extension-dsl-data-space, but it will introduce the circular dependency as it can't get editorStore inside this module
HEADS-UP: To fix (regressions)
|
@@ -182,6 +186,10 @@ export class DataSpaceQueryCreatorStore extends QueryEditorStore { | |||
super.initialize(); | |||
} | |||
|
|||
override requiresGraphBuilding(): boolean { |
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.
why is this needed?
const possibleNewClass = getNullableFirstEntry(compatibleClasses); | ||
if (possibleNewClass) { | ||
this.changeClass(possibleNewClass); | ||
override async propagateExecutionContextChange( |
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.
polymorphism in OOD will make sure this specific implementation will be triggered
) { | ||
analysisResult = cacheResult; | ||
} else { | ||
notificationService?.notify( |
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.
HEADS-UP: I moved this notification inside the else block from where it was originally added above the if statement
@@ -362,7 +384,8 @@ export class DataSpaceQueryBuilderState extends QueryBuilderState { | |||
dataSpace: DataSpace, | |||
executionContext: DataSpaceExecutionContext, | |||
dataSpaceRepo: DataSpacesBuilderRepoistory | undefined, | |||
onDataSpaceChange: (val: DataSpaceInfo) => void, | |||
onDataSpaceChange: (val: DataSpaceInfo) => Promise<void>, | |||
isLightGraphEnabled: boolean, |
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.
what is it for as it's not actually used
@@ -409,6 +411,10 @@ export abstract class QueryEditorStore { | |||
// do nothing | |||
} | |||
|
|||
requiresGraphBuilding(): boolean { |
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.
currently not used
// build types | ||
buildState.setMessage(`Building domain models...`); | ||
await this.buildTypes(graph, buildInputs, options); | ||
stopWatch.record( |
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.
necessary elements:
class, function, service,
(path of runtime, connection, store)
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.
await this.buildOtherElements(graph, buildInputs, options);
stopWatch.record(
GRAPH_MANAGER_EVENT.GRAPH_BUILDER_BUILD_OTHER_ELEMENTS__SUCCESS,
);
to resolve dataspace executables
e84388e
to
0e47202
Compare
|
||
// build other elements | ||
buildState.setMessage(`Building other elements...`); | ||
await this.buildOtherElements(graph, buildInputs, options); |
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.
it will fail with dataspaces that contain diagrams
c4c51c2
to
ca56d82
Compare
queryBuilderState?.dataSpaceAnalysisResult?.executionContextsIndex.get( | ||
queryBuilderState.executionContext.name, | ||
)?.mappingModelCoverageAnalysisResult; | ||
if ( |
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.
HEADS-UP: This function is not the same as the one in #2523
e9fe026
to
136f682
Compare
const pmcd = mappingModelCoverageAnalysisResult?.model; | ||
if (pmcd && projectInfo) { | ||
graphEntities = pmcd.elements | ||
.concat(mappingModels) |
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.
include empty mapping and runtime
Summary
Use PMCD returned by mappinganalysis to build minimal graph for query
clean/update: #2523
How did you test this change?