Skip to content

Regenerate clients with two-step LRO start/poll JSDoc#188

Draft
parthban-db wants to merge 1 commit into
mainfrom
parthban-db/stack/bugbash-bug14-lro-wait
Draft

Regenerate clients with two-step LRO start/poll JSDoc#188
parthban-db wants to merge 1 commit into
mainfrom
parthban-db/stack/bugbash-bug14-lro-wait

Conversation

@parthban-db
Copy link
Copy Markdown
Contributor

@parthban-db parthban-db commented Jun 3, 2026

🥞 Stacked PR

Use this link to review incremental changes.


Summary

Regenerates the generated LRO clients so each create/delete/update/undelete operation factory carries JSDoc documenting the two-step start/poll pattern. Docs-only — no signatures or behavior change.

Why

Bug-bash testers found the LRO call pattern confusing: await client.createXOperation(req) returns a handle and await op.wait() polls it to completion, but the factory methods had no JSDoc, so the two-step relationship was invisible at the call site and op.wait(undefined) looked mandatory. wait() was already wait(options?: LroOptions), so a no-argument op.wait() already compiled — only the discoverability was missing.

What changed

  • Regenerates the generated client.ts across all LRO clients with JSDoc on every operation factory describing the start/poll pattern and a no-argument await op.wait() example.
  • Updates each wait() JSDoc to note that options is optional.
  • JSDoc text lives in the genkit templates (lroTmpl, waitMethodTmpl); pairs with universe PR #2025988.

Validated: npm run build, lint, typecheck, format:check pass across the workspace; @databricks/sdk-core tests pass.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

Please ensure that the NEXT_CHANGELOG.md file is updated with any relevant changes.
If this is not necessary for your PR, please include the following in your PR description:
NO_CHANGELOG=true
and rerun the job.

## Summary

Regenerates the `apps`, `environments`, and `postgres` clients to pick up the new long-running-operation JSDoc emitted by the genkit generator. The generated surface is otherwise unchanged.

## Why

Bug-bash testers found the LRO call pattern confusing: `await client.createXOperation(req)` returns a handle and `await op.wait()` polls it to completion, but the generated `createXOperation` factory method had no JSDoc, so the two-step relationship was invisible at the call site and `op.wait(undefined)` looked mandatory. The `wait()` signature was already `wait(options?: LroOptions)`, so a no-argument `op.wait()` already compiled — only the discoverability was missing.

## What changed

### Interface changes

None. No signatures change; `wait()` was already `wait(options?: LroOptions)`.

### Behavioral changes

None. This is a docs-only regeneration. Each `createXOperation` / `deleteXOperation` / `updateXOperation` / `undeleteXOperation` factory now carries a concise JSDoc describing the start/poll pattern with a no-argument `await op.wait()` example, and each `wait()` JSDoc notes that `options` is optional.

### Internal changes

Regenerated `packages/{apps,environments,postgres}/src/v1/client.ts` from the shared descriptor. Pairs with the universe genkit generator change in `openapi/genkit/codegen/sdkjs/method.go` (`lroTmpl` and `waitMethodTmpl`); the JSDoc text lives in that template, not hand-written here.

## How is this tested?

`npm run build`, `npm run lint`, `npm run typecheck`, and `npm run format:check` all pass across the workspace; `npm test` for `@databricks/sdk-core` passes (357 tests). The generated packages have no test suites of their own.

Co-authored-by: Isaac
@parthban-db parthban-db force-pushed the parthban-db/stack/bugbash-bug14-lro-wait branch from 5bccec1 to 35d772b Compare June 4, 2026 13:04
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