fix: execution listing queries should be faster now#7402
Draft
fix: execution listing queries should be faster now#7402
Conversation
test seemed to just validate generated code matched certain regexes, what's the point?
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
6 tasks
…lector parsers Co-authored-by: de-wim <76032+de-wim@users.noreply.github.com> Agent-Logs-Url: https://github.com/kubeshop/testkube/sessions/cee006d6-c4cd-4ec5-8439-91ec5506d1a4
Copilot
AI
changed the title
[WIP] Fix execution listing queries for better performance
fix: execution listing queries should be faster now
Mar 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request description
Rewrote postgres execution listing queries to use
text[]instead ofjsonbarrays for tag/label/selector filtering, eliminating ~18s timeouts when listing executions for an organization. Added comprehensive unit tests covering all changed query paths and the newtext[]-based filter encoding.Checklist (choose whats happened)
Breaking changes
Changes
GetTestWorkflowExecutions,GetTestWorkflowExecutionsSummary,GetFinishedTestWorkflowExecutions,CountTestWorkflowExecutions,GetTestWorkflowExecutionsTotals— replacedjsonbarray params for tags/labels/selectors withtext[]usingkey,key=value, andkey:not_existsencodingbuildTestWorkflowExecutionParams/buildTestWorkflowExecutionTotalParamsupdated; new helpersparseSelectorToText,parseLabelSelectorToText,parseTagSelectorToTextproduce thetext[]slicesexecutions.sql_test.go): replaced permissiveExpectQuery("SELECT")withregexp.QuoteMeta(<query constant>); added tests forCountTestWorkflowExecutions,GetFinishedTestWorkflowExecutions,GetTestWorkflowExecutions,GetTestWorkflowExecutionsSummarypostgres_test.go): addedTestBuildTestWorkflowExecutionParams,TestBuildTestWorkflowExecutionTotalParams,TestParseSelectorToText,TestParseTagSelectorToText,TestParseLabelSelectorToTextcovering key-only, key=value, multi-value same key,not_exists, whitespace trimming, and mixed conditionsFixes
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.