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

Fixes deletion of recurring runs #1185

Merged

Conversation

rileyjbauer
Copy link
Contributor

@rileyjbauer rileyjbauer commented Apr 18, 2019

Also redirects after deleting pipeline from pipeline details page.

Fixes #1181


This change is Reviewable

@@ -80,11 +80,12 @@ export default class Buttons {
}

public delete(getSelectedIds: () => string[], resourceName: 'pipeline' | 'recurring run config',
callback: (selectedIds: string[], success: boolean) => void, useCurrentResource: boolean): ToolbarActionConfig {
callback: (selectedIds: string[], success: boolean) => void, useCurrentResource: boolean,
refreshOnComplete: boolean): ToolbarActionConfig {
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this always desired? If it is, we can just always call it here.
If it isn't, why can't refresh be optionally called by the callsite as part of the callback?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It isn't desirable when you're on a specific resource's page (e.g. Run Details), and you delete that resource. In that case, a request is sent to the server to reload the page for a resource that no longer exists before redirecting to whatever page you actually want to be on.

The second part/suggestion would work. My thinking was just that this would prevent duplicate code in the callbacks

Copy link
Contributor

Choose a reason for hiding this comment

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

Why not use the useCurrentResource flag then? Seems like it has the same information.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No strong opinion here. I thought maybe it would be useful to have an explicit flag so that the implications are clear, but there's no reason AFAICT that we couldn't use the useCurrentResource (or situation where that wouldn't make sense at the moment).

I can change it if you think it's better to not add the extra flag

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's a generally good idea to simplify the interface provided the caller doesn't need to know this flag is used for two different things. It seems internal to the method's implementation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good. It's been removed

'pipeline',
this._deleteCallback.bind(this),
true, /* useCurrentResource */
false, /* refreshOnComplete */
Copy link
Contributor

Choose a reason for hiding this comment

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

If there's a good reason why we don't refresh after delete, it's worth calling it out in a comment here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

@yebrahim yebrahim left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: yebrahim

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

1 similar comment
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: yebrahim

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rileyjbauer rileyjbauer merged commit 72b0914 into kubeflow:master Apr 22, 2019
@rileyjbauer rileyjbauer deleted the fix-deleting-of-recurring-runs branch May 6, 2019 22:14
magdalenakuhn17 pushed a commit to magdalenakuhn17/pipelines that referenced this pull request Oct 22, 2023
* Feature: Add torchserve custom server bert sample

* Fix: updated Readme

 - added deployment yaml example

* Fix: Update service host for inference request

* Fix: Remove port from deployment yaml

 - Fix spelling in readme doc
 - Fix space in readme doc

* Fix: move bert example to a sub folder

* Fix: readme doc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Unable to delete recurring run configs in UI
3 participants