Repository navigation
fix(inspection): fix missing filter resource name fields and query estimation metadata - #911
Merged
Merged
Conversation
…timation metadata - Fix missing text form field type switch match by storing value type instead of pointer in InputLoggingFilterResourceNameTask - Add estimated_count, incomplete, and pending fields to InspectionQuery in proto/api/v1/inspection.proto - Copy query estimation metadata in backend convertQueries - Map query estimation metadata in frontend inspection-converter - Update unit tests for query metadata conversion and inputloggingfilterresourcename task
Contributor
There was a problem hiding this comment.
Code Review
This pull request adds estimated_count, incomplete, and pending fields to the InspectionQuery message to support log volume estimation and query status. These changes are integrated across the backend Go server, frontend TypeScript converters, and tests. Additionally, pointer indirection was removed for TextParameterFormField in the Google Cloud common task. Feedback is provided to mark estimated_count as optional in the protobuf definition to correctly distinguish between an estimate of 0 and an unset state in the frontend.
…y converter In protobuf-es (v2), accessing scalar fields directly returns their default value (0n for int64), even when unpopulated. Using isFieldSet correctly distinguishes between an explicit estimate of 0 logs and an unpopulated estimate.
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.
Description
Fixes two issues with the new inspection parameter dialog:
InputLoggingFilterResourceNameTaskappended pointers*inspectionmetadata.TextParameterFormFieldinstead of value types, failing the type switch during Connect-RPC conversion and stripping field properties.estimated_count,incomplete, andpendingfields were missing inInspectionQueryinproto/api/v1/inspection.proto, dropping estimation metadata between backend and frontend.Changes
TextParameterFormFieldinInputLoggingFilterResourceNameTask.estimated_count,incomplete, andpendingfields toInspectionQueryinproto/api/v1/inspection.proto.EstimatedCount,Incomplete, andPendinginconvertQueries(pkg/server/api/v1/inspection.go).estimatedCount,incomplete, andpendinginconvertProtoDryRunResponseToFrontendandconvertProtoMetadataToInspectionMetadataOfRunResult(inspection-converter.ts).