Skip to content

fix(deposition): dont default to status=SUBMITTED when copying results of last submission - #7553

Merged
anna-parker merged 4 commits into
mainfrom
dont_wait
Oct 19, 2026
Merged

anna-parker merged 4 commits into
mainfrom
dont_wait

Conversation

@anna-parker

@anna-parker anna-parker commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

When updating the revised sequence with results of the last version we set status to SUBMITTED - it should actually stay the same as the last version status (i.e. WAITING) to ensure if last version is still WAITING the newest version will continue to poll for the assembly accessions (otherwise we will have to update this manually when we get notified that not all accessions exist)

resolves #

Screenshot

PR Checklist

  • All necessary documentation has been adapted.
  • The implemented feature is covered by appropriate, automated tests.
  • Any manual testing that has been done is documented (i.e. what exactly was tested?)

🚀 Preview: Add preview label to enable

…he last version we set status to SUBMITTED - it should actually stay the same as the last version status (i.e. WAITING) to ensure if last version is still WAITING the newest version will continue to poll for the assembly accessions
@claude

claude Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @anna-parker's task in 55s —— View job


Review

  • Read the diff and the surrounding code (assembly_table_create, assembly_table_update, submission_table_start)
  • Checked which statuses the previous version can be in
  • Posted review

Summary: The fix is correct for the bug it targets. Before, if the previous version was still WAITING (it had an ERZ number but no GCA or INSDC accessions yet), the unchanged revision was copied as SUBMITTED with a partial result. It then never polled ENA again, so it never got the final accessions. Copying the previous status means the new row stays WAITING, and assembly_table_update picks it up and polls the same erz_accession.

Main concern (see the inline comment): The status is now copied no matter what it is. When this code runs, the previous version may still be in SUBMITTING or HAS_ERRORS:

  • With SUBMITTING, the new row is stuck in SUBMITTING forever.
  • With HAS_ERRORS, the new row is marked as an error but has no error message.

I suggest only copying when the previous status is SUBMITTED or WAITING. Otherwise, return early and leave the row in READY so a later loop retries it. (In the inline comment, the code block after the "e.g." is the proposed change. The suggestion block above it just repeats the current line and can be ignored.)

Minor:

  • Both versions in WAITING means ENA is polled twice for the same ERZ. This is cheap and fine.
  • There is no test where version 1 is still WAITING when the unchanged revision is processed. It's worth adding one, since this is the exact case being fixed.
  • The raw reads version (create_raw_reads.py:367) still hard-codes SUBMITTED. That's probably fine because raw reads have no WAITING state.

I did not run the tests.

Comment thread ena-submission/src/ena_deposition/create_assembly.py Outdated
@anna-parker
anna-parker merged commit c2fc26d into main Oct 19, 2026
44 checks passed
@anna-parker
anna-parker deleted the dont_wait branch October 19, 2026 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants