Skip to content

Conversation

@ricardozanini
Copy link
Member

@ricardozanini ricardozanini commented Nov 1, 2025

In this PR:

  • Correcting the sample workflow set-listen-to-any.yaml so a listen actually waits (not completes immediately due to listen.any: []).
  • Generating DB samples at test time (under @TempDir) instead of committing binary DB files.
  • Making the restore tests parameterized.
  • Adding deterministic awaits in the DB generator to eliminate race conditions.
  • Remove examples from release mvn command.

Follow up:

  • To check if the desired behavior is to finish the workflow immediately on listen.to.any: []. I believe that's the desired behavior, but it's worth checking out.

Not sure how the DbGenerator was working before, since the sample workflow was completed immediately/having a racing condition before suspending/finishing the workflow by listening to anything empty.

I created a small/raw/workaround to run the generator on a separate JVM when running the tests to avoid a collision with the file read. It's working pretty good, if you have a better idea (or any changes in the store implementation to avoid this), let me know.

Copy link
Collaborator

@fjtirado fjtirado left a comment

Choose a reason for hiding this comment

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

I do not get why storing binary file is worse than spawning a new JVM.
Also the DB files were stored on purpose to check backward compatibility with previous DB versions. They are intentionally NOT generated with every run
In my opinion this PR should just contain changes on release.yaml, pom.xml (to not run the examples) and comment main method of DBGenerator.

@fjtirado fjtirado self-requested a review November 3, 2025 17:45
@ricardozanini ricardozanini merged commit 6edd82a into serverlessworkflow:main Nov 3, 2025
3 checks passed
@ricardozanini ricardozanini deleted the fix-db-samples branch November 3, 2025 18:05
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