Skip to content

docs: document Discovery LRO return types - #1373

Merged
chingor13 merged 2 commits into
googleapis:mainfrom
chingor13:fix-issue-991
Oct 7, 2026
Merged

chingor13 merged 2 commits into
googleapis:mainfrom
chingor13:fix-issue-991

Conversation

@chingor13

@chingor13 chingor13 commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Clarifies that Discovery-based long-running operations return the terminal Operation status record upon polling completion rather than the modified resource, and documents how to retrieve the created/modified resource using get.

  • Generated DocC notes on GoogleCloudComputeV1 LRO polling methods and protocol requirements.
  • Updated User Guide section on Long-Running Operations.

Fixes #991

@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 documentation notes to various generated Swift client files and updates the user guide to clarify the behavior of long-running operations in Discovery-based APIs (such as Compute Engine), which return a terminal Operation status object instead of the target resource. The reviewer provided a valuable suggestion to improve the user guide by clarifying that since the polling helper methods are throwing functions in Swift, any operation failure will automatically throw an error, meaning callers do not need to manually check the returned Operation for errors.

Comment thread guide/Sources/UserGuide/UserGuide.docc/long-running-operations.md Outdated
@chingor13
chingor13 marked this pull request as ready for review October 6, 2026 22:07
@chingor13
chingor13 requested a review from a team as a code owner October 6, 2026 22:07
chingor13 added a commit to googleapis/librarian that referenced this pull request Oct 7, 2026
This change adds a standardized DocC `- Note:` callout to
Discovery-based long-running operation polling methods in the Swift
generator templates.

Unlike standard gRPC LROs which unwrap and return the target resource
directly upon polling completion, Discovery-based APIs (e.g. Compute
Engine) return the terminal `Operation` status record. The note informs
developers to call the corresponding `get` method to obtain the modified
or created resource.

Towards googleapis/google-cloud-swift#991
Generated PR: googleapis/google-cloud-swift#1373
@chingor13
chingor13 requested a review from a team as a code owner October 7, 2026 16:34
@chingor13
chingor13 enabled auto-merge (squash) October 7, 2026 16:35
@chingor13
chingor13 disabled auto-merge October 7, 2026 16:36
@chingor13 chingor13 changed the title docs: document Discovery LRO return types (#991) docs: document Discovery LRO return types Oct 7, 2026
@chingor13
chingor13 enabled auto-merge (squash) October 7, 2026 16:36
@chingor13
chingor13 disabled auto-merge October 7, 2026 16:43
Regenerate GoogleCloudComputeV1 with DocC notes explaining that Discovery LRO polling returns an Operation status record rather than the modified resource.
Document differences in return types between gRPC and Discovery-based long-running operations in the User Guide, noting that Discovery-based operations return the Operation status object rather than the modified resource.
@chingor13
chingor13 merged commit f6d73ae into googleapis:main Oct 7, 2026
22 checks passed
@chingor13
chingor13 deleted the fix-issue-991 branch October 7, 2026 17:11
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.

compute, sidekick: clarify or bridge LRO wait() return types on Discovery-based APIs

2 participants