Regenerate clients with two-step LRO start/poll JSDoc#188
Draft
parthban-db wants to merge 1 commit into
Draft
Conversation
|
Please ensure that the NEXT_CHANGELOG.md file is updated with any relevant changes. |
## 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
5bccec1 to
35d772b
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.
🥞 Stacked PR
Use this link to review incremental changes.
Summary
Regenerates the generated LRO clients so each
create/delete/update/undeleteoperation 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 andawait op.wait()polls it to completion, but the factory methods had no JSDoc, so the two-step relationship was invisible at the call site andop.wait(undefined)looked mandatory.wait()was alreadywait(options?: LroOptions), so a no-argumentop.wait()already compiled — only the discoverability was missing.What changed
client.tsacross all LRO clients with JSDoc on every operation factory describing the start/poll pattern and a no-argumentawait op.wait()example.wait()JSDoc to note thatoptionsis optional.lroTmpl,waitMethodTmpl); pairs with universe PR #2025988.Validated:
npm run build,lint,typecheck,format:checkpass across the workspace;@databricks/sdk-coretests pass.