Skip to content

Set endpoint URLs to null, instead of deleting them #878

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

Merged
merged 9 commits into from
Jan 30, 2024

Conversation

matt-aitken
Copy link
Member

Hard deleting endpoints has quite a few bad side effects:

  • It deletes all associated runs
  • It deletes all associated webhooks
  • It deletes other assets that are associated

This PR changes the behaviour so "deleting" an endpoint actually just sets the URL to null. Most of the changes were to guard against a null URL and not continue.

Copy link

changeset-bot bot commented Jan 30, 2024

⚠️ No Changeset found

Latest commit: 15ffcfe

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@@ -347,6 +350,7 @@ function RerunPopover({
<PopoverContent className="flex min-w-[20rem] max-w-[20rem] flex-col gap-2 p-0" align="end">
<Form method="post" action={`/resources/runs/${runId}/rerun`} {...form.props}>
<input {...conform.input(successRedirect, { type: "hidden" })} defaultValue={runsPath} />
<input {...conform.input(failureRedirect, { type: "hidden" })} defaultValue={runPath} />
Copy link
Member Author

Choose a reason for hiding this comment

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

If we fail, we redirect back to this page and show an error toast message

@matt-aitken matt-aitken merged commit 4b3b418 into main Jan 30, 2024
@matt-aitken matt-aitken deleted the soft-deleting-endpoints branch January 30, 2024 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants