feat(deposition): retry assembly creation failures due to FTP login e…#6196
feat(deposition): retry assembly creation failures due to FTP login e…#6196anna-parker wants to merge 2 commits intomainfrom
Conversation
|
Claude finished @anna-parker's task in 2m 37s —— View job Code Review
The PR is a clean, focused change. The rename from Key observations:
Inline comments left on:
|
| table_name: TableName, | ||
| retry_threshold_min: int, | ||
| error_substring: str = "does not exist in ENA", | ||
| error_substrings: Iterable[str] = ("does not exist in ENA",), |
There was a problem hiding this comment.
The type Iterable[str] is a subtle footgun here: a plain str is also Iterable[str], so passing "some error" accidentally instead of ("some error",) would silently iterate over individual characters. Consider narrowing to Sequence[str] or tuple[str, ...] to make the interface safer.
| db_config, | ||
| table_name=TableName.ASSEMBLY_TABLE, | ||
| retry_threshold_min=config.retry_threshold_min, | ||
| last_retry=last_retry_time, | ||
| error_substrings=( |
There was a problem hiding this comment.
The first substring ends with "user error.:" — the trailing colon after the full stop looks unusual. Is this literally what ENA returns in the error message? If the colon is part of the actual message (e.g. preceding a stack trace), the match is fine, but it's worth confirming against a real example so the substring doesn't silently stop matching if ENA changes formatting.
| messages.append(msg) | ||
|
|
||
| last_retry_time = trigger_retry_if_exists( | ||
| last_retry_time = retry_failed_submissions_for_matching_errors( |
There was a problem hiding this comment.
The FTP auth retry will loop indefinitely for persistent credential failures — only the retry_threshold_min cooldown limits frequency, but there's no max attempt count. This pattern already exists for the "does not exist in ENA" case, so it's not a new regression, but it means a persistent misconfiguration will keep retrying forever without alerting. The TODO on line 774 acknowledges this gap.
…rror
resolves #
Screenshot
PR Checklist
🚀 Preview: Add
previewlabel to enable