Skip to content

Conversation

pedroslopez
Copy link
Contributor

@pedroslopez pedroslopez commented Aug 27, 2025

I missed generating the openapi spec after the final changes. This regenerates the file using manifest-server generate-openapi

Note: this makes me think we should have some diff checks in CI to ensure the file was generated after changing the manifest server api, but will make an issue / address separately.

Summary by CodeRabbit

  • Chores

    • Aligned test_read response naming without changing its fields.
    • Introduced an explicit pages structure for slice reads and updated related references.
    • Removed the implicit default for the test_read state parameter; clients should provide a value if needed.
  • Documentation

    • Expanded Full Resolve endpoint description to cover dynamic stream generation and Builder UI usage.

Important

Auto-merge enabled.

This PR is set to merge automatically when all requirements are met.

@github-actions github-actions bot added the chore label Aug 27, 2025
Copy link

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

Testing This CDK Version

You can test this version of the CDK using the following:

# Run the CLI from this branch:
uvx 'git+https://github.com/airbytehq/airbyte-python-cdk.git@pedro/gen-openapi#egg=airbyte-python-cdk[dev]' --help

# Update a connector to use the CDK from this branch ref:
cd airbyte-integrations/connectors/source-example
poe use-cdk-branch pedro/gen-openapi

Helpful Resources

PR Slash Commands

Airbyte Maintainers can execute the following slash commands on your PR:

  • /autofix - Fixes most formatting and linting issues
  • /poetry-lock - Updates poetry.lock file
  • /test - Runs connector tests with the updated CDK
  • /poe build - Regenerate git-committed build artifacts, such as the pydantic models which are generated from the manifest JSON schema in YAML.
  • /poe <command> - Runs any poe command in the CDK environment

📝 Edit this welcome message.

Copy link
Contributor

coderabbitai bot commented Aug 27, 2025

📝 Walkthrough

Walkthrough

Renames the public schema StreamRead to StreamReadResponse, adds a new StreamReadPages schema, updates references in StreamReadSlices.pages and the /v1/manifest/test_read 200 response to use these, removes the default for StreamTestReadRequest.state, and expands the Full Resolve endpoint description.

Changes

Cohort / File(s) Change Summary
OpenAPI spec updates
airbyte_cdk/manifest_server/openapi.yaml
- Rename public schema: StreamRead -> StreamReadResponse (same properties)
- Add new public schema: StreamReadPages (records, request?, response?)
- Update StreamReadSlices.pages to use StreamReadPages
- Update /v1/manifest/test_read 200 response to StreamReadResponse
- Remove default value for StreamTestReadRequest.state
- Expand Full Resolve endpoint description

Sequence Diagram(s)

sequenceDiagram
  participant C as Client
  participant S as Manifest Server

  Note over C,S: Test Read flow (updated response schema)

  C->>S: POST /v1/manifest/test_read (StreamTestReadRequest)
  S-->>C: 200 OK (StreamReadResponse)

  Note over S: StreamReadResponse.slices[*].pages[] now use StreamReadPages
  rect rgba(220,240,255,0.5)
    Note right of C: StreamReadPages contains<br/>- records[] (required)<br/>- request (HttpRequest|null)<br/>- response (HttpResponse|null)
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch pedro/gen-openapi

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (4)
airbyte_cdk/manifest_server/openapi.yaml (4)

64-64: Schema rename to StreamReadResponse: verify SDK/codegen impact; consider a deprecated alias?

Renaming the component key/title can be source-breaking for generated clients that relied on StreamRead. Would you consider keeping a deprecated alias to smooth the transition, wdyt?

Example alias (generator-side or post-process) to preserve StreamRead while steering users to the new name:

 components:
   schemas:
+    StreamRead:
+      allOf:
+        - $ref: '#/components/schemas/StreamReadResponse'
+      deprecated: true
+      title: StreamRead (deprecated)

162-168: Nit: use a folded block for the long description for readability

The single-quoted multi-line string is valid YAML, but a folded block reads nicer in diffs and tooling. Want to switch, wdyt?

-      description: 'Fully resolve a manifest, including dynamic streams.
-
-
-        This is a similar operation to resolve, but has an extra step which generates
-        streams from dynamic stream templates if the manifest contains any. This is
-        used when a user clicks the generate streams button on a stream template in
-        the Builder UI'
+      description: >-
+        Fully resolve a manifest, including dynamic streams.
+
+        This is a similar operation to resolve, but has an extra step which
+        generates streams from dynamic stream templates if the manifest contains
+        any. This is used when a user clicks the generate streams button on a
+        stream template in the Builder UI.

469-488: records items are untyped (items: {}); tighten to object for better client generation?

Many generators emit Any for {} which weakens typing. Should we declare records as objects to help consumers, wdyt?

     StreamReadPages:
       properties:
         records:
-          items: {}
+          items:
+            type: object
           type: array
           title: Records

578-581: Removed default for state: confirm server behavior; keep default in spec to avoid client churn?

If the server still treats missing state as [], documenting the default helps client SDKs and preserves prior behavior. Do we want to keep default: [] here, wdyt?

     StreamTestReadRequest:
       properties:
         ...
         state:
           items: {}
           type: array
           title: State
+          default: []
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between e80c173 and 8ef3030.

📒 Files selected for processing (1)
  • airbyte_cdk/manifest_server/openapi.yaml (4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: Check: source-shopify
  • GitHub Check: Check: destination-motherduck
  • GitHub Check: Check: source-hardcoded-records
  • GitHub Check: Check: source-intercom
  • GitHub Check: SDM Docker Image Build
  • GitHub Check: Manifest Server Docker Image Build
  • GitHub Check: Pytest (All, Python 3.11, Ubuntu)
  • GitHub Check: Pytest (All, Python 3.10, Ubuntu)
  • GitHub Check: Pytest (Fast)
  • GitHub Check: Build and Inspect Python Package
🔇 Additional comments (2)
airbyte_cdk/manifest_server/openapi.yaml (2)

534-534: LGTM: title matches component name

Title alignment with StreamReadResponse looks consistent. Nice.


538-541: All clear—no stale StreamRead schema refs detected

I ran the ripgrep checks you suggested and confirmed:

  • No lingering #/components/schemas/StreamRead references anywhere in the repo
  • The new StreamReadPages schema is defined exactly once in openapi.yaml and is referenced only where expected
  • All existing code and tests that reference pages now correctly use StreamReadPages

Looks safe to me—resolving this one!

Copy link

PyTest Results (Fast)

3 762 tests  ±0   3 751 ✅ ±0   7m 6s ⏱️ +31s
    1 suites ±0      11 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 8ef3030. ± Comparison against base commit e80c173.

Copy link

PyTest Results (Full)

3 765 tests  ±0   3 754 ✅ ±0   11m 2s ⏱️ -19s
    1 suites ±0      11 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 8ef3030. ± Comparison against base commit e80c173.

@pedroslopez pedroslopez enabled auto-merge (squash) August 27, 2025 23:14
@pedroslopez pedroslopez merged commit 784bdb3 into main Aug 27, 2025
30 of 31 checks passed
@pedroslopez pedroslopez deleted the pedro/gen-openapi branch August 27, 2025 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant