Repository navigation
ROX-40167: Use bounded probes for store existence checks - #24515
dashrews78 wants to merge 2 commits into
Conversation
🚀 Build Images ReadyImages are ready for commit 13ea1f4. To use with deploy scripts: export MAIN_IMAGE_TAG=5.1.x-783-g13ea1f4bfb |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #24515 +/- ##
==========================================
- Coverage 53.54% 53.51% -0.03%
==========================================
Files 2700 2700
Lines 173382 173470 +88
==========================================
+ Hits 92833 92836 +3
- Misses 72603 72657 +54
- Partials 7946 7977 +31
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Replaces the count-based genericStore.Exists with a limit-1 primary-key search and adds a SELECT EXISTS-backed Exists to the singleton store template, regenerating the bindings. Partially generated by AI; prompted by "I don't want the generation stuff in 37929. So we should probably do 40167 first". Co-Authored-By: Claude Code <noreply@anthropic.com>
Adds an EXISTS query type and RunExistsRequestForSchema so genericStore.Exists issues select exists(...) instead of a search or count. Partially generated by AI; prompted by "I would rather do it once, so lets do that in this PR". Co-Authored-By: Claude Code <noreply@anthropic.com>
4fe0284 to
13ea1f4
Compare
|
@dashrews78: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Description
Adds an
EXISTSquery type andRunExistsRequestForSchemasogenericStore.Existsissuesselect exists(select 1 from ...), and adds aSELECT EXISTS-backedExists(ctx)to the singleton store template. Singleton bindings are regenerated. This lets ROX-37929 switch callers without touching generated code.Caveat: a single-ID count on a primary-key index is already cheap; the gain is architectural — no dependency on SEARCH's select/group-by/pagination machinery, a reusable existence primitive, and clearer SQL.
User-facing documentation
Testing and quality
Automated testing
How I validated my change
go buildandgo vetpass on all affected packages.go test ./pkg/search/postgrespasses, including the newTestExistsQuery(assertsselect exists(, nocount(, nolimit).make go-generated-srcsproduces no diff beyond the committed generated files.sql_integrationtests compile; not executed locally (no Postgres).🤖 Generated with Claude Code