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

Feat: add deploy button to trigger a webhook #26

Closed
taciturnaxolotl opened this issue Jul 31, 2023 · 6 comments
Closed

Feat: add deploy button to trigger a webhook #26

taciturnaxolotl opened this issue Jul 31, 2023 · 6 comments
Labels
enhancement New feature or request
Milestone

Comments

@taciturnaxolotl
Copy link

I personally use Netlify to host my sites, but if I do some shuffling of my pages, then 3-4 or more builds can all be triggered. An optional addition to the webhooks could be to have a period that it waits for any more changes before triggering.

@areknawo
Copy link
Collaborator

Yeah, that can be a problem in certain cases. I have a few ideas on how to fix it, with different pros and cons.

I was thinking of a system where Webhooks run in 30s or 1 min after the actual event, with the user getting a Notification in the dashboard with options to "Run now" or "Cancel". That said, with Webhooks being triggered on the backend (also in response to changes made through API), it's a bit tricky to implement.

Other solution would be some sort of batching, where the wait period is longer, but all changes made in certain time window come as one. That said, in case you want the Webhooks to run immediately (or relatively fast), batching will stand in the way.

It's possible to add a different button/trigger that could be connected to a different Webhook and run manually, e.g. on click. The drawbacks are - you lose a degree of automation, and have to use this trigger instead of just working with the content.

@taciturnaxolotl
Copy link
Author

I was thinking of a combination of the batching and the delay methods. An event would trigger the countdown of 1-1/2 m and the counter would reset if an event happened during that time period. You could also display this as a bar across the top of the screen that will go down with the timer, as well as buttons for cancel and run now.

As for the button to deploy, it could be an optional feature.

@areknawo
Copy link
Collaborator

Will think on this and likely implement some kind of combination of all mentioned solutions. That said, it's not on the immediate roadmap for now.

@taciturnaxolotl
Copy link
Author

Awesome! Thanks.

@areknawo areknawo added the enhancement New feature or request label Aug 11, 2023
@areknawo areknawo added this to the v0.5 milestone Nov 14, 2023
@areknawo
Copy link
Collaborator

areknawo commented Feb 6, 2024

I thought deeply about implementing it in v0.4. Ultimately I decided not to, due to the following reasons:

  • In general, batching adds complexity that's unnecessary for something like Webhooks.
  • Batch can contain already outdated webhook data, which would have to be handled either by Vrite or the client;
  • Delay/debounce has similar disadvantages to batching (just without sending the batched data);
  • Any kind of UI to cancel/run webhooks will be distracting (especially in collaborative space, where it'd run continuously);

Your issue should instead be handled by a system like Changesets (#57) - a WIP concept for applying multiple changes to a workspace at once;

@areknawo areknawo closed this as completed Feb 6, 2024
@taciturnaxolotl
Copy link
Author

That seems like a perfect solution! That basically accomplishes what I wanted with the webhooks button.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants