Skip to content

Conversation

pedroslopez
Copy link
Contributor

@pedroslopez pedroslopez commented Sep 5, 2025

Missed this when doing the last couple updates to manifest-server, so the platform doesn't know about new available options

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 Sep 5, 2025
Copy link

github-actions bot commented Sep 5, 2025

👋 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/openapi-gen#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/openapi-gen

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.

@pedroslopez pedroslopez marked this pull request as ready for review September 5, 2025 20:15
@Copilot Copilot AI review requested due to automatic review settings September 5, 2025 20:15
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR regenerates the OpenAPI specification for the manifest server, adding context support and refining type definitions.

  • Adds optional RequestContext schema with workspace and project IDs for tracing and observability
  • Integrates context field into various request schemas (CheckRequest, DiscoverRequest, ReadRequest, ResolveRequest, SlicesRequest)
  • Refines slice_descriptor type definition to include object type alongside existing string and null types

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

github-actions bot commented Sep 5, 2025

PyTest Results (Fast)

3 742 tests  ±0   3 730 ✅ ±0   6m 31s ⏱️ +10s
    1 suites ±0      12 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit d219d9f. ± Comparison against base commit f946d41.

Copy link
Contributor

coderabbitai bot commented Sep 5, 2025

📝 Walkthrough

Walkthrough

Introduces a new RequestContext schema and adds an optional context field to several request schemas. Broadens StreamReadSlices.slice_descriptor to also accept objects. Updates the Slice Limit section to include the optional context. All changes are in the OpenAPI spec file.

Changes

Cohort / File(s) Summary of Changes
OpenAPI: Request context support
airbyte_cdk/manifest_server/openapi.yaml
- Added RequestContext schema with workspace_id and project_id (string or null).
- Added optional context (RequestContext or null) to: CheckRequest, DiscoverRequest, FullResolveRequest, ResolveRequest, StreamTestReadRequest.
- Added optional context to the Slice Limit section.
- Broadened StreamReadSlices.slice_descriptor to accept object in addition to string and null.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant C as Client
  participant MS as Manifest Server
  participant W as Connector/Worker

  rect rgba(230,245,255,0.6)
  note over C,MS: Requests with optional context
  C->>MS: Check/Discover/Resolve/FullResolve/StreamTestRead (context?)
  alt context provided
    MS->>W: Forward request + context
  else no context
    MS->>W: Forward request (no context)
  end
  W-->>MS: Response
  MS-->>C: Response
  end
Loading
sequenceDiagram
  autonumber
  participant C as Client
  participant MS as Manifest Server

  rect rgba(240,235,255,0.6)
  note over C,MS: Stream read slices input
  C->>MS: StreamReadSlices(slice_descriptor: string|object|null, context?)
  MS-->>C: Slices or error
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Would you like to add brief examples in the spec showing valid context payloads and an object-shaped slice_descriptor to guide clients, wdyt?

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

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 or @coderabbit 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 (7)
airbyte_cdk/manifest_server/openapi.yaml (7)

299-303: Add a short description/example to the new context field (via the generator), wdyt?

Since this file is generated, could we tweak the generator to document the new field for clients? A tiny description + example would clarify usage.

         context:
           anyOf:
             - $ref: '#/components/schemas/RequestContext'
             - type: 'null'
+          description: Optional request-scoped metadata for tracing/observability (not used for auth).
+          example:
+            workspace_id: "00000000-0000-0000-0000-000000000000"
+            project_id: null

337-341: Mirror the context doc/example here too for consistency, wdyt?

Keeping property docs consistent across requests will help SDK consumers.

         context:
           anyOf:
             - $ref: '#/components/schemas/RequestContext'
             - type: 'null'
+          description: Optional request-scoped metadata for tracing/observability (not used for auth).
+          example:
+            workspace_id: "00000000-0000-0000-0000-000000000000"
+            project_id: null

368-372: Document the new context on FullResolveRequest as well, wdyt?

Same rationale as other requests; helps generated SDKs and API readers.

         context:
           anyOf:
             - $ref: '#/components/schemas/RequestContext'
             - type: 'null'
+          description: Optional request-scoped metadata for tracing/observability (not used for auth).
+          example:
+            workspace_id: "00000000-0000-0000-0000-000000000000"
+            project_id: null

472-486: Strengthen RequestContext typing with UUID format and examples, wdyt?

If these are UUIDs in practice, adding format: uuid + examples will improve validation and codegen types. If they are not always UUIDs, ignore.

     RequestContext:
       properties:
         workspace_id:
           anyOf:
-            - type: string
+            - type: string
+              format: uuid
             - type: 'null'
           title: Workspace Id
+          example: "00000000-0000-0000-0000-000000000000"
         project_id:
           anyOf:
-            - type: string
+            - type: string
+              format: uuid
             - type: 'null'
           title: Project Id
+          example: "11111111-1111-1111-1111-111111111111"
       type: object
       title: RequestContext
       description: Optional context information for tracing and observability.

Could both IDs appear simultaneously, or should this be mutually exclusive via oneOf? If mutually exclusive, I can propose the schema tweak, wdyt?


491-495: Add matching context doc/example on ResolveRequest, wdyt?

For parity with other requests.

         context:
           anyOf:
             - $ref: '#/components/schemas/RequestContext'
             - type: 'null'
+          description: Optional request-scoped metadata for tracing/observability (not used for auth).
+          example:
+            workspace_id: "00000000-0000-0000-0000-000000000000"
+            project_id: null

575-579: Widening slice_descriptor to object may break strict clients; confirm downstreams and consider a named schema + description, wdyt?

Clients previously expecting a string may now need to handle objects. Can we confirm consumer readiness and document the object shape (even if open)? Defining a component schema also improves reuse.

       slice_descriptor:
-        anyOf:
-          - type: object
-          - type: string
-          - type: 'null'
-        title: Slice Descriptor
+        anyOf:
+          - $ref: '#/components/schemas/SliceDescriptor'
+          - type: 'null'
+        title: Slice Descriptor
+        description: Identifier for a slice. Historically a string; now may be an object for richer identifiers.
+
+    SliceDescriptor:
+      anyOf:
+        - type: string
+        - type: object
+      title: SliceDescriptor
+      description: String or free-form object describing the slice. Object shape is implementation-defined.

If introducing a new component isn’t desirable in the generator, at least adding the description on the property would help, wdyt?


636-640: Add context doc/example to StreamTestReadRequest for clarity, wdyt?

This request is often used manually; having an inline example helps.

         context:
           anyOf:
             - $ref: '#/components/schemas/RequestContext'
             - type: 'null'
+          description: Optional request-scoped metadata for tracing/observability (not used for auth).
+          example:
+            workspace_id: "00000000-0000-0000-0000-000000000000"
+            project_id: null
📜 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 f946d41 and d219d9f.

📒 Files selected for processing (1)
  • airbyte_cdk/manifest_server/openapi.yaml (6 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). (5)
  • GitHub Check: Check: source-shopify
  • GitHub Check: Pytest (All, Python 3.13, Ubuntu)
  • GitHub Check: Pytest (All, Python 3.11, Ubuntu)
  • GitHub Check: Pytest (All, Python 3.12, Ubuntu)
  • GitHub Check: Pytest (All, Python 3.10, Ubuntu)

@pedroslopez pedroslopez enabled auto-merge (squash) September 5, 2025 20:20
Copy link

github-actions bot commented Sep 5, 2025

PyTest Results (Full)

3 745 tests   3 733 ✅  11m 4s ⏱️
    1 suites     12 💤
    1 files        0 ❌

Results for commit d219d9f.

@pedroslopez pedroslopez merged commit ae0e8aa into main Sep 5, 2025
32 of 33 checks passed
@pedroslopez pedroslopez deleted the pedro/openapi-gen branch September 5, 2025 20:21
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