Repository navigation
feat(inspection): add pending status for asynchronous validation and estimation - #909
Merged
Merged
Conversation
kyasbal
requested review from
K53,
RyuSA,
jyane,
kkuchima and
renamoo
as code owners
August 26, 2026 06:50
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces non-blocking log estimation and pending state handling for form fields in both the backend and frontend. Key changes include adding EstimateWithTaskSlotNonBlocking to the log estimator, updating metadata schemas to include a pending flag, and modifying the Angular frontend to display loading spinners and disable the run button during pending or validating operations. Feedback highlights a critical race condition in EstimateWithTaskSlot that could lead to silent error loss, as well as an unused CSS class .pending-spinner in the frontend styles.
…estimation Support representing and tracking asynchronous pending operations during dryrun on both the backend and frontend. - backend: add non-blocking EstimateWithTaskSlotNonBlocking to CachedStructuredLogEstimator - backend: mark query items as pending during async log estimation - backend: set Pending flag and Info hint on file form field when file status is processing - frontend: integrate server-side pending with client-side validating state in ParameterHeaderComponent - frontend: compute pendingFieldCount and errorFieldCount with Angular signals to disable Run button and suppress stale errors during validation
kyasbal
force-pushed
the
push-lkmlzwlstrlw
branch
from
August 26, 2026 07:24
11f265a to
4a8b67c
Compare
…s class - Return active flightCall pointer directly under lock via estimateWithTaskSlotInternal to avoid silent error loss race condition - Remove unused .pending-spinner CSS class in parameter-header.component.scss
kyasbal
force-pushed
the
push-lkmlzwlstrlw
branch
from
August 26, 2026 07:47
4a8b67c to
54e7891
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 introduces pending status representation and handling for asynchronous operations during dryrun across both backend and frontend.
Background & Motivation
CachedStructuredLogEstimator, previous implementations blocked synchronous dryrun execution while awaiting estimation. With non-blocking estimation, dryrun returns immediately with pending state while the estimation runs concurrently.Key Changes
1. Backend (
pkg/)pkg/core/inspection/metadata/form_metadata.go: AddedPending bool \json:"pending,omitempty"`toParameterFormFieldBase`.pkg/core/inspection/metadata/query_metadata.go: AddedPending bool \json:"pending,omitempty"`toQueryItemand helperSetPendingQuery`.pkg/api/googlecloud/logestimator/cached_estimator.go: AddedEstimateWithTaskSlotNonBlocking(ctx, taskSlotKey, container, query, startTime, endTime, provider)returning(*EstimateResult, bool, error)(isPending=truewhen running). ReimplementedEstimateWithTaskSlotto delegate to the non-blocking variant.pkg/task/inspection/googlecloudcommon/contract/structured_listlogentries_task.go: Switched toEstimateWithTaskSlotNonBlockingand marked queries as pending usingsetStructuredQueryInfoWithPending.pkg/core/inspection/formtask/fileform.go: SetPending: trueandHintType: Infoon file form fields while file upload/processing status is not completed.2. Frontend (
web/)web/src/app/common/schema/form-types.ts: Addedreadonly pending?: boolean;toParameterFormFieldBase.web/src/app/common/schema/metadata-types.ts: Addedreadonly pending?: boolean;toInspectionMetadataQuery.ParameterHeaderComponent):isValidating()(from PR fix(web): update form validation on in-flight requests and migrate to signals #907) and server-sideparameter().pendingintoisPendingOrValidating..validation-spinnerwhenever a field is either server-pending or client-validating.NewInspectionDialogComponent):pendingFieldCountanderrorFieldCountcomputed signals.isRunButtonDisabled = computed(() => this.hadRun() || this.errorFieldCount() !== 0 || this.pendingFieldCount() !== 0)to immediately prevent execution while unvalidated changes or pending server tasks exist.Resolving parameters: X / Ywith a spinner while pending.computeTotalEstimatedLogsto treat pending queries as estimating.Verification
make test-gopassed (all packages).make lint-gopassed (0 issues).make test-webpassed (795 / 795 SUCCESS).make lint-webpassed (0 issues).make pre-commitpassed with 0 issues.make build-go && make build-websucceeded.