fix(server,web/m7-cover-sources): forward-fix CI
Three failures from the prior push: 1. internal/api/library.go and 3 other callers of q.GetArtistByID broke because T2 modified the query to use an explicit column list, making sqlc generate GetArtistByIDRow instead of returning dbq.Artist. dbq.Artist already has every column added by migration 0018 (artist_thumb_path / artist_fanart_path / artist_art_source / artist_art_sources_version), so the explicit column list was unnecessary work. Revert the SELECT to SELECT *, regenerate sqlc, GetArtistByIDRow disappears, all callers compile again. 2. internal/tracks/service_test.go missed the dataDir parameter added to NewService in T9. Add "" as the 4th arg to every test call site (tests don't exercise the artist-art cleanup path; the empty dataDir is fine). 3. integrations.test.ts:356's mock.calls.filter callback had a too-narrow type annotation that svelte-check rejected. Relax to any[] to match what mock.calls actually is.
This commit is contained in:
@@ -11,15 +11,9 @@ DO UPDATE SET
|
||||
RETURNING *;
|
||||
|
||||
-- name: GetArtistByID :one
|
||||
-- M7 cover-sources: enricher reads the artist's mbid + current art
|
||||
-- columns to drive eligibility check. (Modified from SELECT * to
|
||||
-- explicitly include the new artist_art_* columns added in migration
|
||||
-- 0018.)
|
||||
SELECT a.id, a.name, a.sort_name, a.mbid,
|
||||
a.artist_thumb_path, a.artist_fanart_path,
|
||||
a.artist_art_source, a.artist_art_sources_version
|
||||
FROM artists a
|
||||
WHERE a.id = $1;
|
||||
-- Lookup an artist row by its UUID. Returns the full row; consumers
|
||||
-- pick the columns they need.
|
||||
SELECT * FROM artists WHERE id = $1;
|
||||
|
||||
-- name: GetArtistByName :one
|
||||
SELECT * FROM artists WHERE name = $1 LIMIT 1;
|
||||
|
||||
Reference in New Issue
Block a user