Skip to content

Adopt AIP 151 operations - #37

Merged
STRRL merged 2 commits into
masterfrom
conductor/lapp-aip151-operations
Jul 26, 2026
Merged

Adopt AIP 151 operations#37
STRRL merged 2 commits into
masterfrom
conductor/lapp-aip151-operations

Conversation

@STRRL

@STRRL STRRL commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Problem

Import and discovery jobs run in the background, but their Create APIs return custom responses. Clients cannot use the standard long running operation contract.

Solution

Return google.longrunning.Operation from both Create APIs and expose the standard Operations service. Keep ImportRun and DiscoveryRun as stored resources for progress and history.

Major Changes

  • API contract
    • Add AIP 151 operation metadata and response types
    • Generate standard Google Operations clients
  • Operation service
    • Support GetOperation and WaitOperation
    • Return typed metadata, successful responses, and structured errors
    • Return ABORTED when another run is active
  • Web client
    • Register operation Any message types
    • Add the generated Operations client

Note

Medium Risk
This is a breaking RPC contract change for CreateImportRun/CreateDiscoveryRun; callers must use Operations polling and Any unpacking, though the in-repo frontend is updated in the same PR.

Overview
CreateImportRun and CreateDiscoveryRun now return google.longrunning.Operation instead of bespoke create responses. Progress lives in operation metadata (ImportRunMetadata / DiscoveryRunMetadata with the run resource); success and failure use Operation.response and Operation.error. GetImportRun, ListImportRuns, GetDiscoveryRun, and ListDiscoveryRuns stay for history.

Buf pulls in googleapis, adds a second generate pass for google.longrunning.Operations (Go Connect + TS), and marks generated trees as linguist-generated. The web app registers metadata/response types on the Connect JSON registry, exports an operationsClient, and startDiscovery reads the run name from unpacked operation metadata instead of a direct run field.

Docs/ADR now describe AIP 151 polling via GetOperation, one active import or discovery per workspace with parallel creates returning ABORTED, and the standard operation shape.

Reviewed by Cursor Bugbot for commit 2f4d846. Bugbot is set up for automated code reviews on this repo. Configure here.

@STRRL
STRRL marked this pull request as ready for review July 26, 2026 22:47
@STRRL
STRRL merged commit 4866ee2 into master Jul 26, 2026
2 checks passed
@STRRL
STRRL deleted the conductor/lapp-aip151-operations branch July 26, 2026 22:47
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.

1 participant