supabase-community / seed

Automatically seed your database with production-like dummy data based on your schema for local development and testing.
MIT License
483 stars 18 forks source link

feat: Improve sync re-run waiting times #172

Closed justinvdm closed 6 months ago

justinvdm commented 6 months ago

Demo

https://www.loom.com/share/a9186b8d2a814f8e924c71b50940058f?from_recorder=1&focus_title=1

Changes

In https://github.com/snaplet/snaplet/pull/2639, when startPredictionJobRoute endpoint called, we return whether there are incomplete (shape or data generation) jobs. This PR is for using this new information to avoid the extra round trip.

linear[bot] commented 6 months ago
S-2117 Improve `sync` re-run waiting times

We can tell the cli earlier than we currently do that there is no work for it to do: * for shape prediction, we create a job regardless. If all the inputs are cached, that job will end soon. But the cli still polls afterwards until the API tells it that job is done. We could probably short-circuit all of the that by checking the cache before hand and telling the cli at the start that it doesn't need to wait. * for data generation, we only create jobs if there are columns which don't have descriptions. We then later poll till there are no more in progress jobs. We could probably short circuit all that by telling the cli at the start if there's no jobs to wait for