AlexsLemonade / AlexsLemonade/refinebio

Add API endpoint to reprocess samples

Open
#1,880 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
135
Forks
21
PR merge metrics
No merged PRs in 30d

Description

### Context

With https://github.com/AlexsLemonade/refinebio-frontend/pull/784 we are going to add an internal samples page with processing information to help debug sample errors.

![image](https://user-images.githubusercontent.com/1882507/68512517-a35d7a00-0246-11ea-989c-b811b10d734a.png)

### Problem or idea

The first step when looking into unprocessed samples is to retry them, hoping that the reason why it's not processed might be fixed.

Right now we have a command for this `retry_samples`, are there any objections to also add an API endpoint to reprocess samples? We could add several checks to prevent people from abusing this endpoint, like for example:

- Don't queue samples if they were retried already with the currently deployed version

- Don't queue samples that have a job pending

- Don't queue samples where the last processor job failed less than 24 hours ago?

### Solution or next step

Add an endpoint to re-process samples, maybe `POST /jobs/retry_samples?accession_codes=...`?

Tagging @kurtwheeler for input.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the existing retry_samples command and the related samples processing flow. Use the proposed POST /jobs/retry_samples?accession_codes=... endpoint as the entry point, then resolve the requested safeguards and confirm how the internal samples page will call it. Done means the endpoint reprocesses eligible samples without queuing samples already retried on the deployed version, pending, or recently failed.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.