loculus-project / loculus

An open-source software package to power microbial genomic databases
https://loculus.org
GNU Affero General Public License v3.0
37 stars 2 forks source link

fix(backend): add foreign key to delete preprocessed data #3259

Open chaoran-chen opened 2 days ago

chaoran-chen commented 2 days ago

resolves #3250, alternative to #3252

preview URL: https://delete-processed2.loculus.org

Summary

This adds a foreign key to sequence_entries_preprocessed_data for accession and version.

PR Checklist

chaoran-chen commented 2 days ago

Something seems wrong, I'll look into it in the afternoon.

corneliusroemer commented 2 days ago

This is definitely the right way to go! We should probably add a few more foreign keys eventually. But great start and should fix the bug once it passes!

theosanderson commented 2 days ago

The problem might be that you just need to push an empty commit to this branch because the CI doesn't trigger images to build

theosanderson commented 2 days ago

(I just rebased which will trigger that, hope that's ok)

corneliusroemer commented 2 days ago

I'll cherry pick this test from Anya: https://github.com/loculus-project/loculus/pull/3258

chaoran-chen commented 2 days ago

I was referring to many tests failing – a bit surprising but haven't yet thought/look into them deeper

corneliusroemer commented 20 hours ago

Any progress @chaoran-chen? I have a suspicion that the tests might not properly respect the (new) foreign key constraint. So things are either not created or deleted now without that being expected.

Good reason to add those constraints sooner rather than later, now we might have to fix a lot of tests 😬

@fengelniederhammer what are your thoughts as you set up most of the tests here? Hopefully it's only the convenience clients that need small fixes.

chaoran-chen commented 19 hours ago

I fixed it, I just need get my GPG working again so that I can commit...