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

WFT message validaiton does not consider update instance ID #434

Open
dhiaayachi opened this issue Sep 5, 2024 · 3 comments
Open

WFT message validaiton does not consider update instance ID #434

dhiaayachi opened this issue Sep 5, 2024 · 3 comments

Comments

@dhiaayachi
Copy link
Owner

Expected Behavior

Given a message set of

  • Acceptance [UpdateID = X]
  • Response [UpdateID = X]
  • Acceptance [UpdateID = Y]

This message sequence should pass validation

Actual Behavior

The validation code will incorrectly give an error indicating that it has seen a Response message before an Acceptance message. While this is true, the Response was for a different update than the Acceptance that is the third message

Steps to Reproduce the Problem

Issue multiple update requests while worker is stopped, they will be coalesced into a single WFT and so their respective Acceptance and Response messages will end up on the same WFTCompleted Response

Specifications

  • Version: v1.20
  • Platform: all
@dhiaayachi
Copy link
Owner Author

Thank you for reporting this issue.

It appears the issue stems from the coalescing of multiple update requests into a single WFTCompleted Response when the worker is stopped. This leads to the validation code incorrectly detecting a Response message before an Acceptance message for a different update.

To work around this issue, you could consider:

  • Restarting the worker: This would prevent the coalescing of update requests and avoid the validation error.
  • Using a different workflow execution strategy: You could explore alternative strategies like "Signal with Start" which might be less susceptible to this issue.

For more information on workflow execution strategies, please refer to the Temporal documentation on Workflow Execution Strategies.

If the issue persists, please provide additional information like your workflow code and configuration to help us understand the problem better.

@dhiaayachi
Copy link
Owner Author

Thank you for reporting this issue.

This issue is likely caused by the way Temporal handles multiple update requests while the worker is stopped. To workaround this issue, you can ensure that the worker is running before sending multiple update requests.

Let me know if this helps or if you have further questions.

@dhiaayachi
Copy link
Owner Author

Thank you for reporting this issue. It seems like the Temporal workflow validation is incorrectly identifying a Response message before an Acceptance message when they belong to different updates in a coalesced workflow task.

Could you please provide more information about the specific code snippet you're using for validation? Are you using the Temporal client library or implementing your own custom validation logic? Understanding the code used will help us pinpoint the root cause of the issue and suggest appropriate solutions.

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

No branches or pull requests

1 participant