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

[Fix #1071] Until option if any is empty #1072

Merged
merged 3 commits into from
Jan 22, 2025

Conversation

fjtirado
Copy link
Collaborator

@fjtirado fjtirado commented Jan 22, 2025

Fix #1071

Please specify parts of this PR update:

  • Specification
  • Schema
  • Examples
  • Extensions
  • Use Cases
  • Community
  • CTK
  • Other

Discussion or Issue link:

What this PR does:

Additional information:

Copy link
Member

@cdavernas cdavernas left a comment

Choose a reason for hiding this comment

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

Can I ask you to update this sample by removing the now useless until: '${ false }' condition?

@fjtirado
Copy link
Collaborator Author

fjtirado commented Jan 22, 2025

@cdavernas If no until, I guess the assumption (according to ther examples where any is not empty and there is no unitil) is to move forward when any event is received (in other words, no until is equivalent to until: ${true}, so the until you are requesting to remove is actually needed so is forever listening (aligned with the example file name)

@cdavernas
Copy link
Member

@fjtirado Not as far as I understand it. If you define an empty any and do not define until, the task will listen for events forever.
Unless, of course, you'd want to say that defining an empty any will listen to the first consumed event, whatever it is, and then keep on. If so, which is a feature that I'm obviously not opposed against, I think that we need to add a new info block to the listen task, explaining the result of the different strategies. Also, adding a new example listening to one single 'any' event would then be required.

@fjtirado
Copy link
Collaborator Author

@cdavernas I prefer this because is aligned with the behaviour of other examples where there is at least one filter in the any array and there is no until. In those examples, once the expected event arrive, it moves forwards to next task. I think it should be the same when it is listening to all events.
Therefore, I will add the example and the explanation.

@fjtirado fjtirado requested a review from cdavernas January 22, 2025 11:59
Signed-off-by: Francisco Javier Tirado Sarti <[email protected]>
dsl-reference.md Outdated Show resolved Hide resolved
Co-authored-by: Charles d'Avernas <[email protected]>
Signed-off-by: Francisco Javier Tirado Sarti <[email protected]>
Copy link
Member

@cdavernas cdavernas left a comment

Choose a reason for hiding this comment

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

LGTM! Cheers man! ❤️

Copy link
Member

@ricardozanini ricardozanini left a comment

Choose a reason for hiding this comment

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

Much easier to implement now! I'll remove the workarounds from the Go SDK hehehe

@ricardozanini ricardozanini merged commit 3e7ba14 into serverlessworkflow:main Jan 22, 2025
3 checks passed
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.

Any should allow empty list of filters without having to specify until clause
3 participants