From 6b88327089d6e6a9645ee19f9b1efbefa5f80c6c Mon Sep 17 00:00:00 2001 From: Deluan Date: Tue, 1 Sep 2026 18:58:53 -0400 Subject: [PATCH] fix(artwork): clear the last_failure default left by the trace migration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 20260819204637 added last_failure as NOT NULL DEFAULT '[]', so every row already in item_artwork was backfilled with a non-empty value. Nothing read that column until this PR, which uses non-empty to mean "this state was reached by exhausting the retry budget". Every absent row predating that migration therefore reported as failed. The consequence is the opposite of what --source failed is for: on an install with a large absent population it would enqueue all of it, which is the external-lookup burst the option exists to avoid. My own database had ten such playlist rows, attempted 2026-08-17 against a migration applied 2026-08-31, and artwork status called all ten failed. After this it reads 10 no image, 0 failed. Normalizing the data rather than excluding '[]' in the predicate, because an empty trace does encode as '[]' — no reachable give-up path produces one today, but relying on that would silently drop a real give-up out of the failed set if a future failure path skipped its trace. --- .../20260901225726_normalize_artwork_last_failure.sql | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 db/migrations/20260901225726_normalize_artwork_last_failure.sql diff --git a/db/migrations/20260901225726_normalize_artwork_last_failure.sql b/db/migrations/20260901225726_normalize_artwork_last_failure.sql new file mode 100644 index 000000000..6de12e757 --- /dev/null +++ b/db/migrations/20260901225726_normalize_artwork_last_failure.sql @@ -0,0 +1,9 @@ +-- +goose Up +-- 20260819204637 added last_failure with DEFAULT '[]', so every row already in the table got a +-- non-empty value. That is how a give-up is now told apart from a definitive "no image", which +-- would report every pre-existing absent row as failed. +UPDATE item_artwork SET last_failure = '' WHERE last_failure = '[]'; + +-- +goose Down +-- Irreversible: a genuine give-up and a backfilled default are indistinguishable once normalized. +SELECT 1;