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

[Discussion] Testing Wait for Webhook Action #4630

Open
abuaboud opened this issue May 4, 2024 · 3 comments
Open

[Discussion] Testing Wait for Webhook Action #4630

abuaboud opened this issue May 4, 2024 · 3 comments
Assignees
Labels
🌟 announcement this feature needs announcement 🌟 feature new major feature help wanted Extra attention is needed 🥄 scooping features that require scooping and designing

Comments

@abuaboud
Copy link
Contributor

abuaboud commented May 4, 2024

Describe the Bug
We need to create an action that wait for webhook, this is useful and can be used in pieces like "Wait for Approval", in order to make this happen we need good testing experience.

Suggested Testing Experience:

Testing URL:
Display Webhook URL in markdown, allowing users to copy and test to generate sample data.

Production URL:
We can't generate one on the piece settings as it should be tied to flow run, so we need to include some information about the run and we can't do that unless we know the run information.

The reason we need the run id to know which flow run to resume.

Thus, we need a way for the user to have access to this URL. One solution is to have another action that outputs a URL similar to generating an approval URL. I believe we can have a more user-friendly UI.

All suggestions are welcome.

@abuaboud abuaboud added 🌟 announcement this feature needs announcement 🌟 feature new major feature labels May 4, 2024
@abuaboud abuaboud changed the title Testing Wait for Webhook Action [Scope] Testing Wait for Webhook Action May 4, 2024
@abuaboud abuaboud added help wanted Extra attention is needed 🥄 scooping features that require scooping and designing labels May 4, 2024
@abuaboud abuaboud changed the title [Scope] Testing Wait for Webhook Action [Discussion] Testing Wait for Webhook Action May 4, 2024
@abuaboud
Copy link
Contributor Author

abuaboud commented May 4, 2024

@rita-gorokhod @HoldYourWaffle

Your input is appreciated

@HoldYourWaffle
Copy link

HoldYourWaffle commented May 5, 2024

If I understand correctly this'd basically be a more primitive variant of the existing "Wait for approval" piece.
One thing I've been missing in this area is a "timeout" branch to facilitate error handling or some form of retry mechanism.

Display Webhook URL in markdown

Would this test URL be flow-scoped and immutable?
Being able to reuse the same URL during testing would make things a lot more convenient 😍

I believe we can have a more user-friendly UI.

It's an interesting UX-design problem for sure...
I tried various arrangements of what such a control structure could look like, this is the best I've come up with so far:

image

This avoids two manually/implicitly coupled pieces, which makes mistakes less likely, is easier to teach, handles multiple approval steps in a flow without issue and is future-proof for a potential parallelization mechanic where multiple branches could be waiting at the same time.

In any case, informing/guiding the user is paramount, for example:

  1. Documentation/tutorial page explaining how this mechanism works.
  2. Warning during flow-building if the URL output of "Wait for" is not used within the "preparation" block.
  3. Ideally this URL should not be accessible outside of the preparation block.

Curious what your thoughts are on this :)

@abuaboud
Copy link
Contributor Author

abuaboud commented May 5, 2024

@HoldYourWaffle

I dont think the url can be flow scoped, it has to be flow run scoped thats why we need two different url.

Now it's also get tricker when multiple approvals or waiting if they share same link that mean the same person on the first url can trigger the flow until the end not only their specific step.

This could be a security issue for approval piece.

So my suggestion goes to have a testing url when the user clicks test, it shows a url and instructions.

And user can use another step to generate url for the production purposes in one of the previous steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌟 announcement this feature needs announcement 🌟 feature new major feature help wanted Extra attention is needed 🥄 scooping features that require scooping and designing
Projects
Development

No branches or pull requests

3 participants