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

[UI] Groups executions by run if it exists #3485

Merged
merged 2 commits into from
Apr 14, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions frontend/src/lib/MlmdUtils.ts
Original file line number Diff line number Diff line change
@@ -78,11 +78,11 @@ export enum KfpExecutionProperties {
}

export const ExecutionHelpers = {
getPipeline(execution: Execution): string | number | undefined {
getWorkspace(execution: Execution): string | number | undefined {
return (
getResourceProperty(execution, ExecutionProperties.PIPELINE_NAME) ||
getResourceProperty(execution, ExecutionCustomProperties.RUN_ID) ||
Copy link
Contributor

Choose a reason for hiding this comment

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

I see that , true got removed. Was that intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, without the true, it reads from property instead of custom property.
(I should move this to ExecutionProperties later, because it's in kubeflow/frontend repo)

Copy link
Contributor

@Ark-kun Ark-kun Apr 14, 2020

Choose a reason for hiding this comment

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

Yes, without the true, it reads from property instead of custom property.

I think that was the intended behavior. 6cf8c47

Would you mind using

getResourceProperty(execution, ExecutionCustomProperties.RUN_ID, true) ||
getResourceProperty(execution, ExecutionCustomProperties.RUN_ID) ||

here?
It's a custom_property that's written by MetadataWriter.

P.S. I think we should just change getResourceProperty to always read from both properties and custom_properties.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree, I will update this PR

getResourceProperty(execution, ExecutionCustomProperties.WORKSPACE, true) ||
getResourceProperty(execution, ExecutionCustomProperties.RUN_ID, true) ||
getResourceProperty(execution, ExecutionProperties.PIPELINE_NAME) ||
undefined
);
},
2 changes: 1 addition & 1 deletion frontend/src/pages/ArtifactList.tsx
Original file line number Diff line number Diff line change
@@ -57,7 +57,7 @@ interface ArtifactListState {
}

const ARTIFACT_PROPERTY_REPOS = [ArtifactProperties, ArtifactCustomProperties];
const PIPELINE_WORKSPACE_FIELDS = ['PIPELINE_NAME', 'WORKSPACE', 'RUN_ID'];
const PIPELINE_WORKSPACE_FIELDS = ['RUN_ID', 'PIPELINE_NAME', 'WORKSPACE'];
const NAME_FIELDS = ['NAME'];

class ArtifactList extends Page<{}, ArtifactListState> {
6 changes: 3 additions & 3 deletions frontend/src/pages/ExecutionList.tsx
Original file line number Diff line number Diff line change
@@ -64,8 +64,8 @@ class ExecutionList extends Page<{}, ExecutionListState> {
{
customRenderer: this.nameCustomRenderer,
flex: 2,
label: 'Pipeline/Workspace',
sortKey: 'pipelineName',
label: 'Run ID/Workspace/Pipeline',
sortKey: 'workspace',
},
{
customRenderer: this.nameCustomRenderer,
@@ -214,7 +214,7 @@ class ExecutionList extends Page<{}, ExecutionListState> {
return {
id: `${type}:${execution.getId()}`, // Join with colon so we can build the link
otherFields: [
ExecutionHelpers.getPipeline(execution),
ExecutionHelpers.getWorkspace(execution),
ExecutionHelpers.getName(execution),
ExecutionHelpers.getState(execution),
execution.getId(),