Skip to content

Commit

Permalink
Data Product rename (#3808)
Browse files Browse the repository at this point in the history
  • Loading branch information
kelly-thai authored Jan 14, 2025
1 parent e6d29c3 commit eec360c
Show file tree
Hide file tree
Showing 18 changed files with 41 additions and 29 deletions.
10 changes: 10 additions & 0 deletions .changeset/purple-cars-occur.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@finos/legend-extension-dsl-data-space-studio': patch
'@finos/legend-extension-dsl-data-quality': patch
'@finos/legend-extension-dsl-data-space': patch
'@finos/legend-application-query': patch
'@finos/legend-query-builder': patch
'@finos/legend-graph': patch
---

Updating dataspaces to dataproducts where necessary
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const createVisitedDataSpaceId = (
artifactId: string,
dataSpace: string,
): string =>
// we will consider unique dataSpace if it belongs to the same project. i.e we will not save 2 dataspaces visited for 2 different versionss
// we will consider unique data product if it belongs to the same project. i.e we will not save 2 dataspaces visited for 2 different versionss
generateGAVCoordinates(groupId, artifactId, undefined) +
GAV_DELIMITER +
dataSpace;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ export class Core_LegendQueryApplicationPlugin extends LegendQueryApplicationPlu
runtime.runtimeValue = new V1_EngineRuntime();
return graphManager.elementProtocolToEntity(runtime);
});
// The DataSpace entity is excluded from AnalyticsResult.Json to reduce the JSON size
// The Data Product entity is excluded from AnalyticsResult.Json to reduce the JSON size
// because all its information can be found in V1_DataSpaceAnalysisResult.
// Therefore, we are building a simple v1_DataSpace entity based on V1_DataSpaceAnalysisResult.
const dataspaceProtocol = new V1_DataSpace();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,9 @@ const QueryEditorExistingQueryInfoModal = observer(
{executionContext instanceof QueryDataSpaceExecutionContext && (
<>
<div className="query-preview__field">
<div className="query-preview__field__label">DataSpace</div>
<div className="query-preview__field__label">
Data Product
</div>
<div className="query-preview__field__value">
{executionContext.dataSpacePath}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import { fireEvent, getByText, waitFor } from '@testing-library/dom';
import { DSL_DataSpace_LegendApplicationPlugin } from '@finos/legend-extension-dsl-data-space/application';

test(
integrationTest('Load Existing DataSpace Query in Query Editor'),
integrationTest('Load Existing Data Product Query in Query Editor'),
async () => {
const mockedQueryEditorStore = TEST__provideMockedQueryEditorStore({
extraPlugins: [new DSL_DataSpace_LegendApplicationPlugin()],
Expand Down Expand Up @@ -91,7 +91,7 @@ test(
await waitFor(() => getByText(aboutDataSpaceModal, 'CovidDataMapping'));
await waitFor(() => getByText(aboutDataSpaceModal, 'H2Runtime'));

// TODO: below is for testing dataspace quick start module
// TODO: below is for testing data product quick start module
// const openDataSpaceButton = await waitFor(() =>
// renderResult.getByTitle('Open advanced search for data product...'),
// );
Expand All @@ -109,7 +109,7 @@ test(

test(
integrationTest(
'Load Existing DataSpace Query with minimal graph in Query Editor',
'Load Existing Data Product Query with minimal graph in Query Editor',
),
async () => {
const mockedQueryEditorStore = TEST__provideMockedQueryEditorStore({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ export abstract class QueryEditorStore {
supportBuildMinimalGraph
) {
try {
this.initState.setMessage('Fetching dataspace analysis result...');
this.initState.setMessage('Fetching data product analysis result...');
const project = StoreProjectData.serialization.fromJson(
await this.depotServerClient.getProject(groupId, artifactId),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export class DataSpaceTemplateQueryCreatorStore extends QueryEditorStore {
}
if (!query) {
throw new IllegalStateError(
`Can't fetch query from dataspace executable`,
`Can't fetch query from data product executable`,
);
}
if (!executionContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export const NewDataQualityValidationElementEditor = observer(() => {
CLASS_ELEMENT_CREATION_BASIS.DATASPACE_BASED ? (
<div>
<div className="panel__content__form__section__header__label">
DataSpace
Data Product
</div>
<div className="data-quality-explorer__new-element-modal__driver">
<CustomSelectorInput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

export const SIMPLE_DATA_SPACE_SNIPPET = `DataSpace \${1:model::NewDataSpace}
export const SIMPLE_DATA_SPACE_SNIPPET = `Data Product \${1:model::NewDataSpace}
{
executionContexts:
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ const TemplateQueryPromotionReviewerContent = observer(() => {
/>
</div>
<div className="template-query-promotor__title__prompt">
We will promote this query as a curated template query in
dataspace. This automated process will generate a code review
and workspace. Please get the generated code review reviewed and
We will promote this query as a curated template query in data
product. This automated process will generate a code review and
workspace. Please get the generated code review reviewed and
approved.
</div>
<div className="template-query-promotor__group template-query-promotor__group--workspace">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ export class DataSpaceTemplateQueryPromotionReviewerStore {
entity.path === dataSpacePath &&
entity.classifierPath === DATA_SPACE_ELEMENT_CLASSIFIER_PATH,
)[0],
`Can't find dataSpace entity with path ${this.dataSpaceEntity}`,
`Can't find data product entity with path ${this.dataSpaceEntity}`,
);
this.initState.pass();
}
Expand Down Expand Up @@ -445,7 +445,7 @@ export class DataSpaceTemplateQueryPromotionReviewerStore {
),
);

// ii. update dataspace
// ii. update data product
this.applicationStore.alertService.setBlockingAlert({
message: `Generating code commit...`,
prompt: 'Please do not close the application',
Expand All @@ -456,7 +456,7 @@ export class DataSpaceTemplateQueryPromotionReviewerStore {
workspace,
{
message:
'promote-as-template-query: promote query as a template query to dataspace',
'promote-as-template-query: promote query as a template query to data product',
entityChanges: [
{
classifierPath: updatedDataSpaceEntity.classifierPath,
Expand Down Expand Up @@ -492,7 +492,7 @@ export class DataSpaceTemplateQueryPromotionReviewerStore {
!workspaceReviewState.canCreateReview ||
workspaceReviewState.sdlcState.isActiveProjectSandbox;
workspaceReviewState.reviewTitle =
'code review - promote query as a template query to dataspace';
'code review - promote query as a template query to data product';
if (!isCreateReviewDisabled) {
await flowResult(
workspaceReviewState.createWorkspaceReview(
Expand All @@ -509,9 +509,9 @@ export class DataSpaceTemplateQueryPromotionReviewerStore {
this.applicationStore.alertService.setBlockingAlert(undefined);
this.promoteState.pass();
this.applicationStore.alertService.setActionAlertInfo({
message: `Successfully promoted query into dataspace '${this.dataSpacePath}'. Now your template query can be found in workspace '${this.workspaceName}' of project '${project.name}' (${project.projectId})`,
message: `Successfully promoted query into data product '${this.dataSpacePath}'. Now your template query can be found in workspace '${this.workspaceName}' of project '${project.name}' (${project.projectId})`,
prompt: compilationFailed
? `The workspace might not compile at the moment, please make sure to fix the issue and submit a review to make the dataspace part of the project to complete template query promotion`
? `The workspace might not compile at the moment, please make sure to fix the issue and submit a review to make the data product part of the project to complete template query promotion`
: `Please make sure to get the generated code-review reviewed and approved`,
type: ActionAlertType.STANDARD,
actions: compilationFailed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ test(
graphManagerState.graph.allElements.findLast(
(e) => e instanceof DataSpace && e.path === 'domain::COVIDDatapace',
),
'fail to find a dataspace',
'fail to find a data product',
),
DataSpace,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export class V1_DSL_DataSpace_PureGraphManagerExtension extends DSL_DataSpace_Pu
ec.mapping.path === currentQuery.mapping &&
ec.defaultRuntime.path === currentQuery.runtime,
)[0]?.name,
'can`t find a corresponding executatin key based on query`s mapping and runtime in dataspace',
'can`t find a corresponding executatin key based on query`s mapping and runtime in data product',
);
}

Expand Down Expand Up @@ -335,7 +335,7 @@ export class V1_DSL_DataSpace_PureGraphManagerExtension extends DSL_DataSpace_Pu
analysisResult = result;
} else {
throw new GraphBuilderError(
'Fail to get a valid dataspace analytics json from metadata, start building full graph',
'Fail to get a valid data product analytics json from metadata, start building full graph',
);
}
const plugins =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export interface DataSpaceInfo {
path: string;
/**
* NOTE: technically, this should be always available, but we must not
* assume that no dataspace is marlformed, so we leave it as optional
* assume that no data product is marlformed, so we leave it as optional
*/
defaultExecutionContext: string | undefined;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ export const observe_SubstituteStore = skipObserved(

export const observe_MappingInclude = skipObserved(
(metamodel: MappingInclude): MappingInclude => {
// TODO: handle for mapping include dataspace
// TODO: handle for mapping include data product
if (metamodel instanceof MappingIncludeMapping) {
makeObservable(metamodel, {
included: observable,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ type ModelCoverageTestCase = [

const MODEL_COVERAGE_CASES: ModelCoverageTestCase[] = [
[
'simple relational model with dataspace',
'simple relational model with data product',
{
dataspacePath:
'showcase::northwind::dataspace::NorthwindDataSpaceWithExecutables',
Expand All @@ -243,7 +243,7 @@ const MODEL_COVERAGE_CASES: ModelCoverageTestCase[] = [
];

describe(
integrationTest('Build minimal graph from dataspace artifacts'),
integrationTest('Build minimal graph from data product artifacts'),
() => {
test.each(MODEL_COVERAGE_CASES)(
'%s',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ describe('Grammar roundtrip test', () => {

describe('Grammar roundtrip test (without extensions)', () => {
test.each(cases)('%s', async (testName, filePath, isSkipped) => {
// Mapping include dataspace does not play nicely without extensions as the dependent XStore Associations will fail
// Mapping include data product does not play nicely without extensions as the dependent XStore Associations will fail
if (!isSkipped) {
await checkGrammarRoundtrip(testName, filePath, {
debug: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export class V1_QueryBuilder_PureGraphManagerExtension extends QueryBuilder_Pure
if (mapping) {
mapping.includes = element.includedMappings
.map((mappingInclude) => {
// TODO : handle for mapping include dataspace
// TODO : handle for mapping include data product
if (mappingInclude instanceof V1_MappingIncludeMapping) {
return new MappingIncludeMapping(
mapping,
Expand Down Expand Up @@ -202,7 +202,7 @@ export class V1_QueryBuilder_PureGraphManagerExtension extends QueryBuilder_Pure
if (mapping) {
mapping.includes = element.includedMappings
.map((mappingInclude) => {
// TODO : handle for mapping include dataspace
// TODO : handle for mapping include data product
if (mappingInclude instanceof V1_MappingIncludeMapping) {
return new MappingIncludeMapping(
mapping,
Expand Down

0 comments on commit eec360c

Please sign in to comment.