Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Make import retry safe after ambiguous queue enqueue outcomes

Aperta
#523 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@Tyagiquamar ci sta già lavorando.

Dal 2/10/2026.

  • #530 di @Tyagiquamar — aperta

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
redis, typescript

Direzione di ricerca

Start by reading packages/trpc/src/routers/import.ts and apps/worker/src/jobs/import.ts, then inspect this repository's BullMQ version and its job lifecycle behavior. Add coverage for definite failures, ambiguous acknowledgements, duplicate retries, and any reconciliation path selected. Done means ambiguous outcomes cannot create concurrent jobs, definite failures remain retryable, and pending imports have documented recovery.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Requested by @mahmoud-samy as a follow-up to PR #519.

Problem

In packages/trpc/src/routers/import.ts, importRouter.retry changes an import from failed to pending before calling the BullMQ importQueue.add. If add rejects, the route restores failed, which addresses a definite enqueue failure. If Redis persisted the job but the acknowledgement was lost, the rollback can permit a second retry and concurrent jobs for the same import ID. Concurrent jobs can interfere with staging cleanup by import ID in apps/worker/src/jobs/import.ts. A pending import with no live job may also need recovery.

Proposed work

  • Investigate this repository's BullMQ version and verify duplicate-job behavior for a deterministic jobId keyed on the import ID. Account for job lifecycle and later retries so valid retries remain possible.
  • Make retry enqueue idempotent across ambiguous acknowledgements. Do not reset an import to failed when a job might already have been persisted without confirming the outcome.
  • Assess whether a reconciliation process is necessary for pending imports that lack a live job. Implement one if needed, with a safe way to distinguish live, completed, and missing jobs.
  • Add tests for definite enqueue failures, ambiguous enqueue outcomes, duplicate retries, and reconciliation if implemented.

Acceptance criteria

  • An ambiguous acknowledgement cannot cause two active import jobs for the same import ID.
  • A definite enqueue failure remains retryable.
  • Pending imports without a live job have a documented recovery path.
  • Tests cover the selected recovery and idempotency behavior.

Related PR: https://github.com/Openpanel-dev/openpanel/pull/519
Original review comment: https://github.com/Openpanel-dev/openpanel/pull/519#discussion_r4116862559

Lingua principale
TypeScript
Stelle
7.1k
Fork
510
Merge medio
7g 2h
PR unite (30g)
7

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Openpanel-dev/openpanel

Tutte le issue di Openpanel-dev/openpanel

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.