-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[ui] Skip dimension matching check when dynamic partition added #19106
[ui] Skip dimension matching check when dynamic partition added #19106
Conversation
Current dependencies on/for this PR: This stack of pull requests is managed by Graphite. |
7ef410f
to
464c840
Compare
Deploy preview for dagit-core-storybook ready! ✅ Preview Built with commit c1d0139. |
edfc598
to
8d4047e
Compare
Deploy preview for dagit-storybook ready! ✅ Preview Built with commit 655676b. |
8d4047e
to
852f133
Compare
@@ -49,6 +49,9 @@ export class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoun | |||
} | |||
|
|||
componentDidCatch(error: Error, info: any) { | |||
if (typeof jest !== '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.
This ensures that in test cases an error is thrown instead of caught
1f6bf8a
to
c448faf
Compare
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.
🥂 This is great!
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.
Looks good to me! Hooray for new tests :-)
expect(assetASecondQueryMockResult).toHaveBeenCalled(); | ||
}); | ||
|
||
expect(errorMock).not.toHaveBeenCalled(); |
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.
We can remove this expectation since we didn't use it, we relied on the error being thrown to fail the test as opposed to relying on an assertion failing to fail to the test
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.
got it, sounds good
655676b
to
8868cb6
Compare
8868cb6
to
c1d0139
Compare
Fixes #17380.
Users were seeing the
Attempting to show unified asset health for assets with dimension of different lengths
error because theusePartitionHealthData
query makes a separate request for partitions per asset, updating the state after each asset's request. When 2 assets are selected, the first request returns a response including the new partition, causing the error because the second asset's request has not returned yet.Because the
LaunchAssetChoosePartitionsDialog
component already has an existing check to assert that each root partitions def in the asset selection is the same, we can skip the internal check. This PR adds a flag to bypass the "dimensions of different lengths" check.Adds a test to preserve this behavior.