-
Notifications
You must be signed in to change notification settings - Fork 29
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
Highlight experiments with errors #2072
Conversation
f2cdb71
to
2b2076a
Compare
const error = [ | ||
...(metricsData?.errors || []), | ||
...(paramsData?.errors || []) | ||
].join('\n') |
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.
[I] Test this bit and the tooltip showing up in the UI as markdown.
@@ -95,7 +95,7 @@ suite('Experiments Filter By Tree Test Suite', () => { | |||
) | |||
}) | |||
.map(experiment => | |||
experiment.queued | |||
experiment.queued || experiment.error |
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.
[F] This points out that the way we don't filter queued will spill over onto error records. You cannot filter by an undefined value which means that "full error" records will be "unfilterable".
@@ -16,19 +16,20 @@ export interface DepColumns { | |||
} | |||
|
|||
export interface Experiment extends BaseExperimentFields { | |||
deps?: DepColumns |
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.
[F] Sorted and added error?: string
|
||
const data = excludeErrors() | ||
|
||
export default data |
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.
[F] Without this extra fixture there would be a lot of changes to plots tests which are currently unrelated to this change.
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.
And this is why the likes of extension/src/test/suite/plots/index.test.ts
are now pointed at 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.
When I come back to do plots errors I should be able to remove this. As we'll want to highlight the behaviour that we can have experiment errors but still try to plot those experiments.
@@ -0,0 +1,22 @@ | |||
import React from 'react' |
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.
[Q] Better placement for this? Should it be a shared component? We will probably use something very similar for plots.
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 move it in the shared folder when it's used in both webviews.
@@ -16,7 +16,7 @@ import { ExperimentsData } from './data' | |||
import { askToDisableAutoApplyFilters } from './toast' | |||
import { Experiment, ColumnType, TableData } from './webview/contract' | |||
import { WebviewMessages } from './webview/messages' | |||
import { DecorationProvider } from './model/filterBy/decorationProvider' | |||
import { DecorationProvider } from './model/decorationProvider' |
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.
[F] Move to a more central location as the decorations are now for both errors and filtered experiments
@@ -38,19 +43,27 @@ export class DecorationProvider | |||
} | |||
|
|||
public provideFileDecoration(uri: Uri): FileDecoration | undefined { | |||
if (this.errors.has(uri.fsPath)) { | |||
return DecorationProvider.DecorationError |
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.
[F] Take priority but under the current implementation, we can't have both.
[errorShas[0]]: { | ||
error: { | ||
type: 'YAMLFileCorruptedError', | ||
msg: "unable to read: 'params.yaml', YAML file structure is corrupted" |
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.
[F] The fixture now contains one "full error" and one "partial error".
@mattseddon this is only for now? Right? Will we have the styles for the table as we planned? |
I have implemented everything as per my latest comments in the spec. The main point here is to highlight to users that there is an error and give them information about the error. We can adjust later when we get plot errors or user feedback. |
@@ -0,0 +1,22 @@ | |||
import React from 'react' |
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 move it in the shared folder when it's used in both webviews.
@@ -0,0 +1,21 @@ | |||
import * as React from 'react' |
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 decided to remove theAllIcons
enum that gave us the ability to view all available icons since it was duplicating the index file in the icons folder. We should either export this inside the index file or simply remove the index file.
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.
I think we have a couple of other direct imports. I'll track them down today and move all imports to come from the index file. Let me know if you'd like to go the other way.
Code Climate has analyzed commit 6008904 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 94.8% (85% is the threshold). This pull request will bring the total coverage in the repository to 96.7% (0.0% change). View more on Code Climate. |
This PR contains the first iteration of #1636.
Users will now be able to see experiment errors in the UI.
Demo
Screen.Recording.2022-07-21.at.1.06.00.pm.mov
Things to note: