Skip to content

fix(inspection): fix missing filter resource name fields and query estimation metadata - #911

Merged
kyasbal merged 2 commits into
GoogleCloudPlatform:mainfrom
kyasbal:push-zmkwstpsrnmn
Aug 26, 2026
Merged

kyasbal merged 2 commits into
GoogleCloudPlatform:mainfrom
kyasbal:push-zmkwstpsrnmn

Conversation

@kyasbal

@kyasbal kyasbal commented Aug 26, 2026

Copy link
Copy Markdown
Member

Description

Fixes two issues with the new inspection parameter dialog:

  1. "Logging filter resource names (advanced)" child fields were disappearing because InputLoggingFilterResourceNameTask appended pointers *inspectionmetadata.TextParameterFormField instead of value types, failing the type switch during Connect-RPC conversion and stripping field properties.
  2. "Estimating total logs..." was permanently stuck on the dialog header because estimated_count, incomplete, and pending fields were missing in InspectionQuery in proto/api/v1/inspection.proto, dropping estimation metadata between backend and frontend.

Changes

  • Backend Task: Store value type TextParameterFormField in InputLoggingFilterResourceNameTask.
  • Protobuf: Add estimated_count, incomplete, and pending fields to InspectionQuery in proto/api/v1/inspection.proto.
  • Backend Service: Copy EstimatedCount, Incomplete, and Pending in convertQueries (pkg/server/api/v1/inspection.go).
  • Frontend Converter: Map estimatedCount, incomplete, and pending in convertProtoDryRunResponseToFrontend and convertProtoMetadataToInspectionMetadataOfRunResult (inspection-converter.ts).
  • Tests: Update unit tests in Go and Angular.
…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
@kyasbal
kyasbal requested review from RyuSA and jyane as code owners August 26, 2026 08:28
@kyasbal kyasbal added the type:bug Something isn't working as expected label Aug 26, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread proto/api/v1/inspection.proto Resolved
…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.
@kyasbal
kyasbal merged commit 7710ecb into GoogleCloudPlatform:main Aug 26, 2026
16 checks passed
@kyasbal
kyasbal deleted the push-zmkwstpsrnmn branch August 26, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug Something isn't working as expected

1 participant