-
Notifications
You must be signed in to change notification settings - Fork 3k
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
fix(ui/data-contract): fix freshness & schema assertion is not working #10795
fix(ui/data-contract): fix freshness & schema assertion is not working #10795
Conversation
@@ -227,10 +227,10 @@ export const getAssertionsSummary = (assertions: Assertion[]): AssertionStatusSu | |||
// */ | |||
export const createAssertionGroups = (assertions: Array<Assertion>): AssertionGroup[] => { | |||
// Pre-sort the list of assertions based on which has been most recently executed. | |||
assertions.sort(sortAssertions); | |||
const newAssertions = [...assertions].sort(sortAssertions); |
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.
sometime it throwing error because of the modify an array that has been marked as read-only
assertionInfo={record.datasetAssertionInfo} | ||
/> | ||
) : ( | ||
<AssertionDescriptionContainer>{description}</AssertionDescriptionContainer> |
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.
if there is no description, can we fallback on || 'No description provided'
@@ -110,6 +110,21 @@ export const DataContractBuilder = ({ entityUrn, initialState, onSubmit, onCance | |||
|
|||
const hasAssertions = freshnessAssertions.length || schemaAssertions.length || dataQualityAssertions.length; | |||
|
|||
const onSelectFreshnessOrSchemaAssertion = (assertionUrn: string, type: string) => { | |||
const selected = builderState[type]?.assertionUrn === assertionUrn; |
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.
does this mean user can only select one assertion of each type? Is that the expected behavior - or do we want users to select multiple assertions for each type?
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.
the logic is reused.. it will check for particular assertions to satisfy only one assertion for freshness and Schema.
} | ||
tags { | ||
...globalTagsFields | ||
} | ||
} | ||
|
||
fragment assertionDetailsWithRunEvents on Assertion { |
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.
Don't we already have this defined in OSS? Would this be duplicate?
@@ -61,9 +61,7 @@ export const Assertions = () => { | |||
const assertions = | |||
(combinedData && combinedData.dataset?.assertions?.assertions?.map((assertion) => assertion as Assertion)) || | |||
[]; | |||
const filteredAssertions = assertions.filter( |
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.
- make sure we display non-dataset assertions on the list
) : ( | ||
<AssertionDescriptionContainer> | ||
{description ?? 'No description provided'} | ||
</AssertionDescriptionContainer> |
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.
- fallback for description if this is not a dataset assertion (temporary handling until we port assertions list UI over form saas)
@@ -1,3 +1,173 @@ | |||
fragment assertionInfo on AssertionInfo { |
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.
- fetch data for schema/freshness assertions to display contracts correctly
Screencast.from.27-06-24.09_13_35.PM.IST.webm
Checklist