ClinVar export: a rejected batch leaves its exports 'Up to Date' and out of later batches
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start with classification/models/clinvar_export_models.py and trace ClinVarExportBatch.reject(), add_record, and create_batches; then read clinvar_export_sync.py at _handle_request_response and _handle_response_file. The proposal leaves the submission display behavior and automatic re-queue policy unresolved, so first establish those decisions with maintainers. Done means rejected batches update submission and export statuses consistently and eligible exports behave as agreed in a later batch; verify with the Shariant test-mode cases described in the issue.
Written by the indexing model from the issue text.
Description
🤖 Written by Claude
Problem
When a ClinVarExportBatch is rejected, its exports are left reporting Up to Date even though nothing reached ClinVar, and nothing puts them back in the queue.
ClinVarExportBatches.add_record (classification/models/clinvar_export_models.py) sets each ClinVarExport to UP_TO_DATE as soon as it is put in a batch. Only the admin "Reject" action (ClinVarExportBatch.reject) re-evaluates the exports afterwards, via export.update(). The two ways the sync rejects a batch don't:
clinvar_export_sync.py_handle_request_response: ClinVar returns an error the code treats as our data issue (ClinVarRequestExceptionType.OUR_DATA_ISSUE). The batch becomes REJECTED, but its submissions stay WAITING and its exports stay UP_TO_DATE with no error showing._handle_response_file: a response file withtotalSuccess == 0. The batch becomes REJECTED. Each submission is marked ERROR, so the grid shows "ClinVar Error", but the export is still UP_TO_DATE.
ClinVarExportBatch.create_batches only picks up NEW_SUBMISSION / CHANGES_PENDING exports, so these records stay out of every later batch. That lasts until their classification changes, someone runs a force-update prepare, or someone regenerates the batch (only possible for the latest batch of a ClinVar key). The integration status panel does show the rejected batch.
Related display problems:
ClinVarExportSubmissionStatushas no REJECTED value, so the TODO inreject()(submissions.update('status', ClinVarExportSubmissionStatus.REJECTED)) can't be written as it stands. A rejected batch's submissions show "Waiting" forever.ClinVarExport.last_submission(behind "Last Submission Status", "Last Submission Error" and the "Latest Batch" export columns) includes rejected batches.ClinVarExport.previous_submission, which the converter diffs against, excludes them. After a reject, the export page shows the rejected submission's status, and the "Previous ClinVarSubmission (pk)" label next to the diff names a different submission from the one compared.- The "Latest Batch Status" export column (
clinvar_export_view.py_batch_status) is missing areturn, so it is always blank. This one is fixed directly on master, not here.
Proposal
- Add
ClinVarExportSubmissionStatus.REJECTED(a migration, since it adds a choice). - Do rejection in one place, the model method
ClinVarExportBatch.reject(), and have both sync paths call it: mark the batch REJECTED, mark its still-WAITING submissions REJECTED (keep ERROR where ClinVar said so per record), thenupdate()each export. An export whose last non-rejected submission differs from the current data then goes back to CHANGES_PENDING / NEW_SUBMISSION, ready for the next batch. - Decide what "last submission" means on the page: exclude rejected batches as
previous_submissiondoes, or keep showing the rejected one but label it as rejected.
Open question: after an OUR_DATA_ISSUE rejection, should the records re-queue automatically (they would be rejected again until the data is fixed) or wait for a person? Re-queuing loops if nothing changes, so CHANGES_PENDING with the batch error shown might need a guard.
Testing
Shariant: reject a batch from admin and via a ClinVar test-mode error response. Check the exports' status and "Last Submission Status", and that a new batch picks them up as decided above.
VariantGrid: same, on a deployment with a ClinVar key configured.
- Dominant language
- Python
- Stars
- 31
- Forks
- 4
- Avg merge
- 4h 52m
- Merged PRs (30d)
- 183
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SACGF/variantgrid
-
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
SACGF/variantgrid#2964 · 1 comment ·
Maintainers usually reply within 1 day
-
Genome build now duplicated in "imported as" on allele pagePossibly taken @TheMadBug claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
SACGF/variantgrid#2950 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
SACGF/variantgrid#2865 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
SACGF/variantgrid#2647 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
SACGF/variantgrid#2341 · 3 comments ·
Maintainers usually reply within 1 day
All issues in SACGF/variantgrid
Similar issues
-
Test: to_hijri() accepts datetime.datetime and uses only the date partPossibly taken A pull request linked to this issue is open or already merged. Opengood first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
omarelshamy25x/shamy-hijri#63 · 3 comments ·
Maintainers usually reply within 1 day
-
polish
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
521xueweihan/HelloGitHub#4729 ·
-
[Bug]: Score parser reads parts of scientific notation as valid scoresPossibly taken @AshutoshSingh840 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
UKGovernmentBEIS/control-arena#992 ·
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
mvalentsev/awesome-free-ai-coding#70 ·
Maintainers usually reply within 1 day