Repository navigation
feat(workbench): add batch ReadStructYAMLs RPC and client-side prefetching - #919
Merged
Merged
Conversation
kyasbal
requested review from
K53,
RyuSA,
jyane,
kkuchima and
renamoo
as code owners
August 27, 2026 08:18
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors the single-item ReadStructYAML RPC into a batch-oriented ReadStructYAMLs service, updating the backend, protobuf definitions, and frontend client. The frontend now supports batching requests up to 200 items, in-flight request deduplication, and caching, alongside a new StructYamlPrefetchService that prefetches surrounding struct YAMLs in the background. Feedback on the changes points out a bug in the frontend client where checking if (yaml) on in-flight promise resolution incorrectly treats empty strings as falsy, preventing them from being cached or correctly aggregated.
…ching - Replace single ReadStructYAML with batch ReadStructYAMLs RPC in proto and server. - Support in-memory LRU caching, in-flight request deduplication, and automatic batching in WorkbenchClientService. - Consolidate current/previous revision fetching into a single resource in DiffSmartComponent. - Add StructYamlPrefetchService to prefetch surrounding revision and log struct YAMLs upon timeline, revision, and log selection.
kyasbal
force-pushed
the
push-ryulyrmynywq
branch
from
August 27, 2026 08:38
74c8bcd to
2dc19c6
Compare
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.
Summary
This PR replaces the single
ReadStructYAMLRPC with a batch-capableReadStructYAMLsRPC, adds client-side LRU caching and in-flight request deduplication, consolidates the diff smart component to fetch revisions in a single batch, and introducesStructYamlPrefetchServiceto prefetch surrounding revision and log struct YAMLs asynchronously.Key Changes
proto,pkg/server):ReadStructYAMLwithReadStructYAMLsaccepting multiple struct IDs (up to 200 items per batch).pkg/server/workbenchandpkg/server/api/v1.WorkbenchClientService):readStructYAMLs:readStructYAMLfacade for single-ID callers.prefetchStructYAMLsfor fire-and-forget background caching with synchronous fast-path filtering.DiffSmartComponent):currentRevisionResourceandpreviousRevisionResourceinto a single batchrevisionYamlsResource.StructYamlPrefetchService):provideAppInitializer.StructYamlPrefetchService,WorkbenchClientServicebatching & prefetching, andDiffSmartComponent.