holdex / pr-time-tracker

https://autoinvoice-theta.vercel.app
0 stars 3 forks source link

fix: duplicated events in db #238

Closed georgeciubotaru closed 7 months ago

georgeciubotaru commented 7 months ago

resolves https://github.com/holdex/autoinvoice/issues/237

vercel[bot] commented 7 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
autoinvoice ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 25, 2024 10:34am
pr-time-tracker[bot] commented 7 months ago

Hi @pr-time-tracker Your PR cost submitted: 0.1 hours. View submission on.

pr-time-tracker[bot] commented 7 months ago

Hi @georgeciubotaru Your PR cost submitted: 1.4 hours. View submission on.

zolotokrylin commented 7 months ago

@georgeciubotaru what was the underlying problem and solution in short please?

georgeciubotaru commented 7 months ago

@zolotokrylin Based on the fact that we are using BigQuery it is a non-relation db, the only thing to have a constraint to be able to remove duplicated events, is by adding a unique _id field so we will be able to filter based on it

zolotokrylin commented 7 months ago

@georgeciubotaru and where do you get a unique id from?

georgeciubotaru commented 7 months ago

@zolotokrylin Generate it using the combined PR details like (organization, repo, sender, createdAt, action)