Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: reduce number of queries to get releases #2029

Merged
merged 8 commits into from
Oct 10, 2024

Conversation

sven-urbanski-freiheit-com
Copy link
Contributor

@sven-urbanski-freiheit-com sven-urbanski-freiheit-com commented Oct 10, 2024

This reduces the number of queries to the releases table, roughly by a factor of 25 (average number of releases per app).

This also reduces the number of cases where we actually load all the manifests from the releases table.
And it fixes a few tests that had a nil context.

Ref: SRX-LEIHOZ

@jonaswittbrodt
Copy link

I don't think the manifests are actually used in this code path. Can we skip loading them them?

pkg/db/db.go Outdated Show resolved Hide resolved
This reduces the number of queries to the releases table,
roughly by a factor of 25 (average number of releases per app).

Ref: SRX-LEIHOZ
pkg/db/db.go Outdated Show resolved Hide resolved
@sven-urbanski-freiheit-com
Copy link
Contributor Author

sven-urbanski-freiheit-com commented Oct 10, 2024

I don't think the manifests are actually used in this code path. Can we skip loading them them?

Indeed we can. I found a few more places where we load the manifest for no good reason and disabled loading them there.

@sven-urbanski-freiheit-com sven-urbanski-freiheit-com merged commit 701af31 into main Oct 10, 2024
17 checks passed
@sven-urbanski-freiheit-com sven-urbanski-freiheit-com deleted the su-releases-batch branch October 10, 2024 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants