Skip to content
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

Studio persistence v2 spec #2404

Merged
merged 12 commits into from
Jul 13, 2023
Merged

Conversation

ankitamritraj
Copy link
Contributor

@ankitamritraj ankitamritraj commented Jul 5, 2023

Summary

How did you test this change?

  • Test(s) added
  • Manual testing (please provide screenshots/recordings)
  • No testing (please provide an explanation)
legend-studio-test.mp4

@ankitamritraj ankitamritraj requested a review from a team as a code owner July 5, 2023 15:35
@changeset-bot
Copy link

changeset-bot bot commented Jul 5, 2023

🦋 Changeset detected

Latest commit: 64acce1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@finos/legend-extension-dsl-persistence Patch
@finos/legend-application-query-bootstrap Patch
@finos/legend-application-studio-bootstrap Patch
@finos/legend-manual-tests Patch
@finos/legend-application-query-deployment Patch
@finos/legend-application-studio-deployment Patch
@finos/legend-application-pure-ide-deployment Patch

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

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jul 5, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

Added persistence unitemporal/bitmporal spec tests
Copy link
Contributor

@gayathrir11 gayathrir11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add some unit tests here: packages\legend-extension-dsl-persistence\src\graph-manager_tests_\DSL_Persistence_Roundtrip.test.ts

@@ -0,0 +1,51 @@
/**
* Copyright (c) 2020-present, Goldman Sachs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.


export class V1_Persistence extends V1_PackageableElement implements Hashable {
documentation!: string;
trigger!: V1_Trigger;
service!: string;
persister!: V1_Persister;
persister: V1_Persister | undefined;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please modify this to:
persister?: V1_Persister | undefined;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.


export class V1_Persistence extends V1_PackageableElement implements Hashable {
documentation!: string;
trigger!: V1_Trigger;
service!: string;
persister!: V1_Persister;
persister: V1_Persister | undefined;
serviceOutputTargets: V1_ServiceOutputTarget[] | undefined;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please modify this to:
serviceOutputTargets?: V1_ServiceOutputTarget[] | undefined;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

@@ -39,7 +41,8 @@ export class V1_Persistence extends V1_PackageableElement implements Hashable {
this.documentation,
this.trigger,
this.service,
this.persister,
hashArray(this.serviceOutputTargets ?? []),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please modify this to:
this.serviceOutputTargets ? hashArray(this.serviceOutputTargets) : '',

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed keeping it as empty array [].

(val) => V1_serializeServiceOutput(val, plugins),
(val) => V1_deserializeServiceOutput(val, plugins),
),
persistenceTarget: custom(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you rearrange them in alphabetical order

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -35,7 +36,8 @@ export class Persistence
documentation!: string;
trigger!: Trigger;
service!: PackageableElementReference<Service>;
persister!: Persister;
persister: Persister | undefined;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please modify this to
persister?: Persister | undefined;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

@@ -45,7 +47,8 @@ export class Persistence
this.documentation,
this.trigger,
this.service.valueForSerialization ?? '',
this.persister,
hashArray(this.serviceOutputTargets ?? []),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make the similar modification as mentioned in protocol model

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed keeping it as empty array [].

@codecov
Copy link

codecov bot commented Jul 10, 2023

Codecov Report

Merging #2404 (8441fa0) into master (27bef82) will decrease coverage by 0.14%.
The diff coverage is 29.68%.

❗ Current head 8441fa0 differs from pull request most recent head 64acce1. Consider uploading reports for the commit 64acce1 to get more accurate results

@@            Coverage Diff             @@
##           master    #2404      +/-   ##
==========================================
- Coverage   40.91%   40.78%   -0.14%     
==========================================
  Files        1561     1591      +30     
  Lines       73857    74731     +874     
  Branches    17375    17524     +149     
==========================================
+ Hits        30222    30480     +258     
- Misses      43511    44127     +616     
  Partials      124      124              
Impacted Files Coverage Δ
...stence/V1_DSL_Persistence_ActionIndicatorFields.ts 0.00% <0.00%> (ø)
...s/persistence/V1_DSL_Persistence_AppendStrategy.ts 0.00% <0.00%> (ø)
...ments/persistence/V1_DSL_Persistence_AuditingV2.ts 0.00% <0.00%> (ø)
...ents/persistence/V1_DSL_Persistence_DatasetType.ts 0.00% <0.00%> (ø)
...ts/persistence/V1_DSL_Persistence_Deduplication.ts 0.00% <0.00%> (ø)
...istence/V1_DSL_Persistence_EmptyDatasetHandling.ts 0.00% <0.00%> (ø)
...nts/persistence/V1_DSL_Persistence_Partitioning.ts 0.00% <0.00%> (ø)
...persistence/V1_DSL_Persistence_PersistentTarget.ts 0.00% <0.00%> (ø)
...sistence/V1_DSL_Persistence_ProcessingDimension.ts 0.00% <0.00%> (ø)
...ts/persistence/V1_DSL_Persistence_ServiceOutput.ts 0.00% <0.00%> (ø)
... and 25 more

@@ -0,0 +1,4 @@
---
---
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need this. Can you remove this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

];
}
tests:
[
Copy link
Member

@MauricioUyaguari MauricioUyaguari Jul 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we have one of the tests have test grammar ? In the video we have a nice grammar with tests as well, can't we use that :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. I've added!

@ankitamritraj
Copy link
Contributor Author

/easycla

@akphi akphi merged commit 757f5ae into finos:master Jul 13, 2023
7 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants