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(ingest): Handle grouping changes by also allowing revocation #2372

Merged
merged 12 commits into from
Aug 12, 2024

Conversation

anna-parker
Copy link
Contributor

@anna-parker anna-parker commented Aug 2, 2024

resolves #2299

preview URL: https://ingest-fix-grouping-issue.loculus.org/

Summary

This is for multi-segmented genomes only.
Handle edge case when metadata fields change in reingest and previous grouping of segments is no longer valid. Currently we would add new groups and keep old groups, potentially having ingested sequences twice with no warning for users that the metadata has been updated.

This PR adds code that will detect this edge case (grouping change) and provides code to add the new groups and revoke the old ones. As there is a potential risk of over-revocation we should only run the revoke rule under manual oversight so although the code is added here I have not added the revoke rule to the rule all . In a later PR: #2392 I will add code to send us an automated message if such a change is detected and then we can launch a job which runs this snakemake rule.

This PR also adds very basic unit tests to ensure that revise and revoke work as expected.

Screenshot

Ran locally with test data (altering metadata to break grouping and cause revision)

  • Revocation is successful:
    image and new sequences are added.
  • Revision is successful and version is updated:
    image

PR Checklist

  • When run locally with engineered data (see data in test folder) this will revise and revoke sequences as desired.
  • The implemented feature is covered by an appropriate test.

@anna-parker anna-parker added the preview Triggers a deployment to argocd label Aug 5, 2024
@anna-parker anna-parker marked this pull request as ready for review August 5, 2024 16:28
@theosanderson
Copy link
Member

I think I need to get my head around the concepts a bit more in discussion then re-review. One other Q. I see [object Object] in the screenshot - do we know what's up there?

@anna-parker
Copy link
Contributor Author

I think I need to get my head around the concepts a bit more in discussion then re-review. One other Q. I see [object Object] in the screenshot - do we know what's up there?

Ah sorry should really have made a bug for this but I did it now, I see this on main always when I revoke sequences: #2401

@anna-parker anna-parker added the review please PR waiting for final review label Aug 8, 2024
ingest/Snakefile Outdated Show resolved Hide resolved
Copy link
Member

@theosanderson theosanderson left a comment

Choose a reason for hiding this comment

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

Thanks! Sorry for the delay!

@anna-parker anna-parker merged commit 699880e into main Aug 12, 2024
11 checks passed
@anna-parker anna-parker deleted the handle_grouping_changes branch August 12, 2024 13:35
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 review please PR waiting for final review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ingest/versioning and grouping: testing of versioning and grouping in multi-segment case
2 participants