Skip to content

feat(deposition): retry assembly creation failures due to FTP login e…#6196

Merged
anna-parker merged 4 commits into
mainfrom
retry_login_error_ena
Mar 30, 2026
Merged

feat(deposition): retry assembly creation failures due to FTP login e…#6196
anna-parker merged 4 commits into
mainfrom
retry_login_error_ena

Conversation

@anna-parker

@anna-parker anna-parker commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

…rror

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

@claude claude Bot added the deposition related to ENA/INSDC deposition label Mar 26, 2026
@anna-parker
anna-parker marked this pull request as ready for review March 26, 2026 14:12
@claude

claude Bot commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

Claude finished @anna-parker's task in 2m 37s —— View job


Code Review

  • Gather context and read changed files
  • Review code quality, error handling, and logic
  • Check for security, performance, and testing concerns
  • Post inline comments and final summary

The PR is a clean, focused change. The rename from trigger_retry_if_existsretry_failed_submissions_for_matching_errors is a clear improvement in naming, and generalising the parameter from a single error_substring to error_substrings is the right design to support the new FTP login error case.

Key observations:

  • No tests. There are no unit tests for retry_failed_submissions_for_matching_errors (old or new). The checklist item is unchecked — the new any()-based matching logic is simple but worth covering, especially to guard against the Iterable[str] footgun noted in the inline comment.
  • Behaviour is backward-compatible for create_project.py and create_sample.py: they don't pass error_substrings, so they still use the ("does not exist in ENA",) default.
  • Only assembly retries on the FTP login error, which is correct — project and sample creation use HTTP (not webin-cli/FTP), so they shouldn't be affected by this class of error.

Inline comments left on:

  1. ena_submission_helper.py:886Iterable[str] type safety (passing a bare str would silently match characters)
  2. create_assembly.py:763–767 — trailing : in the auth error substring worth confirming against a real ENA error output
  3. create_assembly.py:761 — no max retry cap for persistent auth failures (pre-existing gap, but worth noting)

Comment thread ena-submission/src/ena_deposition/ena_submission_helper.py Outdated
Comment thread ena-submission/src/ena_deposition/create_assembly.py
Comment thread ena-submission/src/ena_deposition/create_assembly.py
Comment thread ena-submission/src/ena_deposition/create_assembly.py Outdated
@anna-parker
anna-parker requested a review from maverbiest March 27, 2026 12:26

@maverbiest maverbiest left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good!

I think Claude's suggestion to use tuple[str] or Sequence[str] instead of Iterable[str] for typing would be nice, but not blocking

@anna-parker
anna-parker merged commit 931a5fc into main Mar 30, 2026
38 checks passed
@anna-parker
anna-parker deleted the retry_login_error_ena branch March 30, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deposition related to ENA/INSDC deposition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants