Files
backstage/.changeset/stitch-queue-no-overlap.md
Fredrik Adelöw 0b8b67767b fix(catalog-backend): prevent overlapping stitches for the same entity
markForStitching now only updates the ticket on conflict, leaving
next_stitch_at unchanged so an in-progress worker isn't interrupted.

markDeferredStitchCompleted bumps next_stitch_at to now() when the
ticket changed, so pending re-stitches happen immediately after the
current stitch finishes rather than waiting for the timeout.

performStitching no longer calls markDeferredStitchCompleted when
abandoned due to a stale ticket, since the queue entry belongs to
another worker.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-05-22 16:57:53 +02:00

451 B

@backstage/plugin-catalog-backend
@backstage/plugin-catalog-backend
patch

Improved stitch queue semantics to prevent overlapping stitches for the same entity. New stitch requests that arrive while a stitch is in progress now only update the ticket (not the timestamp), so the in-progress worker is not interrupted. When the worker completes and detects a pending re-stitch, the queue entry becomes immediately eligible for pickup instead of waiting for the timeout period.