@finos/legend-application-studio 28.21.45 → 28.21.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/lib/__lib__/LegendStudioEvent.d.ts +63 -1
  2. package/lib/__lib__/LegendStudioEvent.d.ts.map +1 -1
  3. package/lib/__lib__/LegendStudioEvent.js +90 -0
  4. package/lib/__lib__/LegendStudioEvent.js.map +1 -1
  5. package/lib/__lib__/LegendStudioTelemetryHelper.d.ts +655 -1
  6. package/lib/__lib__/LegendStudioTelemetryHelper.d.ts.map +1 -1
  7. package/lib/__lib__/LegendStudioTelemetryHelper.js +709 -1
  8. package/lib/__lib__/LegendStudioTelemetryHelper.js.map +1 -1
  9. package/lib/components/editor/editor-group/LegendAISuggestTelemetryHooks.d.ts +30 -0
  10. package/lib/components/editor/editor-group/LegendAISuggestTelemetryHooks.d.ts.map +1 -0
  11. package/lib/components/editor/editor-group/LegendAISuggestTelemetryHooks.js +43 -0
  12. package/lib/components/editor/editor-group/LegendAISuggestTelemetryHooks.js.map +1 -0
  13. package/lib/components/editor/editor-group/RuntimeEditor.d.ts +4 -3
  14. package/lib/components/editor/editor-group/RuntimeEditor.d.ts.map +1 -1
  15. package/lib/components/editor/editor-group/RuntimeEditor.js +90 -36
  16. package/lib/components/editor/editor-group/RuntimeEditor.js.map +1 -1
  17. package/lib/components/editor/editor-group/dataProduct/DataProductEditor.d.ts.map +1 -1
  18. package/lib/components/editor/editor-group/dataProduct/DataProductEditor.js +154 -35
  19. package/lib/components/editor/editor-group/dataProduct/DataProductEditor.js.map +1 -1
  20. package/lib/components/editor/editor-group/dataProduct/DataProductQueryBuilderHelper.d.ts.map +1 -1
  21. package/lib/components/editor/editor-group/dataProduct/DataProductQueryBuilderHelper.js +4 -6
  22. package/lib/components/editor/editor-group/dataProduct/DataProductQueryBuilderHelper.js.map +1 -1
  23. package/lib/components/editor/editor-group/service-editor/ServiceEditor.d.ts.map +1 -1
  24. package/lib/components/editor/editor-group/service-editor/ServiceEditor.js +31 -7
  25. package/lib/components/editor/editor-group/service-editor/ServiceEditor.js.map +1 -1
  26. package/lib/components/editor/editor-group/service-editor/testable/ServiceTestDataEditor.d.ts.map +1 -1
  27. package/lib/components/editor/editor-group/service-editor/testable/ServiceTestDataEditor.js +4 -8
  28. package/lib/components/editor/editor-group/service-editor/testable/ServiceTestDataEditor.js.map +1 -1
  29. package/lib/components/editor/side-bar/WorkflowManager.d.ts.map +1 -1
  30. package/lib/components/editor/side-bar/WorkflowManager.js +15 -0
  31. package/lib/components/editor/side-bar/WorkflowManager.js.map +1 -1
  32. package/lib/index.css +1 -1
  33. package/lib/index.d.ts +3 -1
  34. package/lib/index.d.ts.map +1 -1
  35. package/lib/index.js +3 -1
  36. package/lib/index.js.map +1 -1
  37. package/lib/package.json +1 -1
  38. package/lib/stores/editor/EditorGraphState.d.ts.map +1 -1
  39. package/lib/stores/editor/EditorGraphState.js +17 -1
  40. package/lib/stores/editor/EditorGraphState.js.map +1 -1
  41. package/lib/stores/editor/EditorStore.d.ts +2 -0
  42. package/lib/stores/editor/EditorStore.d.ts.map +1 -1
  43. package/lib/stores/editor/EditorStore.js +12 -0
  44. package/lib/stores/editor/EditorStore.js.map +1 -1
  45. package/lib/stores/editor/EditorTabManagerState.d.ts +18 -1
  46. package/lib/stores/editor/EditorTabManagerState.d.ts.map +1 -1
  47. package/lib/stores/editor/EditorTabManagerState.js +90 -1
  48. package/lib/stores/editor/EditorTabManagerState.js.map +1 -1
  49. package/lib/stores/editor/EditorTabTelemetryHelper.d.ts +31 -0
  50. package/lib/stores/editor/EditorTabTelemetryHelper.d.ts.map +1 -0
  51. package/lib/stores/editor/EditorTabTelemetryHelper.js +55 -0
  52. package/lib/stores/editor/EditorTabTelemetryHelper.js.map +1 -0
  53. package/lib/stores/editor/GraphEditFormModeState.d.ts.map +1 -1
  54. package/lib/stores/editor/GraphEditFormModeState.js +22 -1
  55. package/lib/stores/editor/GraphEditFormModeState.js.map +1 -1
  56. package/lib/stores/editor/LegendAISuggestTelemetry.d.ts +143 -0
  57. package/lib/stores/editor/LegendAISuggestTelemetry.d.ts.map +1 -0
  58. package/lib/stores/editor/LegendAISuggestTelemetry.js +376 -0
  59. package/lib/stores/editor/LegendAISuggestTelemetry.js.map +1 -0
  60. package/lib/stores/editor/LegendSQLStudioPlaygroundState.js +3 -3
  61. package/lib/stores/editor/LegendSQLStudioPlaygroundState.js.map +1 -1
  62. package/lib/stores/editor/editor-state/GraphGenerationState.d.ts +14 -3
  63. package/lib/stores/editor/editor-state/GraphGenerationState.d.ts.map +1 -1
  64. package/lib/stores/editor/editor-state/GraphGenerationState.js +42 -5
  65. package/lib/stores/editor/editor-state/GraphGenerationState.js.map +1 -1
  66. package/lib/stores/editor/editor-state/ModelImporterState.d.ts.map +1 -1
  67. package/lib/stores/editor/editor-state/ModelImporterState.js +2 -1
  68. package/lib/stores/editor/editor-state/ModelImporterState.js.map +1 -1
  69. package/lib/stores/editor/editor-state/element-editor-state/ElementExternalFormatGenerationState.d.ts.map +1 -1
  70. package/lib/stores/editor/editor-state/element-editor-state/ElementExternalFormatGenerationState.js +14 -0
  71. package/lib/stores/editor/editor-state/element-editor-state/ElementExternalFormatGenerationState.js.map +1 -1
  72. package/lib/stores/editor/editor-state/element-editor-state/RuntimeEditorState.d.ts +35 -6
  73. package/lib/stores/editor/editor-state/element-editor-state/RuntimeEditorState.d.ts.map +1 -1
  74. package/lib/stores/editor/editor-state/element-editor-state/RuntimeEditorState.js +74 -29
  75. package/lib/stores/editor/editor-state/element-editor-state/RuntimeEditorState.js.map +1 -1
  76. package/lib/stores/editor/editor-state/element-editor-state/availability/testable/AvailabilityTestableState.d.ts +5 -0
  77. package/lib/stores/editor/editor-state/element-editor-state/availability/testable/AvailabilityTestableState.d.ts.map +1 -1
  78. package/lib/stores/editor/editor-state/element-editor-state/availability/testable/AvailabilityTestableState.js +13 -0
  79. package/lib/stores/editor/editor-state/element-editor-state/availability/testable/AvailabilityTestableState.js.map +1 -1
  80. package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.d.ts +1 -0
  81. package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.d.ts.map +1 -1
  82. package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.js +5 -5
  83. package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.js.map +1 -1
  84. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.d.ts +12 -0
  85. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.d.ts.map +1 -1
  86. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.js +60 -14
  87. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.js.map +1 -1
  88. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/testable/DataProductTestableState.d.ts +5 -0
  89. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/testable/DataProductTestableState.d.ts.map +1 -1
  90. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/testable/DataProductTestableState.js +13 -0
  91. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/testable/DataProductTestableState.js.map +1 -1
  92. package/lib/stores/editor/editor-state/element-editor-state/function-activator/testable/FunctionTestableState.d.ts +7 -0
  93. package/lib/stores/editor/editor-state/element-editor-state/function-activator/testable/FunctionTestableState.d.ts.map +1 -1
  94. package/lib/stores/editor/editor-state/element-editor-state/function-activator/testable/FunctionTestableState.js +21 -2
  95. package/lib/stores/editor/editor-state/element-editor-state/function-activator/testable/FunctionTestableState.js.map +1 -1
  96. package/lib/stores/editor/editor-state/element-editor-state/ingest/IngestTestableState.d.ts +5 -0
  97. package/lib/stores/editor/editor-state/element-editor-state/ingest/IngestTestableState.d.ts.map +1 -1
  98. package/lib/stores/editor/editor-state/element-editor-state/ingest/IngestTestableState.js +13 -0
  99. package/lib/stores/editor/editor-state/element-editor-state/ingest/IngestTestableState.js.map +1 -1
  100. package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.d.ts +7 -0
  101. package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.d.ts.map +1 -1
  102. package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.js +34 -0
  103. package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.js.map +1 -1
  104. package/lib/stores/editor/editor-state/element-editor-state/service/ServiceRegistrationState.d.ts.map +1 -1
  105. package/lib/stores/editor/editor-state/element-editor-state/service/ServiceRegistrationState.js +48 -0
  106. package/lib/stores/editor/editor-state/element-editor-state/service/ServiceRegistrationState.js.map +1 -1
  107. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.d.ts +1 -1
  108. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.d.ts.map +1 -1
  109. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.js +5 -11
  110. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.js.map +1 -1
  111. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestEditorState.d.ts +3 -0
  112. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestEditorState.d.ts.map +1 -1
  113. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestEditorState.js +7 -0
  114. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestEditorState.js.map +1 -1
  115. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.d.ts.map +1 -1
  116. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.js +46 -17
  117. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.js.map +1 -1
  118. package/lib/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.d.ts +7 -0
  119. package/lib/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.d.ts.map +1 -1
  120. package/lib/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.js +110 -16
  121. package/lib/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.js.map +1 -1
  122. package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.d.ts +2 -1
  123. package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.d.ts.map +1 -1
  124. package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.js +10 -4
  125. package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.js.map +1 -1
  126. package/lib/stores/editor/sidebar-state/BulkServiceRegistrationState.d.ts.map +1 -1
  127. package/lib/stores/editor/sidebar-state/BulkServiceRegistrationState.js +40 -1
  128. package/lib/stores/editor/sidebar-state/BulkServiceRegistrationState.js.map +1 -1
  129. package/lib/stores/editor/sidebar-state/LocalChangesState.d.ts.map +1 -1
  130. package/lib/stores/editor/sidebar-state/LocalChangesState.js +1 -0
  131. package/lib/stores/editor/sidebar-state/LocalChangesState.js.map +1 -1
  132. package/lib/stores/editor/sidebar-state/ProjectOverviewState.d.ts.map +1 -1
  133. package/lib/stores/editor/sidebar-state/ProjectOverviewState.js +51 -0
  134. package/lib/stores/editor/sidebar-state/ProjectOverviewState.js.map +1 -1
  135. package/lib/stores/editor/sidebar-state/WorkflowManagerState.d.ts +14 -0
  136. package/lib/stores/editor/sidebar-state/WorkflowManagerState.d.ts.map +1 -1
  137. package/lib/stores/editor/sidebar-state/WorkflowManagerState.js +132 -27
  138. package/lib/stores/editor/sidebar-state/WorkflowManagerState.js.map +1 -1
  139. package/lib/stores/editor/sidebar-state/WorkspaceReviewState.d.ts.map +1 -1
  140. package/lib/stores/editor/sidebar-state/WorkspaceReviewState.js +41 -0
  141. package/lib/stores/editor/sidebar-state/WorkspaceReviewState.js.map +1 -1
  142. package/lib/stores/editor/sidebar-state/testable/GlobalTestRunnerState.d.ts.map +1 -1
  143. package/lib/stores/editor/sidebar-state/testable/GlobalTestRunnerState.js +71 -9
  144. package/lib/stores/editor/sidebar-state/testable/GlobalTestRunnerState.js.map +1 -1
  145. package/lib/stores/editor/utils/MockDataUtils.d.ts +12 -2
  146. package/lib/stores/editor/utils/MockDataUtils.d.ts.map +1 -1
  147. package/lib/stores/editor/utils/MockDataUtils.js +28 -28
  148. package/lib/stores/editor/utils/MockDataUtils.js.map +1 -1
  149. package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.d.ts +2 -0
  150. package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.d.ts.map +1 -1
  151. package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.js +13 -0
  152. package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.js.map +1 -1
  153. package/lib/stores/graph-modifier/DSL_LakehouseRuntime_GraphModifierHelper.d.ts +20 -2
  154. package/lib/stores/graph-modifier/DSL_LakehouseRuntime_GraphModifierHelper.d.ts.map +1 -1
  155. package/lib/stores/graph-modifier/DSL_LakehouseRuntime_GraphModifierHelper.js +38 -4
  156. package/lib/stores/graph-modifier/DSL_LakehouseRuntime_GraphModifierHelper.js.map +1 -1
  157. package/lib/stores/project-reviewer/ProjectReviewerStore.d.ts.map +1 -1
  158. package/lib/stores/project-reviewer/ProjectReviewerStore.js +45 -0
  159. package/lib/stores/project-reviewer/ProjectReviewerStore.js.map +1 -1
  160. package/lib/stores/workspace-setup/WorkspaceSetupStore.d.ts.map +1 -1
  161. package/lib/stores/workspace-setup/WorkspaceSetupStore.js +48 -4
  162. package/lib/stores/workspace-setup/WorkspaceSetupStore.js.map +1 -1
  163. package/package.json +9 -9
  164. package/src/__lib__/LegendStudioEvent.ts +102 -0
  165. package/src/__lib__/LegendStudioTelemetryHelper.ts +1769 -311
  166. package/src/components/editor/editor-group/LegendAISuggestTelemetryHooks.ts +57 -0
  167. package/src/components/editor/editor-group/RuntimeEditor.tsx +282 -132
  168. package/src/components/editor/editor-group/dataProduct/DataProductEditor.tsx +293 -106
  169. package/src/components/editor/editor-group/dataProduct/DataProductQueryBuilderHelper.ts +3 -13
  170. package/src/components/editor/editor-group/service-editor/ServiceEditor.tsx +41 -23
  171. package/src/components/editor/editor-group/service-editor/testable/ServiceTestDataEditor.tsx +5 -11
  172. package/src/components/editor/side-bar/WorkflowManager.tsx +24 -0
  173. package/src/index.ts +17 -1
  174. package/src/stores/editor/EditorGraphState.ts +30 -1
  175. package/src/stores/editor/EditorStore.ts +22 -0
  176. package/src/stores/editor/EditorTabManagerState.ts +128 -1
  177. package/src/stores/editor/EditorTabTelemetryHelper.ts +70 -0
  178. package/src/stores/editor/GraphEditFormModeState.ts +35 -1
  179. package/src/stores/editor/LegendAISuggestTelemetry.ts +592 -0
  180. package/src/stores/editor/LegendSQLStudioPlaygroundState.ts +3 -3
  181. package/src/stores/editor/editor-state/GraphGenerationState.ts +68 -9
  182. package/src/stores/editor/editor-state/ModelImporterState.ts +2 -0
  183. package/src/stores/editor/editor-state/element-editor-state/ElementExternalFormatGenerationState.ts +30 -0
  184. package/src/stores/editor/editor-state/element-editor-state/RuntimeEditorState.ts +92 -31
  185. package/src/stores/editor/editor-state/element-editor-state/availability/testable/AvailabilityTestableState.ts +17 -0
  186. package/src/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.ts +6 -6
  187. package/src/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.ts +75 -17
  188. package/src/stores/editor/editor-state/element-editor-state/dataProduct/testable/DataProductTestableState.ts +17 -0
  189. package/src/stores/editor/editor-state/element-editor-state/function-activator/testable/FunctionTestableState.ts +27 -2
  190. package/src/stores/editor/editor-state/element-editor-state/ingest/IngestTestableState.ts +17 -0
  191. package/src/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.ts +57 -0
  192. package/src/stores/editor/editor-state/element-editor-state/service/ServiceRegistrationState.ts +74 -0
  193. package/src/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.ts +22 -21
  194. package/src/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestEditorState.ts +9 -0
  195. package/src/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.ts +78 -21
  196. package/src/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.ts +205 -18
  197. package/src/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.ts +38 -3
  198. package/src/stores/editor/sidebar-state/BulkServiceRegistrationState.ts +71 -1
  199. package/src/stores/editor/sidebar-state/LocalChangesState.ts +4 -0
  200. package/src/stores/editor/sidebar-state/ProjectOverviewState.ts +114 -0
  201. package/src/stores/editor/sidebar-state/WorkflowManagerState.ts +250 -29
  202. package/src/stores/editor/sidebar-state/WorkspaceReviewState.ts +84 -0
  203. package/src/stores/editor/sidebar-state/testable/GlobalTestRunnerState.ts +124 -17
  204. package/src/stores/editor/utils/MockDataUtils.ts +33 -32
  205. package/src/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.ts +18 -0
  206. package/src/stores/graph-modifier/DSL_LakehouseRuntime_GraphModifierHelper.ts +62 -7
  207. package/src/stores/project-reviewer/ProjectReviewerStore.ts +97 -0
  208. package/src/stores/workspace-setup/WorkspaceSetupStore.ts +87 -4
  209. package/tsconfig.json +3 -0
@@ -77,6 +77,7 @@ import {
77
77
  TestableTestEditorState,
78
78
  TestableTestSuiteEditorState,
79
79
  } from '../../testable/TestableEditorState.js';
80
+ import { TESTABLE_KIND } from '../../../../../../__lib__/LegendStudioTelemetryHelper.js';
80
81
  import { generateVariableExpressionMockValue } from '@finos/legend-query-builder';
81
82
  import {
82
83
  buildRelationElementsDataWithColumns,
@@ -208,6 +209,14 @@ export class DataProductTestState extends TestableTestEditorState {
208
209
  newParameterValueName = '';
209
210
  showNewParameterModal = false;
210
211
 
212
+ override get testableKind(): TESTABLE_KIND {
213
+ return TESTABLE_KIND.DATA_PRODUCT;
214
+ }
215
+
216
+ override get testablePath(): string {
217
+ return this.suiteState.testableState.dataProduct.path;
218
+ }
219
+
211
220
  constructor(
212
221
  suiteState: DataProductTestSuiteState,
213
222
  test: DataProductAccessPointTest,
@@ -637,6 +646,14 @@ export class DataProductTestSuiteState extends TestableTestSuiteEditorState {
637
646
  declare selectTestState: DataProductTestState | undefined;
638
647
  testDataState: DataProductTestDataState;
639
648
 
649
+ override get testableKind(): TESTABLE_KIND {
650
+ return TESTABLE_KIND.DATA_PRODUCT;
651
+ }
652
+
653
+ override get testablePath(): string {
654
+ return this.testableState.dataProduct.path;
655
+ }
656
+
640
657
  constructor(
641
658
  editorStore: EditorStore,
642
659
  testableState: DataProductTestableState,
@@ -68,7 +68,7 @@ import {
68
68
  Database,
69
69
  DataProduct,
70
70
  IngestDefinition,
71
- LakehouseRuntime,
71
+ LakehouseBaseRuntime,
72
72
  PackageableElementExplicitReference,
73
73
  observe_ValueSpecification,
74
74
  observe_RelationElementsData,
@@ -111,6 +111,7 @@ import {
111
111
  createBareExternalFormat,
112
112
  } from '../../../../utils/TestableUtils.js';
113
113
  import { LEGEND_STUDIO_APP_EVENT } from '../../../../../../__lib__/LegendStudioEvent.js';
114
+ import { TESTABLE_KIND } from '../../../../../../__lib__/LegendStudioTelemetryHelper.js';
114
115
  import { testSuite_addTest } from '../../../../../graph-modifier/Testable_GraphModifierHelper.js';
115
116
  import {
116
117
  buildDefaultInstanceValue,
@@ -437,6 +438,14 @@ export class FunctionTestState extends TestableTestEditorState {
437
438
  newParameterValueName = '';
438
439
  showNewParameterModal = false;
439
440
 
441
+ override get testableKind(): TESTABLE_KIND {
442
+ return TESTABLE_KIND.FUNCTION_ACTIVATOR;
443
+ }
444
+
445
+ override get testablePath(): string {
446
+ return this.functionTestableState.function.path;
447
+ }
448
+
440
449
  constructor(
441
450
  editorStore: EditorStore,
442
451
  parentSuiteState: FunctionTestSuiteState,
@@ -847,6 +856,14 @@ export class FunctionTestSuiteState extends TestableTestSuiteEditorState {
847
856
 
848
857
  showCreateModal = false;
849
858
 
859
+ override get testableKind(): TESTABLE_KIND {
860
+ return TESTABLE_KIND.FUNCTION_ACTIVATOR;
861
+ }
862
+
863
+ override get testablePath(): string {
864
+ return this.functionTestableState.function.path;
865
+ }
866
+
850
867
  constructor(
851
868
  editorStore: EditorStore,
852
869
  functionTestableState: FunctionTestableState,
@@ -930,6 +947,14 @@ export class FunctionTestableState extends TestablePackageableElementEditorState
930
947
  createSuiteModal = false;
931
948
  cachedAccessors: Accessor[] = [];
932
949
 
950
+ override get testableKind(): TESTABLE_KIND {
951
+ return TESTABLE_KIND.FUNCTION_ACTIVATOR;
952
+ }
953
+
954
+ override get testablePath(): string {
955
+ return this.function.path;
956
+ }
957
+
933
958
  constructor(functionEditorState: FunctionEditorState) {
934
959
  super(functionEditorState, functionEditorState.functionElement);
935
960
  makeObservable(this, {
@@ -1033,7 +1058,7 @@ export class FunctionTestableState extends TestablePackageableElementEditorState
1033
1058
  `Function Test Suite Only supports One Runtime at this time. Found ${engineRuntimes.length}`,
1034
1059
  );
1035
1060
  const engineRuntime = guaranteeNonNullable(engineRuntimes[0]);
1036
- if (!(engineRuntime instanceof LakehouseRuntime)) {
1061
+ if (!(engineRuntime instanceof LakehouseBaseRuntime)) {
1037
1062
  assertTrue(
1038
1063
  !(
1039
1064
  engineRuntime.connectionStores.length &&
@@ -53,6 +53,7 @@ import {
53
53
  TestableTestEditorState,
54
54
  TestableTestSuiteEditorState,
55
55
  } from '../testable/TestableEditorState.js';
56
+ import { TESTABLE_KIND } from '../../../../../__lib__/LegendStudioTelemetryHelper.js';
56
57
  import type { EditorStore } from '../../../EditorStore.js';
57
58
  import type { IngestDefinitionEditorState } from './IngestDefinitionEditorState.js';
58
59
  import { RelationElementState } from '../data/EmbeddedDataState.js';
@@ -108,6 +109,14 @@ export class IngestTestState extends TestableTestEditorState {
108
109
  readonly uuid = uuid();
109
110
  testDataRelationState: RelationElementState | undefined;
110
111
 
112
+ override get testableKind(): TESTABLE_KIND {
113
+ return TESTABLE_KIND.INGEST;
114
+ }
115
+
116
+ override get testablePath(): string {
117
+ return this.suiteState.testableState.ingest.path;
118
+ }
119
+
111
120
  constructor(suiteState: IngestTestSuiteState, test: IngestMatViewTest) {
112
121
  super(
113
122
  suiteState.testableState.ingest,
@@ -342,6 +351,14 @@ export class IngestTestSuiteState extends TestableTestSuiteEditorState {
342
351
  testDataState: IngestTestDataState;
343
352
  readonly uuid = uuid();
344
353
 
354
+ override get testableKind(): TESTABLE_KIND {
355
+ return TESTABLE_KIND.INGEST;
356
+ }
357
+
358
+ override get testablePath(): string {
359
+ return this.testableState.ingest.path;
360
+ }
361
+
345
362
  constructor(
346
363
  editorStore: EditorStore,
347
364
  testableState: IngestTestableState,
@@ -87,6 +87,12 @@ import {
87
87
  isRelationalMappingTestSuite,
88
88
  } from './MappingTestingHelper.js';
89
89
  import { LEGEND_STUDIO_APP_EVENT } from '../../../../../../__lib__/LegendStudioEvent.js';
90
+ import {
91
+ LegendStudioTelemetryHelper,
92
+ TESTABLE_RUN_MODE,
93
+ TESTABLE_KIND,
94
+ summarizeTestResults,
95
+ } from '../../../../../../__lib__/LegendStudioTelemetryHelper.js';
90
96
 
91
97
  export class StoreTestDataState {
92
98
  readonly editorStore: EditorStore;
@@ -218,6 +224,14 @@ export class MappingTestState extends TestableTestEditorState {
218
224
  override test: MappingTest;
219
225
  dataState: MappingTestDataState;
220
226
 
227
+ override get testableKind(): TESTABLE_KIND {
228
+ return TESTABLE_KIND.MAPPING;
229
+ }
230
+
231
+ override get testablePath(): string {
232
+ return this.mappingTestableState.mapping.path;
233
+ }
234
+
221
235
  constructor(
222
236
  editorStore: EditorStore,
223
237
  parentSuiteState: MappingTestSuiteState,
@@ -348,6 +362,14 @@ export class MappingTestSuiteState extends TestableTestSuiteEditorState {
348
362
  showCreateModal = false;
349
363
  queryState: MappingTestSuiteQueryState;
350
364
 
365
+ override get testableKind(): TESTABLE_KIND {
366
+ return TESTABLE_KIND.MAPPING;
367
+ }
368
+
369
+ override get testablePath(): string {
370
+ return this.mappingTestableState.mapping.path;
371
+ }
372
+
351
373
  constructor(
352
374
  editorStore: EditorStore,
353
375
  mappingTestableState: MappingTestableState,
@@ -563,6 +585,14 @@ export class MappingTestableState extends TestablePackageableElementEditorState
563
585
  declare selectedTestSuite: MappingTestSuiteState | undefined;
564
586
  declare runningSuite: MappingTestSuite | undefined;
565
587
 
588
+ override get testableKind(): TESTABLE_KIND {
589
+ return TESTABLE_KIND.MAPPING;
590
+ }
591
+
592
+ override get testablePath(): string {
593
+ return this.mapping.path;
594
+ }
595
+
566
596
  constructor(mappingEditorState: MappingEditorState) {
567
597
  super(mappingEditorState, mappingEditorState.mapping);
568
598
  makeObservable(this, {
@@ -644,6 +674,19 @@ export class MappingTestableState extends TestablePackageableElementEditorState
644
674
  }
645
675
 
646
676
  override *runSuite(suite: MappingTestSuite): GeneratorFn<void> {
677
+ const telemetryBase = {
678
+ testableKind: this.testableKind,
679
+ testablePath: this.testablePath,
680
+ suiteId: suite.id,
681
+ mode: TESTABLE_RUN_MODE.RUN_SUITE,
682
+ testCount: suite.tests.length,
683
+ };
684
+ const startTime = Date.now();
685
+ LegendStudioTelemetryHelper.logEvent_TestableRunLaunched(
686
+ this.editorStore.applicationStore.telemetryService,
687
+ this.editorStore.editorMode.getSourceInfo(),
688
+ telemetryBase,
689
+ );
647
690
  try {
648
691
  this.runningSuite = suite;
649
692
  this.clearTestResultsForSuite(suite);
@@ -682,10 +725,24 @@ export class MappingTestableState extends TestablePackageableElementEditorState
682
725
  )) as TestResult[];
683
726
  }
684
727
  this.handleNewResults(testResults);
728
+ LegendStudioTelemetryHelper.logEvent_TestableRunSucceeded(
729
+ this.editorStore.applicationStore.telemetryService,
730
+ this.editorStore.editorMode.getSourceInfo(),
731
+ {
732
+ ...telemetryBase,
733
+ durationMs: Date.now() - startTime,
734
+ ...summarizeTestResults(testResults),
735
+ },
736
+ );
685
737
  } catch (error) {
686
738
  assertErrorThrown(error);
687
739
  this.editorStore.applicationStore.notificationService.notifyError(error);
688
740
  this.isRunningTestableSuitesState.fail();
741
+ LegendStudioTelemetryHelper.logEvent_TestableRunFailure(
742
+ this.editorStore.applicationStore.telemetryService,
743
+ this.editorStore.editorMode.getSourceInfo(),
744
+ { ...telemetryBase, errorMessage: error.message },
745
+ );
689
746
  } finally {
690
747
  this.selectedTestSuite?.testStates.forEach((t) =>
691
748
  t.runningTestAction.complete(),
@@ -32,6 +32,10 @@ import {
32
32
  compareSemVerVersions,
33
33
  } from '@finos/legend-shared';
34
34
  import { LEGEND_STUDIO_APP_EVENT } from '../../../../../__lib__/LegendStudioEvent.js';
35
+ import {
36
+ LegendStudioTelemetryHelper,
37
+ SERVICE_REGISTRATION_TRIGGER,
38
+ } from '../../../../../__lib__/LegendStudioTelemetryHelper.js';
35
39
  import {
36
40
  type Service,
37
41
  type PureExecution,
@@ -288,7 +292,17 @@ export class ServiceRegistrationState extends ServiceConfigState {
288
292
 
289
293
  *checkServiceRegistration(): GeneratorFn<void> {
290
294
  this.deploymentCheckState.inProgress();
295
+ const startedAt = Date.now();
296
+ const servicePath = this.service.path;
297
+ const sourceInfo = this.editorStore.editorMode.getSourceInfo();
298
+ LegendStudioTelemetryHelper.logEvent_ServiceRegistrationCheckLaunched(
299
+ this.editorStore.applicationStore.telemetryService,
300
+ sourceInfo,
301
+ { servicePath, envCount: this.registrationOptions.length },
302
+ );
291
303
  const envs: string[] = [];
304
+ const failedEnvs: string[] = [];
305
+ let lastErrorMessage: string | undefined;
292
306
  const servicePattern = this.service.pattern.startsWith('/')
293
307
  ? this.service.pattern.substring(1)
294
308
  : this.service.pattern;
@@ -304,6 +318,8 @@ export class ServiceRegistrationState extends ServiceConfigState {
304
318
  }
305
319
  } catch (error) {
306
320
  assertErrorThrown(error);
321
+ failedEnvs.push(envConfig.env);
322
+ lastErrorMessage = error.message;
307
323
  this.editorStore.applicationStore.logService.warn(
308
324
  LogEvent.create(
309
325
  LEGEND_STUDIO_APP_EVENT.SERVICE_REGISTRATION_CHECK_FAILURE,
@@ -314,9 +330,52 @@ export class ServiceRegistrationState extends ServiceConfigState {
314
330
  }
315
331
  this.setRegisteredEnvs(envs);
316
332
  this.deploymentCheckState.complete();
333
+ // A precheck run only counts as failed when no env could be probed at
334
+ // all; partial per-env errors are reported on the success payload.
335
+ const envCount = this.registrationOptions.length;
336
+ const durationMs = Date.now() - startedAt;
337
+ if (lastErrorMessage !== undefined && failedEnvs.length === envCount) {
338
+ LegendStudioTelemetryHelper.logEvent_ServiceRegistrationCheckFailure(
339
+ this.editorStore.applicationStore.telemetryService,
340
+ sourceInfo,
341
+ {
342
+ servicePath,
343
+ envCount,
344
+ durationMs,
345
+ errorCount: failedEnvs.length,
346
+ failedEnvs,
347
+ errorMessage: lastErrorMessage,
348
+ },
349
+ );
350
+ } else {
351
+ LegendStudioTelemetryHelper.logEvent_ServiceRegistrationCheckSucceeded(
352
+ this.editorStore.applicationStore.telemetryService,
353
+ sourceInfo,
354
+ {
355
+ servicePath,
356
+ envCount,
357
+ durationMs,
358
+ registeredEnvCount: envs.length,
359
+ errorCount: failedEnvs.length,
360
+ failedEnvs,
361
+ },
362
+ );
363
+ }
317
364
  }
318
365
 
319
366
  *registerService(): GeneratorFn<void> {
367
+ const startedAt = Date.now();
368
+ const telemetryBase = {
369
+ trigger: SERVICE_REGISTRATION_TRIGGER.SINGLE,
370
+ executionMode: this.serviceExecutionMode,
371
+ serviceCount: 1,
372
+ activatePostRegistration: this.activatePostRegistration,
373
+ };
374
+ LegendStudioTelemetryHelper.logEvent_ServiceRegistrationLaunched(
375
+ this.editorStore.applicationStore.telemetryService,
376
+ this.editorStore.editorMode.getSourceInfo(),
377
+ telemetryBase,
378
+ );
320
379
  try {
321
380
  this.registrationState.inProgress();
322
381
  this.validateServiceForRegistration();
@@ -381,12 +440,27 @@ export class ServiceRegistrationState extends ServiceConfigState {
381
440
  },
382
441
  ],
383
442
  });
443
+ LegendStudioTelemetryHelper.logEvent_ServiceRegistrationSucceeded(
444
+ this.editorStore.applicationStore.telemetryService,
445
+ this.editorStore.editorMode.getSourceInfo(),
446
+ {
447
+ ...telemetryBase,
448
+ durationMs: Date.now() - startedAt,
449
+ registeredCount: 1,
450
+ failedCount: 0,
451
+ },
452
+ );
384
453
  } catch (error) {
385
454
  assertErrorThrown(error);
386
455
  this.editorStore.applicationStore.logService.error(
387
456
  LogEvent.create(LEGEND_STUDIO_APP_EVENT.SERVICE_REGISTRATION_FAILURE),
388
457
  error,
389
458
  );
459
+ LegendStudioTelemetryHelper.logEvent_ServiceRegistrationFailure(
460
+ this.editorStore.applicationStore.telemetryService,
461
+ this.editorStore.editorMode.getSourceInfo(),
462
+ { ...telemetryBase, errorMessage: error.message },
463
+ );
390
464
  this.editorStore.applicationStore.notificationService.notifyError(error);
391
465
  } finally {
392
466
  this.registrationState.reset();
@@ -117,19 +117,12 @@ export const createMockPrimitiveValueSpecificationFromRelationalDataType = (
117
117
  relationalDataType: RelationalDataType,
118
118
  graph: PureModel,
119
119
  observerContext: ObserverContext,
120
- ): ValueSpecification | undefined => {
121
- const primitiveTypeFromRelational =
122
- getPrimitiveTypeFromRelationalType(relationalDataType);
123
-
124
- if (primitiveTypeFromRelational) {
125
- return createMockPrimitiveValueSpecification(
126
- primitiveTypeFromRelational,
127
- graph,
128
- observerContext,
129
- );
130
- }
131
- return undefined;
132
- };
120
+ ): ValueSpecification =>
121
+ createMockPrimitiveValueSpecification(
122
+ getPrimitiveTypeFromRelationalType(relationalDataType),
123
+ graph,
124
+ observerContext,
125
+ );
133
126
 
134
127
  export class ServiceTestDataParametersState extends LambdaParametersState {
135
128
  connectionTestDataState: ConnectionTestDataState;
@@ -280,14 +273,12 @@ export class TableRowIdentifierState {
280
273
  this.connectionTestDataState.editorStore.changeDetectionState
281
274
  .observerContext,
282
275
  );
283
- if (valueSpec) {
284
- const rowIdentifierState = new RowIdentifierState(
285
- this.connectionTestDataState,
286
- column,
287
- valueSpec,
288
- );
289
- this.rowIdentifierStates.push(rowIdentifierState);
290
- }
276
+ const rowIdentifierState = new RowIdentifierState(
277
+ this.connectionTestDataState,
278
+ column,
279
+ valueSpec,
280
+ );
281
+ this.rowIdentifierStates.push(rowIdentifierState);
291
282
  }
292
283
 
293
284
  removeRowIdentifierState(rowIdentifierState: RowIdentifierState): void {
@@ -472,6 +463,11 @@ export class ConnectionTestDataState {
472
463
  this.generatingTestDataState.pass();
473
464
  } catch (error) {
474
465
  assertErrorThrown(error);
466
+ LegendStudioTelemetryHelper.logEvent_TestDataGenerationFailure(
467
+ this.editorStore.applicationStore.telemetryService,
468
+ this.editorStore.editorMode.getSourceInfo(),
469
+ error.message,
470
+ );
475
471
  this.editorStore.applicationStore.notificationService.notifyError(
476
472
  `Unable to generate test data: ${error.message}`,
477
473
  );
@@ -610,6 +606,11 @@ export class ConnectionTestDataState {
610
606
  this.generatingTestDataWithSeedDataState.pass();
611
607
  } catch (error) {
612
608
  assertErrorThrown(error);
609
+ LegendStudioTelemetryHelper.logEvent_TestDataGenerationFailure(
610
+ this.editorStore.applicationStore.telemetryService,
611
+ this.editorStore.editorMode.getSourceInfo(),
612
+ error.message,
613
+ );
613
614
  this.editorStore.applicationStore.notificationService.notifyError(
614
615
  `Unable to generate test data: ${error.message}`,
615
616
  );
@@ -30,6 +30,7 @@ import {
30
30
  TESTABLE_TEST_TAB,
31
31
  TestableTestEditorState,
32
32
  } from '../../testable/TestableEditorState.js';
33
+ import { TESTABLE_KIND } from '../../../../../../__lib__/LegendStudioTelemetryHelper.js';
33
34
  import type { ServiceTestSuiteState } from './ServiceTestableState.js';
34
35
  import {
35
36
  service_addAssertKeyForTest,
@@ -428,6 +429,14 @@ export class ServiceTestState extends TestableTestEditorState {
428
429
  override test: ServiceTest;
429
430
  override testable: Service;
430
431
  setupState: ServiceTestSetupState;
432
+
433
+ override get testableKind(): TESTABLE_KIND {
434
+ return TESTABLE_KIND.SERVICE;
435
+ }
436
+
437
+ override get testablePath(): string {
438
+ return this.testable.path;
439
+ }
431
440
  constructor(suiteState: ServiceTestSuiteState, test: ServiceTest) {
432
441
  super(
433
442
  suiteState.testableState.serviceEditorState.service,
@@ -66,6 +66,11 @@ import {
66
66
  SERIALIZATION_FORMAT,
67
67
  ServiceTestState,
68
68
  } from './ServiceTestEditorState.js';
69
+ import {
70
+ LegendStudioTelemetryHelper,
71
+ SERVICE_TEST_SUITE_RUN_MODE,
72
+ summarizeTestResults,
73
+ } from '../../../../../../__lib__/LegendStudioTelemetryHelper.js';
69
74
 
70
75
  const createEmptyServiceTestSuite = (
71
76
  serviceTestableState: ServiceTestableState,
@@ -186,15 +191,27 @@ export class ServiceTestSuiteState {
186
191
  }
187
192
 
188
193
  *runSuite(): GeneratorFn<void> {
194
+ const service = this.testableState.serviceEditorState.service;
195
+ const input = new RunTestsTestableInput(service);
196
+ input.unitTestIds = this.suite.tests.map(
197
+ (t) => new UniqueTestId(this.suite, t),
198
+ );
199
+ const telemetryData = {
200
+ servicePath: service.path,
201
+ suiteId: this.suite.id,
202
+ mode: SERVICE_TEST_SUITE_RUN_MODE.RUN_SUITE,
203
+ testCount: input.unitTestIds.length,
204
+ };
205
+ const startTime = Date.now();
206
+ LegendStudioTelemetryHelper.logEvent_ServiceTestSuiteRunLaunched(
207
+ this.editorStore.applicationStore.telemetryService,
208
+ this.editorStore.editorMode.getSourceInfo(),
209
+ telemetryData,
210
+ );
189
211
  try {
190
212
  this.runningTestState.inProgress();
191
213
  this.testStates.forEach((t) => t.resetResult());
192
214
  this.testStates.forEach((t) => t.runningTestAction.inProgress());
193
- const service = this.testableState.serviceEditorState.service;
194
- const input = new RunTestsTestableInput(service);
195
- input.unitTestIds = this.suite.tests.map(
196
- (t) => new UniqueTestId(this.suite, t),
197
- );
198
215
  const testResults =
199
216
  (yield this.editorStore.graphManagerState.graphManager.runTests(
200
217
  [input],
@@ -205,34 +222,60 @@ export class ServiceTestSuiteState {
205
222
  state?.handleTestResult(result);
206
223
  });
207
224
  this.runningTestState.complete();
225
+ LegendStudioTelemetryHelper.logEvent_ServiceTestSuiteRunSucceeded(
226
+ this.editorStore.applicationStore.telemetryService,
227
+ this.editorStore.editorMode.getSourceInfo(),
228
+ {
229
+ ...telemetryData,
230
+ durationMs: Date.now() - startTime,
231
+ ...summarizeTestResults(testResults),
232
+ },
233
+ );
208
234
  } catch (error) {
209
235
  assertErrorThrown(error);
210
236
  this.editorStore.applicationStore.notificationService.notifyError(error);
211
237
  this.runningTestState.fail();
238
+ LegendStudioTelemetryHelper.logEvent_ServiceTestSuiteRunFailure(
239
+ this.editorStore.applicationStore.telemetryService,
240
+ this.editorStore.editorMode.getSourceInfo(),
241
+ { ...telemetryData, errorMessage: error.message },
242
+ );
212
243
  } finally {
213
244
  this.testStates.forEach((t) => t.runningTestAction.complete());
214
245
  }
215
246
  }
216
247
 
217
248
  *runFailingTests(): GeneratorFn<void> {
249
+ const service = this.testableState.serviceEditorState.service;
250
+ const input = new RunTestsTestableInput(service);
251
+ input.unitTestIds = this.testStates
252
+ .map((testState) => {
253
+ const result = testState.testResultState.result;
254
+ if (
255
+ (result instanceof TestExecuted &&
256
+ result.testExecutionStatus === TestExecutionStatus.FAIL) ||
257
+ result instanceof TestError
258
+ ) {
259
+ testState.runningTestAction.inProgress();
260
+ return new UniqueTestId(this.suite, testState.test);
261
+ }
262
+ return undefined;
263
+ })
264
+ .filter(isNonNullable);
265
+ const telemetryData = {
266
+ servicePath: service.path,
267
+ suiteId: this.suite.id,
268
+ mode: SERVICE_TEST_SUITE_RUN_MODE.RUN_FAILING,
269
+ testCount: input.unitTestIds.length,
270
+ };
271
+ const startTime = Date.now();
272
+ LegendStudioTelemetryHelper.logEvent_ServiceTestSuiteRunLaunched(
273
+ this.editorStore.applicationStore.telemetryService,
274
+ this.editorStore.editorMode.getSourceInfo(),
275
+ telemetryData,
276
+ );
218
277
  try {
219
278
  this.runningTestState.inProgress();
220
- const service = this.testableState.serviceEditorState.service;
221
- const input = new RunTestsTestableInput(service);
222
- input.unitTestIds = this.testStates
223
- .map((testState) => {
224
- const result = testState.testResultState.result;
225
- if (
226
- (result instanceof TestExecuted &&
227
- result.testExecutionStatus === TestExecutionStatus.FAIL) ||
228
- result instanceof TestError
229
- ) {
230
- testState.runningTestAction.inProgress();
231
- return new UniqueTestId(this.suite, testState.test);
232
- }
233
- return undefined;
234
- })
235
- .filter(isNonNullable);
236
279
  const testResults =
237
280
  (yield this.editorStore.graphManagerState.graphManager.runTests(
238
281
  [input],
@@ -243,10 +286,24 @@ export class ServiceTestSuiteState {
243
286
  state?.handleTestResult(result);
244
287
  });
245
288
  this.runningTestState.complete();
289
+ LegendStudioTelemetryHelper.logEvent_ServiceTestSuiteRunSucceeded(
290
+ this.editorStore.applicationStore.telemetryService,
291
+ this.editorStore.editorMode.getSourceInfo(),
292
+ {
293
+ ...telemetryData,
294
+ durationMs: Date.now() - startTime,
295
+ ...summarizeTestResults(testResults),
296
+ },
297
+ );
246
298
  } catch (error) {
247
299
  assertErrorThrown(error);
248
300
  this.editorStore.applicationStore.notificationService.notifyError(error);
249
301
  this.runningTestState.fail();
302
+ LegendStudioTelemetryHelper.logEvent_ServiceTestSuiteRunFailure(
303
+ this.editorStore.applicationStore.telemetryService,
304
+ this.editorStore.editorMode.getSourceInfo(),
305
+ { ...telemetryData, errorMessage: error.message },
306
+ );
250
307
  } finally {
251
308
  this.testStates.forEach((t) => t.runningTestAction.complete());
252
309
  }