Running previous query when updating to a new one

There seems to be a small bug when updating a query -

When a change has been made and you click "Save & Run", it runs the previous query instead of the updated one once, and then runs the updated one. This can lead to a lot of unwanted updates through Retool.

Hey Joey, thanks for reaching out about this. Is this happening on a specific resource type for you, or have you noticed it on multiple resources and query types?

Hey @joeBumbaca

This seems to be happening on postgres and google sheets queries for me. Thanks!

Hey Joey, thanks for the extra information. Is this only happening on queries that update the DB / Google Sheet?

Hey @joeBumbaca this seems to happen for all queries when clicked quickly.

Here is an example with a google drive api query -

Screen-Recording-2021-11-17...

Note how the error message shows the first time the query is ran and not the second.. and vice versa

It looks like this happens for all queries when the save and run is ran quickly after changing the query. I've noticed this with the S3 Resources, postgresql resources, googlesheets and rest api resources.

Hey Joey, thanks for the video! Are you running into this issue on a cloud deployment or is it a specific on premise Retool version? I haven't been able to reproduce on cloud, so wanted to check if I should be looking at a specific version.

Hm - interesting that you haven't been able to repro. I think it might be specific to when a query allows you to save and then run, and doesn't show save and run together.

This is on cloud, but I've been able to repro on-prem previously as well.

Hey Joey! We have finally been able to repro this issue when we throttle the internet speeds down to slow 3G levels. We think that is most likely related to higher latency to the Retool server that you are connecting to. We will submit a bug report so that we wait for the save to complete before the query is triggered. Thanks for bringing this to our attention!