@finos/legend-application-marketplace 0.2.24 → 0.2.26
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.
- package/lib/components/MarketplaceSearchFiltersPanel/MarketplaceSearchFiltersPanel.d.ts.map +1 -1
- package/lib/components/MarketplaceSearchFiltersPanel/MarketplaceSearchFiltersPanel.js +2 -11
- package/lib/components/MarketplaceSearchFiltersPanel/MarketplaceSearchFiltersPanel.js.map +1 -1
- package/lib/components/__test-utils__/TEST_DATA__ContractErrors.d.ts +88 -0
- package/lib/components/__test-utils__/TEST_DATA__ContractErrors.d.ts.map +1 -0
- package/lib/components/__test-utils__/TEST_DATA__ContractErrors.js +178 -0
- package/lib/components/__test-utils__/TEST_DATA__ContractErrors.js.map +1 -0
- package/lib/index.css +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/LegendMarketplaceBaseStore.d.ts +2 -2
- package/lib/stores/LegendMarketplaceBaseStore.d.ts.map +1 -1
- package/lib/stores/LegendMarketplaceBaseStore.js.map +1 -1
- package/lib/stores/lakehouse/LegendMarketplaceProductViewerStore.d.ts.map +1 -1
- package/lib/stores/lakehouse/LegendMarketplaceProductViewerStore.js +3 -3
- package/lib/stores/lakehouse/LegendMarketplaceProductViewerStore.js.map +1 -1
- package/lib/stores/lakehouse/dataProducts/ProductCardState.js +3 -3
- package/lib/stores/lakehouse/dataProducts/ProductCardState.js.map +1 -1
- package/lib/stores/lakehouse/entitlements/EntitlementsDashboardState.d.ts +3 -17
- package/lib/stores/lakehouse/entitlements/EntitlementsDashboardState.d.ts.map +1 -1
- package/lib/stores/lakehouse/entitlements/EntitlementsDashboardState.js +20 -195
- package/lib/stores/lakehouse/entitlements/EntitlementsDashboardState.js.map +1 -1
- package/lib/utils/LakehouseUtils.d.ts +1 -2
- package/lib/utils/LakehouseUtils.d.ts.map +1 -1
- package/lib/utils/LakehouseUtils.js +2 -31
- package/lib/utils/LakehouseUtils.js.map +1 -1
- package/package.json +8 -8
- package/src/components/MarketplaceSearchFiltersPanel/MarketplaceSearchFiltersPanel.tsx +0 -32
- package/src/components/__test-utils__/TEST_DATA__ContractErrors.ts +252 -0
- package/src/stores/LegendMarketplaceBaseStore.ts +1 -1
- package/src/stores/lakehouse/LegendMarketplaceProductViewerStore.ts +3 -5
- package/src/stores/lakehouse/dataProducts/ProductCardState.ts +3 -3
- package/src/stores/lakehouse/entitlements/EntitlementsDashboardState.ts +41 -302
- package/src/utils/LakehouseUtils.tsx +1 -80
- package/tsconfig.json +1 -0
|
@@ -13,10 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { V1_AdHocDeploymentDataProductOrigin,
|
|
17
|
-
import { ActionState
|
|
16
|
+
import { V1_AdHocDeploymentDataProductOrigin, V1_SdlcDeploymentDataProductOrigin, } from '@finos/legend-graph';
|
|
17
|
+
import { ActionState } from '@finos/legend-shared';
|
|
18
18
|
import { resolveVersion, } from '@finos/legend-server-depot';
|
|
19
|
-
import { deserialize } from 'serializr';
|
|
20
19
|
export const buildGraphForDataProduct = async (entitlementsDataProductDetails, graphManagerState, graphManager, marketplaceBaseStore) => {
|
|
21
20
|
if (entitlementsDataProductDetails.origin instanceof
|
|
22
21
|
V1_AdHocDeploymentDataProductOrigin) {
|
|
@@ -30,32 +29,4 @@ export const buildGraphForDataProduct = async (entitlementsDataProductDetails, g
|
|
|
30
29
|
await graphManager.buildGraph(graphManagerState.graph, entities, ActionState.create());
|
|
31
30
|
}
|
|
32
31
|
};
|
|
33
|
-
export const getDataProductFromDetails = async (details, graphManager, marketplaceBaseStore) => {
|
|
34
|
-
if (details.origin instanceof V1_SdlcDeploymentDataProductOrigin) {
|
|
35
|
-
const rawEntities = (await marketplaceBaseStore.depotServerClient.getVersionEntities(details.origin.group, details.origin.artifact, resolveVersion(details.origin.version), CORE_PURE_PATH.DATA_PRODUCT));
|
|
36
|
-
const entities = rawEntities.map((entity) => deserialize(V1_dataProductModelSchema(graphManager.pluginManager.getPureProtocolProcessorPlugins()), entity.entity.content));
|
|
37
|
-
const matchingEntities = entities.filter((entity) => entity.name.toLowerCase() === details.id.toLowerCase());
|
|
38
|
-
if (matchingEntities.length === 0) {
|
|
39
|
-
throw new Error(`No data product found with name ${details.id} in project`);
|
|
40
|
-
}
|
|
41
|
-
else if (matchingEntities.length > 1) {
|
|
42
|
-
throw new Error(`Multiple data products found with name ${details.id} in project`);
|
|
43
|
-
}
|
|
44
|
-
return matchingEntities[0];
|
|
45
|
-
}
|
|
46
|
-
else if (details.origin instanceof V1_AdHocDeploymentDataProductOrigin) {
|
|
47
|
-
const entities = await graphManager.pureCodeToEntities(details.origin.definition);
|
|
48
|
-
const elements = entities
|
|
49
|
-
.filter((e) => e.classifierPath === CORE_PURE_PATH.DATA_PRODUCT)
|
|
50
|
-
.map((entity) => deserialize(V1_dataProductModelSchema(graphManager.pluginManager.getPureProtocolProcessorPlugins()), entity.content));
|
|
51
|
-
const matchingEntities = elements.filter((element) => element.name.toLowerCase() === details.id.toLowerCase());
|
|
52
|
-
if (matchingEntities.length > 1) {
|
|
53
|
-
throw new Error(`Multiple data products found with name ${details.id} in deployed definition`);
|
|
54
|
-
}
|
|
55
|
-
return guaranteeNonNullable(matchingEntities[0], `No data product found with name ${details.id} in deployed definition`);
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
return undefined;
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
32
|
//# sourceMappingURL=LakehouseUtils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LakehouseUtils.js","sourceRoot":"","sources":["../../src/utils/LakehouseUtils.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"LakehouseUtils.js","sourceRoot":"","sources":["../../src/utils/LakehouseUtils.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAIL,mCAAmC,EACnC,kCAAkC,GACnC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAoB,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAEL,cAAc,GACf,MAAM,4BAA4B,CAAC;AAIpC,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,EAC3C,8BAAiE,EACjE,iBAAoC,EACpC,YAAiC,EACjC,oBAAgD,EACjC,EAAE;IACjB,IACE,8BAA8B,CAAC,MAAM;QACrC,mCAAmC,EACnC,CAAC;QACD,MAAM,QAAQ,GAAa,MAAM,YAAY,CAAC,kBAAkB,CAC9D,8BAA8B,CAAC,MAAM,CAAC,UAAU,CACjD,CAAC;QACF,MAAM,YAAY,CAAC,UAAU,CAC3B,iBAAiB,CAAC,KAAK,EACvB,QAAQ,EACR,WAAW,CAAC,MAAM,EAAE,CACrB,CAAC;IACJ,CAAC;SAAM,IACL,8BAA8B,CAAC,MAAM;QACrC,kCAAkC,EAClC,CAAC;QACD,MAAM,gBAAgB,GACpB,MAAM,oBAAoB,CAAC,iBAAiB,CAAC,qBAAqB,CAChE,8BAA8B,CAAC,MAAM,CAAC,KAAK,EAC3C,8BAA8B,CAAC,MAAM,CAAC,QAAQ,EAC9C,cAAc,CAAC,8BAA8B,CAAC,MAAM,CAAC,OAAO,CAAC,EAC7D,IAAI,EACJ,IAAI,CACL,CAAC;QACJ,MAAM,QAAQ,GAAG,gBAAgB,CAAC,OAAO,CACvC,CAAC,aAAa,EAAE,EAAE,CAAC,aAAa,CAAC,QAAoB,CACtD,CAAC;QACF,MAAM,YAAY,CAAC,UAAU,CAC3B,iBAAiB,CAAC,KAAK,EACvB,QAAQ,EACR,WAAW,CAAC,MAAM,EAAE,CACrB,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos/legend-application-marketplace",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.26",
|
|
4
4
|
"description": "Legend Marketplace application core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -47,14 +47,14 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@finos/legend-application": "16.0.113",
|
|
49
49
|
"@finos/legend-art": "7.1.154",
|
|
50
|
-
"@finos/legend-code-editor": "2.0.
|
|
51
|
-
"@finos/legend-extension-dsl-data-product": "0.0.
|
|
52
|
-
"@finos/legend-extension-dsl-data-space": "10.4.
|
|
53
|
-
"@finos/legend-graph": "32.6.
|
|
54
|
-
"@finos/legend-lego": "2.0.
|
|
50
|
+
"@finos/legend-code-editor": "2.0.182",
|
|
51
|
+
"@finos/legend-extension-dsl-data-product": "0.0.92",
|
|
52
|
+
"@finos/legend-extension-dsl-data-space": "10.4.231",
|
|
53
|
+
"@finos/legend-graph": "32.6.13",
|
|
54
|
+
"@finos/legend-lego": "2.0.202",
|
|
55
55
|
"@finos/legend-server-depot": "6.1.14",
|
|
56
|
-
"@finos/legend-server-lakehouse": "0.3.
|
|
57
|
-
"@finos/legend-server-marketplace": "0.1.
|
|
56
|
+
"@finos/legend-server-lakehouse": "0.3.62",
|
|
57
|
+
"@finos/legend-server-marketplace": "0.1.77",
|
|
58
58
|
"@finos/legend-shared": "11.0.26",
|
|
59
59
|
"@finos/legend-storage": "3.0.147",
|
|
60
60
|
"@mui/material": "7.3.4",
|
|
@@ -28,7 +28,6 @@ import {
|
|
|
28
28
|
import type { TaxonomyNode } from '@finos/legend-server-marketplace';
|
|
29
29
|
import {
|
|
30
30
|
type LegendMarketplaceSearchResultsStore,
|
|
31
|
-
DataProductTypeFilter,
|
|
32
31
|
DataProductSourceFilter,
|
|
33
32
|
} from '../../stores/lakehouse/LegendMarketplaceSearchResultsStore.js';
|
|
34
33
|
import { useAuth } from 'react-oidc-context';
|
|
@@ -417,37 +416,6 @@ export const MarketplaceSearchFiltersPanel: React.FC<{
|
|
|
417
416
|
</CubesLoadingIndicator>
|
|
418
417
|
) : (
|
|
419
418
|
<>
|
|
420
|
-
<FilterSection title="Data Product Type">
|
|
421
|
-
{Object.values(DataProductTypeFilter).map((value) => (
|
|
422
|
-
<FilterCheckboxOption
|
|
423
|
-
key={value}
|
|
424
|
-
label={
|
|
425
|
-
value === DataProductTypeFilter.LAKEHOUSE
|
|
426
|
-
? 'Lakehouse'
|
|
427
|
-
: 'Legacy'
|
|
428
|
-
}
|
|
429
|
-
checked={store.selectedDataProductTypes.has(value)}
|
|
430
|
-
count={
|
|
431
|
-
value === DataProductTypeFilter.LAKEHOUSE
|
|
432
|
-
? store.filterCounts.lakehouse_count
|
|
433
|
-
: store.filterCounts.legacy_count
|
|
434
|
-
}
|
|
435
|
-
onChange={() => {
|
|
436
|
-
const isSelected =
|
|
437
|
-
store.selectedDataProductTypes.has(value);
|
|
438
|
-
store.toggleDataProductType(value);
|
|
439
|
-
LegendMarketplaceTelemetryHelper.logEvent_ApplySearchFilter(
|
|
440
|
-
baseStore.applicationStore.telemetryService,
|
|
441
|
-
'dataProductType',
|
|
442
|
-
value,
|
|
443
|
-
isSelected ? 'deselect' : 'select',
|
|
444
|
-
store.searchQuery,
|
|
445
|
-
);
|
|
446
|
-
triggerSearch();
|
|
447
|
-
}}
|
|
448
|
-
/>
|
|
449
|
-
))}
|
|
450
|
-
</FilterSection>
|
|
451
419
|
<FilterSection title="Source">
|
|
452
420
|
{Object.values(DataProductSourceFilter).map((value) => (
|
|
453
421
|
<FilterCheckboxOption
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import {
|
|
18
|
+
type V1_EntitlementsDataProductDetailsResponse,
|
|
19
|
+
type V1_EntitlementsLakehouseEnvironmentType,
|
|
20
|
+
V1_IngestEnvironmentClassification,
|
|
21
|
+
} from '@finos/legend-graph';
|
|
22
|
+
import { type PlainObject } from '@finos/legend-shared';
|
|
23
|
+
import type { IngestDeploymentServerConfig } from '@finos/legend-server-lakehouse';
|
|
24
|
+
import type { StoreProjectData } from '@finos/legend-server-depot';
|
|
25
|
+
import type { StoredFileGeneration } from '@finos/legend-storage';
|
|
26
|
+
|
|
27
|
+
export type LakehouseContractSyncStatusResponseFixture = {
|
|
28
|
+
status: string;
|
|
29
|
+
unsyncedUsers?: { username: string }[];
|
|
30
|
+
unsyncedAccessPoints?: { accessPointName: string }[];
|
|
31
|
+
unsyncedTargetAccounts?: string[];
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export const buildSyncStatusResponse = (params: {
|
|
35
|
+
status: string;
|
|
36
|
+
unsyncedUsers?: string[];
|
|
37
|
+
unsyncedAccessPoints?: string[];
|
|
38
|
+
unsyncedTargetAccounts?: string[];
|
|
39
|
+
}): LakehouseContractSyncStatusResponseFixture => ({
|
|
40
|
+
status: params.status,
|
|
41
|
+
...(params.unsyncedUsers
|
|
42
|
+
? { unsyncedUsers: params.unsyncedUsers.map((u) => ({ username: u })) }
|
|
43
|
+
: {}),
|
|
44
|
+
...(params.unsyncedAccessPoints
|
|
45
|
+
? {
|
|
46
|
+
unsyncedAccessPoints: params.unsyncedAccessPoints.map((a) => ({
|
|
47
|
+
accessPointName: a,
|
|
48
|
+
})),
|
|
49
|
+
}
|
|
50
|
+
: {}),
|
|
51
|
+
...(params.unsyncedTargetAccounts
|
|
52
|
+
? { unsyncedTargetAccounts: params.unsyncedTargetAccounts }
|
|
53
|
+
: {}),
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
export const mockSyncStatus_fullySynced: LakehouseContractSyncStatusResponseFixture =
|
|
57
|
+
buildSyncStatusResponse({ status: 'FULLY_SYNCED' });
|
|
58
|
+
|
|
59
|
+
export const mockSyncStatus_neverSynced: LakehouseContractSyncStatusResponseFixture =
|
|
60
|
+
buildSyncStatusResponse({ status: 'NEVER_SYNCED' });
|
|
61
|
+
|
|
62
|
+
export const mockSyncStatus_notFullySynced_all: LakehouseContractSyncStatusResponseFixture =
|
|
63
|
+
buildSyncStatusResponse({
|
|
64
|
+
status: 'NOT_FULLY_SYNCED',
|
|
65
|
+
unsyncedUsers: ['user1'],
|
|
66
|
+
unsyncedTargetAccounts: ['targetAccount1'],
|
|
67
|
+
unsyncedAccessPoints: ['accessPoint1'],
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
export const mockDataProductDetailsResponse_adHoc = (params: {
|
|
71
|
+
deploymentId: number;
|
|
72
|
+
resourceId: string;
|
|
73
|
+
envType: V1_EntitlementsLakehouseEnvironmentType;
|
|
74
|
+
}): V1_EntitlementsDataProductDetailsResponse =>
|
|
75
|
+
({
|
|
76
|
+
dataProducts: [
|
|
77
|
+
{
|
|
78
|
+
id: params.resourceId,
|
|
79
|
+
deploymentId: params.deploymentId,
|
|
80
|
+
title: 'Mock Ad-Hoc Data Product',
|
|
81
|
+
description: 'Ad-hoc deployment for contract-errors tests',
|
|
82
|
+
origin: {
|
|
83
|
+
type: 'AdHocDeployment',
|
|
84
|
+
definition: '',
|
|
85
|
+
},
|
|
86
|
+
lakehouseEnvironment: {
|
|
87
|
+
producerEnvironmentName: 'test-env',
|
|
88
|
+
type: params.envType,
|
|
89
|
+
},
|
|
90
|
+
dataProduct: {
|
|
91
|
+
name: params.resourceId,
|
|
92
|
+
accessPoints: [],
|
|
93
|
+
accessPointGroupStereotypeMappings: [],
|
|
94
|
+
owner: {
|
|
95
|
+
appDirId: 12345,
|
|
96
|
+
level: 'DEPLOYMENT',
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
fullPath: `test::${params.resourceId}`,
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
}) as unknown as V1_EntitlementsDataProductDetailsResponse;
|
|
103
|
+
|
|
104
|
+
export const TEST_APG_ID = 'GROUP1';
|
|
105
|
+
export const TEST_DP_NAME = 'MyDataProduct';
|
|
106
|
+
export const TEST_GAV = {
|
|
107
|
+
groupId: 'com.example',
|
|
108
|
+
artifactId: 'my-data-product',
|
|
109
|
+
versionId: '1.0.0',
|
|
110
|
+
};
|
|
111
|
+
export const TEST_FULL_PATH = `test::${TEST_DP_NAME}`;
|
|
112
|
+
|
|
113
|
+
export const mockDataProductDetailsResponse_sdlc = (params: {
|
|
114
|
+
deploymentId: number;
|
|
115
|
+
resourceId: string;
|
|
116
|
+
envType: V1_EntitlementsLakehouseEnvironmentType;
|
|
117
|
+
}): V1_EntitlementsDataProductDetailsResponse =>
|
|
118
|
+
({
|
|
119
|
+
dataProducts: [
|
|
120
|
+
{
|
|
121
|
+
id: params.resourceId,
|
|
122
|
+
deploymentId: params.deploymentId,
|
|
123
|
+
title: 'Mock SDLC Data Product',
|
|
124
|
+
description: 'SDLC deployment for contract-errors tests',
|
|
125
|
+
origin: {
|
|
126
|
+
type: 'SdlcDeployment',
|
|
127
|
+
group: TEST_GAV.groupId,
|
|
128
|
+
artifact: TEST_GAV.artifactId,
|
|
129
|
+
version: TEST_GAV.versionId,
|
|
130
|
+
},
|
|
131
|
+
lakehouseEnvironment: {
|
|
132
|
+
producerEnvironmentName: 'test-env',
|
|
133
|
+
type: params.envType,
|
|
134
|
+
},
|
|
135
|
+
dataProduct: {
|
|
136
|
+
name: TEST_DP_NAME,
|
|
137
|
+
accessPoints: [],
|
|
138
|
+
accessPointGroupStereotypeMappings: [],
|
|
139
|
+
owner: {
|
|
140
|
+
appDirId: 12345,
|
|
141
|
+
level: 'DEPLOYMENT',
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
fullPath: TEST_FULL_PATH,
|
|
145
|
+
},
|
|
146
|
+
],
|
|
147
|
+
}) as unknown as V1_EntitlementsDataProductDetailsResponse;
|
|
148
|
+
|
|
149
|
+
export type ArtifactDatasetSpec = {
|
|
150
|
+
ingestPath: string;
|
|
151
|
+
producer:
|
|
152
|
+
| { kind: 'appDir'; appDirId: number }
|
|
153
|
+
| { kind: 'kerberos'; kerberos: string };
|
|
154
|
+
datasetName: string;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
export type ArtifactAccessPointImplSpec = {
|
|
158
|
+
id: string;
|
|
159
|
+
datasets: ArtifactDatasetSpec[];
|
|
160
|
+
dependencyAccessPoints?: {
|
|
161
|
+
dataProductId: string;
|
|
162
|
+
accessPointId: string;
|
|
163
|
+
}[];
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
const buildDatasetJson = (spec: ArtifactDatasetSpec): PlainObject => ({
|
|
167
|
+
ingestDefinition: {
|
|
168
|
+
path: spec.ingestPath,
|
|
169
|
+
producer:
|
|
170
|
+
spec.producer.kind === 'appDir'
|
|
171
|
+
? { _type: 'AppDir', appDirId: spec.producer.appDirId }
|
|
172
|
+
: { _type: 'Kerberos', kerberos: spec.producer.kerberos },
|
|
173
|
+
},
|
|
174
|
+
dataset: spec.datasetName,
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
export const buildModernAccessPointImpl = (
|
|
178
|
+
spec: ArtifactAccessPointImplSpec,
|
|
179
|
+
): PlainObject => ({
|
|
180
|
+
id: spec.id,
|
|
181
|
+
resourceBuilder: {
|
|
182
|
+
_type: 'databaseDDL',
|
|
183
|
+
reproducible: true,
|
|
184
|
+
targetEnvironment: 'prod',
|
|
185
|
+
script: '',
|
|
186
|
+
resourceType: 'TABLE',
|
|
187
|
+
},
|
|
188
|
+
dependencyDatasets: spec.datasets.map(buildDatasetJson),
|
|
189
|
+
dependencyAccessPoints: (spec.dependencyAccessPoints ?? []).map((dep) => ({
|
|
190
|
+
dataProductId: dep.dataProductId,
|
|
191
|
+
accessPointId: dep.accessPointId,
|
|
192
|
+
production: true,
|
|
193
|
+
})),
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
export const buildDataProductArtifactJson = (params: {
|
|
197
|
+
accessPointImpls: PlainObject[];
|
|
198
|
+
}): string =>
|
|
199
|
+
JSON.stringify({
|
|
200
|
+
dataProduct: {
|
|
201
|
+
path: TEST_FULL_PATH,
|
|
202
|
+
deploymentId: String(11111),
|
|
203
|
+
},
|
|
204
|
+
accessPointGroups: [
|
|
205
|
+
{
|
|
206
|
+
id: TEST_APG_ID,
|
|
207
|
+
accessPointImplementations: params.accessPointImpls,
|
|
208
|
+
},
|
|
209
|
+
],
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
export const mockStoreProjectData: PlainObject<StoreProjectData> = {
|
|
213
|
+
projectId: 'test-project-id',
|
|
214
|
+
groupId: TEST_GAV.groupId,
|
|
215
|
+
artifactId: TEST_GAV.artifactId,
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
export const buildGenerationFilesResponse = (params: {
|
|
219
|
+
artifactJson: string;
|
|
220
|
+
}): PlainObject<StoredFileGeneration>[] => [
|
|
221
|
+
{
|
|
222
|
+
groupId: TEST_GAV.groupId,
|
|
223
|
+
artifactId: TEST_GAV.artifactId,
|
|
224
|
+
versionId: TEST_GAV.versionId,
|
|
225
|
+
type: 'dataProduct',
|
|
226
|
+
path: TEST_FULL_PATH,
|
|
227
|
+
file: {
|
|
228
|
+
path: TEST_FULL_PATH,
|
|
229
|
+
content: params.artifactJson,
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
];
|
|
233
|
+
|
|
234
|
+
export const buildMockIngestEnvConfig = (
|
|
235
|
+
classification: V1_IngestEnvironmentClassification = V1_IngestEnvironmentClassification.PROD,
|
|
236
|
+
): PlainObject<IngestDeploymentServerConfig> => ({
|
|
237
|
+
ingestEnvironmentUrn: `test-${classification}-urn`,
|
|
238
|
+
environmentClassification: classification,
|
|
239
|
+
ingestServerUrl: `https://test-${classification}-ingest-server.com`,
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
export const mockProducerEnvironment: PlainObject = {
|
|
243
|
+
producerEnvironmentUrn: 'urn:lakehouse:prod:producer:deployment:11111',
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
export const TEST_SERVER_URNS: string[] = [
|
|
247
|
+
'urn:lakehouse:prod:ingest:definition:alloy-git:com.example~my-data-product~com.example::IngestA',
|
|
248
|
+
'urn:lakehouse:prod:ingest:definition:alloy-git:other.group~other-artifact~com.example::IngestLoose',
|
|
249
|
+
'urn:lakehouse:prod:ingest:definition:rest-api:svc-acct~com.example::IngestK',
|
|
250
|
+
'urn:lakehouse:prod-parallel:ingest:definition:alloy-git:com.example~my-data-product~com.example::IngestA',
|
|
251
|
+
'urn:lakehouse:non-prod:ingest:definition:alloy-git:com.example~my-data-product~com.example::IngestA',
|
|
252
|
+
];
|
|
@@ -268,7 +268,7 @@ export class LegendMarketplaceBaseStore {
|
|
|
268
268
|
return vendorImageMap;
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
-
|
|
271
|
+
async createInitializedGraphManager(): Promise<V1_PureGraphManager> {
|
|
272
272
|
const graphManager = new V1_PureGraphManager(
|
|
273
273
|
this.applicationStore.pluginManager,
|
|
274
274
|
this.applicationStore.logService,
|
|
@@ -59,10 +59,7 @@ import {
|
|
|
59
59
|
V1_SdlcDeploymentDataProductOrigin,
|
|
60
60
|
V1_TerminalModelSchema,
|
|
61
61
|
} from '@finos/legend-graph';
|
|
62
|
-
import {
|
|
63
|
-
buildGraphForDataProduct,
|
|
64
|
-
getDataProductFromDetails,
|
|
65
|
-
} from '../../utils/LakehouseUtils.js';
|
|
62
|
+
import { buildGraphForDataProduct } from '../../utils/LakehouseUtils.js';
|
|
66
63
|
import {
|
|
67
64
|
type Entity,
|
|
68
65
|
type StoredFileGeneration,
|
|
@@ -95,6 +92,7 @@ import {
|
|
|
95
92
|
TerminalProductLayoutState,
|
|
96
93
|
TerminalProductViewerState,
|
|
97
94
|
DATAPRODUCT_TYPE,
|
|
95
|
+
getDataProductFromDetails,
|
|
98
96
|
} from '@finos/legend-extension-dsl-data-product';
|
|
99
97
|
import { LegendMarketplaceTelemetryHelper } from '../../__lib__/LegendMarketplaceTelemetryHelper.js';
|
|
100
98
|
|
|
@@ -281,7 +279,7 @@ export class LegendMarketplaceProductViewerStore {
|
|
|
281
279
|
yield getDataProductFromDetails(
|
|
282
280
|
entitlementsDataProductDetails,
|
|
283
281
|
graphManager,
|
|
284
|
-
this.marketplaceBaseStore,
|
|
282
|
+
this.marketplaceBaseStore.depotServerClient,
|
|
285
283
|
),
|
|
286
284
|
V1_DataProduct,
|
|
287
285
|
`Unable to get V1_DataProduct from details for id: ${entitlementsDataProductDetails.id}`,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
type PlainObject,
|
|
46
46
|
} from '@finos/legend-shared';
|
|
47
47
|
import { LEGEND_MARKETPLACE_APP_EVENT } from '../../../__lib__/LegendMarketplaceAppEvent.js';
|
|
48
|
-
import { getDataProductFromDetails } from '
|
|
48
|
+
import { getDataProductFromDetails } from '@finos/legend-extension-dsl-data-product';
|
|
49
49
|
import type { IngestDeploymentServerConfig } from '@finos/legend-server-lakehouse';
|
|
50
50
|
|
|
51
51
|
export const MAX_PRODUCT_IMAGE_COUNT = 15;
|
|
@@ -281,7 +281,7 @@ export class ProductCardState {
|
|
|
281
281
|
const v1_dataProduct = await getDataProductFromDetails(
|
|
282
282
|
entitlementsDataProductDetails,
|
|
283
283
|
this.graphManager,
|
|
284
|
-
this.marketplaceBaseStore,
|
|
284
|
+
this.marketplaceBaseStore.depotServerClient,
|
|
285
285
|
);
|
|
286
286
|
|
|
287
287
|
return v1_dataProduct;
|
|
@@ -305,7 +305,7 @@ export class ProductCardState {
|
|
|
305
305
|
const v1_dataProduct = await getDataProductFromDetails(
|
|
306
306
|
entitlementsDataProductDetails,
|
|
307
307
|
this.graphManager,
|
|
308
|
-
this.marketplaceBaseStore,
|
|
308
|
+
this.marketplaceBaseStore.depotServerClient,
|
|
309
309
|
);
|
|
310
310
|
|
|
311
311
|
return v1_dataProduct;
|