-
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
Studio persistence v2 spec #2404
Conversation
🦋 Changeset detectedLatest commit: 64acce1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 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 |
Added persistence unitemporal/bitmporal spec tests
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.
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 |
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.
Please add a changeset. Check this for details: https://github.com/finos/legend-studio/blob/master/CONTRIBUTING.md#changeset
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.
Added.
|
||
export class V1_Persistence extends V1_PackageableElement implements Hashable { | ||
documentation!: string; | ||
trigger!: V1_Trigger; | ||
service!: string; | ||
persister!: V1_Persister; | ||
persister: V1_Persister | undefined; |
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.
Please modify this to:
persister?: V1_Persister | undefined;
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.
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; |
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.
Please modify this to:
serviceOutputTargets?: V1_ServiceOutputTarget[] | undefined;
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.
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 ?? []), |
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.
Please modify this to:
this.serviceOutputTargets ? hashArray(this.serviceOutputTargets) : '',
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.
As discussed keeping it as empty array []
.
(val) => V1_serializeServiceOutput(val, plugins), | ||
(val) => V1_deserializeServiceOutput(val, plugins), | ||
), | ||
persistenceTarget: custom( |
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.
Can you rearrange them in alphabetical order
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.
Done.
@@ -35,7 +36,8 @@ export class Persistence | |||
documentation!: string; | |||
trigger!: Trigger; | |||
service!: PackageableElementReference<Service>; | |||
persister!: Persister; | |||
persister: Persister | undefined; |
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.
Please modify this to
persister?: Persister | undefined;
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.
Updated.
@@ -45,7 +47,8 @@ export class Persistence | |||
this.documentation, | |||
this.trigger, | |||
this.service.valueForSerialization ?? '', | |||
this.persister, | |||
hashArray(this.serviceOutputTargets ?? []), |
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.
Please make the similar modification as mentioned in protocol model
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.
As discussed keeping it as empty array [].
Codecov Report
@@ 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
|
.changeset/lemon-zebras-talk.md
Outdated
@@ -0,0 +1,4 @@ | |||
--- | |||
--- |
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.
You don't need this. Can you remove this?
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.
Removed.
]; | ||
} | ||
tests: | ||
[ |
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.
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 :)
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.
Sure. I've added!
/easycla |
Summary
How did you test this change?
legend-studio-test.mp4