In today’s programming workshop for @coocook we’ve fixed a long-standing bug in the ingredients editor (image 1):
When you added ingredients to recipes there was a #RaceCondition. The new ingredient is always added to the database but SOMETIMES the view was updated before so the new ingredient wasn’t visible until next reload …
It was a nice engineering challenge to reproduce this issue reliably. Slowing down the connection did not help. Making any of the requests respond slower did not help. Using the #Starman application server for #Perl instead of the single-threaded dev server finally allowed to reproduce the issue 😅
The actual bug was in the #reactjs app: Requests for adding the new ingredient and updating the view were fired but the keyword "await" was missing to actually wait for the response 🙈 (image 2)
https://gitlab.com/coocook/web-components/-/commit/ca2b23914c59f71a3f11618d9328684480a0b778





