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

feat: add CachedCheckResolver for caching Check subproblems #891

Merged
merged 29 commits into from
Aug 17, 2023

Conversation

jon-whit
Copy link
Member

@jon-whit jon-whit commented Jul 27, 2023

Description

This introduces an implementation of the CheckResolver interface and wires up dispatch delegation in a way that caches Check subproblems between invocation of ResolveCheck calls.

References

Closes #889

Review Checklist

@jon-whit
Copy link
Member Author

jon-whit commented Jul 27, 2023

  • todo(@jon-whit ) - add tests
  • todo(@jon-whit) - wire up the ListObjects server RPC handler to use the CachedCheckResolver as well.
  • todo(@jon-whit) - wire up the server flags to configure the Check query cache TTL and Check cache size limit.

@codecov
Copy link

codecov bot commented Jul 27, 2023

Codecov Report

Patch coverage: 85.66% and project coverage change: +0.19% 🎉

Comparison is base (4bc5053) 82.34% compared to head (7df0472) 82.52%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #891      +/-   ##
==========================================
+ Coverage   82.34%   82.52%   +0.19%     
==========================================
  Files          64       66       +2     
  Lines        7760     7969     +209     
==========================================
+ Hits         6389     6576     +187     
- Misses       1069     1088      +19     
- Partials      302      305       +3     
Files Changed Coverage Δ
internal/graph/mock_check_resolver.go 71.43% <71.43%> (ø)
pkg/server/server.go 76.46% <79.32%> (+0.19%) ⬆️
internal/graph/check.go 91.89% <80.96%> (+0.82%) ⬆️
internal/graph/cached_resolver.go 89.25% <89.25%> (ø)
cmd/run/flags.go 100.00% <100.00%> (ø)
cmd/run/run.go 75.20% <100.00%> (+0.57%) ⬆️
pkg/server/commands/list_objects.go 94.63% <100.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@adriantam adriantam self-assigned this Jul 31, 2023
pkg/server/server.go Outdated Show resolved Hide resolved
@adriantam adriantam marked this pull request as ready for review August 1, 2023 15:20
@adriantam adriantam requested a review from a team as a code owner August 1, 2023 15:20
cmd/run/run.go Outdated Show resolved Hide resolved
cmd/run/flags.go Outdated Show resolved Hide resolved
cmd/run/flags.go Outdated Show resolved Hide resolved
cmd/run/flags.go Outdated Show resolved Hide resolved
cmd/run/run.go Outdated Show resolved Hide resolved
internal/graph/cached_resolver.go Outdated Show resolved Hide resolved
internal/graph/cached_resolver_test.go Outdated Show resolved Hide resolved
internal/graph/graph.go Outdated Show resolved Hide resolved
pkg/server/test/list_objects.go Outdated Show resolved Hide resolved
pkg/server/server.go Outdated Show resolved Hide resolved
pkg/server/server.go Outdated Show resolved Hide resolved
.config-schema.json Outdated Show resolved Hide resolved
.config-schema.json Outdated Show resolved Hide resolved
pkg/server/server.go Outdated Show resolved Hide resolved
cmd/run/run.go Outdated Show resolved Hide resolved
pkg/server/server.go Outdated Show resolved Hide resolved
pkg/server/server.go Outdated Show resolved Hide resolved
@jon-whit
Copy link
Member Author

LGTM. Left one comment above about adding a test to cached_resolver_test.go for the Close behavior, but not necessarily a blocker.

pkg/server/server.go Outdated Show resolved Hide resolved
miparnisari
miparnisari previously approved these changes Aug 17, 2023
pkg/server/server.go Outdated Show resolved Hide resolved
@adriantam adriantam merged commit b7bcc84 into main Aug 17, 2023
12 checks passed
@adriantam adriantam deleted the query-caching branch August 17, 2023 17:06
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.

Cache Query Subproblems
4 participants