Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 6 commits into from
Nov 23, 2024

Conversation

chaoran-chen
Copy link
Member

@chaoran-chen chaoran-chen commented Nov 20, 2024

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

  • [ ] All necessary documentation has been adapted.
  • [ ] The implemented feature is covered by an appropriate test.

@chaoran-chen chaoran-chen added the preview Triggers a deployment to argocd label Nov 20, 2024
@chaoran-chen chaoran-chen marked this pull request as draft November 20, 2024 08:30
@chaoran-chen
Copy link
Member Author

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

@corneliusroemer
Copy link
Contributor

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
Copy link
Member

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
Copy link
Member

theosanderson commented Nov 20, 2024

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

@corneliusroemer
Copy link
Contributor

I'll cherry pick this test from Anya: #3258

@chaoran-chen
Copy link
Member Author

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

@corneliusroemer
Copy link
Contributor

corneliusroemer commented Nov 21, 2024

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
Copy link
Member Author

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

@chaoran-chen chaoran-chen marked this pull request as ready for review November 21, 2024 18:07
corneliusroemer added a commit that referenced this pull request Nov 23, 2024
This would have made it immediately clear what the reason for the test failures in #3259 was. So good to have for future.

Also truncate in one go for simplicity and maybe also performance.
* Add tests

* format

(cherry picked from commit a0a145e)
corneliusroemer added a commit that referenced this pull request Nov 23, 2024
This would have made it immediately clear what the reason for the test failures in #3259 was. So good to have for future.

Also truncate in one go for simplicity and maybe also performance.
corneliusroemer added a commit that referenced this pull request Nov 23, 2024
This would have made it immediately clear what the reason for the test failures in #3259 was. So good to have for future.

Also truncate in one go for simplicity and maybe also performance.
Copy link
Contributor

@corneliusroemer corneliusroemer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #3278 for a way to avoid similar test confusion in the future. Feel free to merge that PR into this PR before merging this PR.

This would have made it immediately clear what the reason for the test failures in #3259 was. So good to have for future.

Also truncate in one go for simplicity and maybe also performance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview Triggers a deployment to argocd update_db_schema
Projects
None yet
5 participants