From 6a97b662bb49210a800411d794bcabc8e96401c8 Mon Sep 17 00:00:00 2001 From: Amin Salarkia Date: Tue, 8 Oct 2024 19:48:40 +0200 Subject: [PATCH] fix(db): fix get manifests query (#2025) Ref: SRX-0Q0FWU --- pkg/db/db.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/db/db.go b/pkg/db/db.go index 77d3b2787..4647e2af6 100644 --- a/pkg/db/db.go +++ b/pkg/db/db.go @@ -650,7 +650,7 @@ func (h *DBHandler) DBSelectAllManifestsForAllReleases(ctx context.Context, tx * releases.environments FROM ( SELECT - MAX(releaseVersion) AS latestRelease, + MAX(eslVersion) AS latestRelease, appname, releaseversion FROM @@ -660,7 +660,8 @@ func (h *DBHandler) DBSelectAllManifestsForAllReleases(ctx context.Context, tx * JOIN releases AS releases ON - latest.latestRelease=releases.releaseVersion + latest.latestRelease=releases.eslVersion + AND latest.releaseVersion=releases.releaseVersion AND latest.appname=releases.appname; `) span, ctx := tracer.StartSpanFromContext(ctx, "DBSelectAllManifestsForAllReleases")