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): Fix submitter of revoked sequences to be the revoker #3246

Merged
merged 4 commits into from
Nov 20, 2024

Conversation

theosanderson
Copy link
Member

@theosanderson theosanderson commented Nov 19, 2024

Fixes #3244

https://theosanderson-fix-revoked.loculus.org/

Update the submitter of a revoked sequence to the revoker

  • Modify backend/src/main/kotlin/org/loculus/backend/service/submission/SubmissionDatabaseService.kt to set the submitterColumn to the revoker's account during the revocation process
  • Change the revoke function to use the revoker's username for the submitterColumn instead of cloning the old submitter information

Tested that autoapprove no longer happens:

image

For more details, open the Copilot Workspace session.

…the revoker

Fixes #3244

Update the submitter of a revoked sequence to the revoker

* Modify `backend/src/main/kotlin/org/loculus/backend/service/submission/SubmissionDatabaseService.kt` to set the `submitterColumn` to the revoker's account during the revocation process
* Change the `revoke` function to use the revoker's username for the `submitterColumn` instead of cloning the old submitter information

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/loculus-project/loculus/issues/3244?shareId=XXXX-XXXX-XXXX-XXXX).
@theosanderson theosanderson added the preview Triggers a deployment to argocd label Nov 19, 2024
@theosanderson theosanderson changed the title (CoPilot generated attempt) Fix submitter of revoked sequences to be the revoker fix(backend): Fix submitter of revoked sequences to be the revoker Nov 19, 2024
@corneliusroemer
Copy link
Contributor

Thanks! Oof, how did this live so long without us noticing 😬

Copy link
Contributor

@anna-parker anna-parker left a comment

Choose a reason for hiding this comment

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

Thanks @theosanderson!

@corneliusroemer
Copy link
Contributor

I'm adding a test for this in #3248

@corneliusroemer
Copy link
Contributor

@fengelniederhammer maybe you have some thoughts on how to better test the created sequence entries - we've now got a bunch of helpers, that's not terrible but maybe there's a neater way you know. Also, we might want to test similar basic things explicitly for other parts of the submission flow.

@fengelniederhammer
Copy link
Contributor

we've now got a bunch of helpers

The helpers already look pretty helpful to me. The tests are nice to read.

@corneliusroemer
Copy link
Contributor

@fengelniederhammer I just wasn't sure whether creating a helper for each property was a good way to go. Could come up with a better way (limited Kotlin knowledge).

@corneliusroemer
Copy link
Contributor

Let's merge? @theosanderson :)

@theosanderson theosanderson merged commit a2907ce into main Nov 20, 2024
17 checks passed
@theosanderson theosanderson deleted the theosanderson/fix-revoked-sequences branch November 20, 2024 10:36
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
Projects
None yet
4 participants