Skip to content

Add documentation for prefect sdk generate CLI#1

Open
tomerqodo wants to merge 8 commits into
cursor_full_base_add_documentation_for_prefect_sdk_generate_cli_pr1from
cursor_full_head_add_documentation_for_prefect_sdk_generate_cli_pr1
Open

Add documentation for prefect sdk generate CLI#1
tomerqodo wants to merge 8 commits into
cursor_full_base_add_documentation_for_prefect_sdk_generate_cli_pr1from
cursor_full_head_add_documentation_for_prefect_sdk_generate_cli_pr1

Conversation

@tomerqodo

@tomerqodo tomerqodo commented Jan 26, 2026

Copy link
Copy Markdown

Benchmark PR from agentic-review-benchmarks#1


Note

Adds documentation and CLI reference for generating a typed SDK from deployments

  • New Advanced guide v3/advanced/generate-custom-sdk with usage examples (filters, options, infra overrides, async) and regeneration guidance
  • New CLI reference page v3/api-ref/cli/sdk and navigation updates (docs.json) to surface the prefect sdk generate command under Advanced → Deployments and CLI Reference

SDK fetcher tweaks

  • Add debug logging before authentication check
  • Simplify extraction of work pool job variable schema
  • Remove strict=True from parallel work pool fetch zipping
  • Refine deployment name filtering to support short and full names consistently

Written by Cursor Bugbot for commit 37e272d. Configure here.

desertaxle and others added 8 commits January 25, 2026 12:09
- Add auto-generated CLI reference for `prefect sdk` command
- Add how-to guide for generating typed SDKs from deployments
- Update navigation in docs.json for both new pages
- Regenerate CLI docs to include new --output options

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Keep only sdk.mdx from the CLI docs regeneration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The code examples reference a hypothetical my_sdk module that
doesn't exist, so they can't be executed as tests.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove marketing-style "before/after" section
- Use sentence case headers
- Task-oriented organization (CLI then Python)
- Add opening context and further reading links
- Direct, instructional tone throughout

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove marketing-style "before/after" section
- Use sentence case headers
- Task-oriented organization (CLI then Python)
- Add opening context and further reading links
- Direct, instructional tone throughout

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Move generate-custom-sdk.mdx to docs/v3/advanced/
- Create new "Deployments" group in Advanced section
- Move form-building guide to new Deployments group
- Both guides relate to deployment configuration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

# If filtering by deployment name, check the full name matches
full_name = f"{flow_name}/{dep.name}"
if deployment_names and full_name not in deployment_names:
if deployment_names and dep.name not in deployment_names:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deployment filter change breaks short name ambiguity warnings

Medium Severity

The condition was changed from full_name not in deployment_names to dep.name not in deployment_names. When users specify a short deployment name like "production" in deployment_names, the new condition evaluates to False (since dep.name equals the short name), causing the if-block to be skipped entirely. This means short_name_matches is never populated, so the ambiguity warning for deployments with the same short name across different flows will never be generated. The original logic correctly entered the matching block to track short names for warning purposes.

Fix in Cursor Fix in Web

variables = base_job_template["variables"]
if isinstance(variables, dict):
job_vars_schema = variables
job_vars_schema = base_job_template["variables"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed type check allows non-dict values to crash renderer

Low Severity

The isinstance(variables, dict) type check was removed when extracting job_variables_schema from base_job_template["variables"]. The original code ensured only dict values were assigned; otherwise, job_vars_schema remained as the safe default empty dict. The new code assigns whatever value is present. If the API returns a truthy non-dict value (e.g., a non-empty string or list), the renderer's schema.get("properties") call at line 272 will raise an AttributeError since only dicts have a .get() method.

Fix in Cursor Fix in Web

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.

2 participants