Skip to content

chore: more reordering and title description updates in declarative_component_schema #570

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

lmossman
Copy link
Contributor

@lmossman lmossman commented May 28, 2025

This PR does some more reordering of fields and anyOf options, and updates to titles of components to make things clearer in the Builder UI.

It also marks JsonFileSchemaLoader as deprecated since I don't believe we want users to see that in the Builder UI. But let me know if you disagree with this decision, as it does mean that any connectors which use that today (seems to be ~9 in the airbyte repo) will have a deprecation message until they are switched to use InlineSchemaLoader.

Summary by CodeRabbit

  • New Features

    • Enhanced datetime cursor configuration with new options for specifying datetime formats and start/end times.
  • Improvements

    • Deprecated the old JSON file schema loader in favor of a more modern alternative.
    • Added clearer titles for certain configuration options to improve usability.
    • Improved flexibility in schema loader configurations, allowing multiple loaders.
  • Other Changes

    • Reordered some configuration options for a more intuitive setup experience.

@lmossman lmossman changed the title Lmossman/more reordering and title description updates design: more reordering and title description updates in declarative_component_schema Jun 9, 2025
@lmossman lmossman marked this pull request as ready for review June 9, 2025 19:05
@Copilot Copilot AI review requested due to automatic review settings June 9, 2025 19:05
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 reorganizes schema definitions for cleaner UI presentation, deprecates the JsonFileSchemaLoader, and adds new datetime-related fields to support flexible cursor and time options.

  • Reordered anyOf entries and updated component titles for improved clarity in the Builder UI
  • Introduced cursor_datetime_formats, start_datetime, end_datetime, and related time-injection options
  • Marked JsonFileSchemaLoader as deprecated in favor of InlineSchemaLoader
Comments suppressed due to low confidence (2)

airbyte_cdk/sources/declarative/declarative_component_schema.yaml:4077

  • [nitpick] The title uses “Http” but elsewhere the acronym is uppercased as “HTTP” (e.g., “HTTP Response Format”). Consider renaming this to “HTTP Components Resolver” for consistency.
    title: Http Components Resolver

airbyte_cdk/sources/declarative/declarative_component_schema.yaml:910

  • New schema properties for cursor and start/end datetime have been added here and below. We should add or update unit/integration tests to validate these fields' presence, formats, and anyOf branches in the schema loader.
      cursor_datetime_formats:

Copy link

github-actions bot commented Jun 9, 2025

PyTest Results (Fast)

3 658 tests  ±0   3 648 ✅ ±0   5m 53s ⏱️ +9s
    1 suites ±0      10 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 457a37a. ± Comparison against base commit 99a1a96.

Copy link
Contributor

coderabbitai bot commented Jun 9, 2025

📝 Walkthrough

Walkthrough

The update reorganizes and enhances the declarative component schema YAML. It consolidates and expands properties for datetime cursors, introduces deprecation messaging for a schema loader, adjusts the order of union types in several definitions, allows arrays for schema loaders, and updates titles for certain components. No core validation logic is changed.

Changes

File(s) Change Summary
airbyte_cdk/sources/declarative/declarative_component_schema.yaml - Reordered union type references in multiple definitions
- Added and consolidated datetime properties in DatetimeBasedCursor
- Allowed array of schema loaders in DeclarativeStream
- Deprecated JsonFileSchemaLoader
- Added title to some components
- Updated titles for decoder properties

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant DeclarativeStream
    participant DatetimeBasedCursor
    participant SchemaLoader

    User->>DeclarativeStream: Configure stream with retriever, schema_loader(s), cursor
    DeclarativeStream->>DatetimeBasedCursor: Use new datetime properties (formats, start/end, options)
    DeclarativeStream->>SchemaLoader: Accept array or single loader (including deprecated types)
Loading

Possibly related PRs

Suggested labels

chore, declarative-component-schema

Suggested reviewers

  • bazarnov (Would you like to add anyone else for a broader schema review, wdyt?)

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. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

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

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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

Documentation and Community

  • 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/sources/declarative/declarative_component_schema.yaml (4)

1434-1442: DeclarativeStream: support multiple schema loaders
Adding an array option for schema_loader enables merging schemas from multiple sources—should we update our spec docs or add an example snippet to illustrate merge precedence? wdyt?


2365-2366: JsonFileSchemaLoader: mark as deprecated
The deprecation flag and message are clear—can we confirm that the Builder UI hides JsonFileSchemaLoader and surfaces migration warnings for existing connectors? wdyt?


4077-4089: HttpComponentsResolver: add title & reorder retriever
Adding title: Http Components Resolver and promoting SimpleRetriever aligns with other resolvers—should we update our reference docs to reflect this new component title? wdyt?


4135-4136: ConfigComponentsResolver: add title
Nice addition of title: Config Components Resolver—would it help to include an example of using multiple StreamConfig entries? wdyt?

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 99a1a96 and 457a37a.

📒 Files selected for processing (1)
  • airbyte_cdk/sources/declarative/declarative_component_schema.yaml (14 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: Check: 'source-pokeapi' (skip=false)
  • GitHub Check: Check: 'source-amplitude' (skip=false)
  • GitHub Check: Check: 'source-shopify' (skip=false)
  • GitHub Check: Check: 'source-hardcoded-records' (skip=false)
  • GitHub Check: Pytest (Fast)
  • GitHub Check: SDM Docker Image Build
  • GitHub Check: Pytest (All, Python 3.10, Ubuntu)
  • GitHub Check: Pytest (All, Python 3.11, Ubuntu)
🔇 Additional comments (9)
airbyte_cdk/sources/declarative/declarative_component_schema.yaml (9)

303-304: SelectiveAuthenticator: reorder authenticators list
We moved CustomAuthenticator before NoAuth to surface custom code options earlier in the UI—did we confirm the Builder enumeration respects this new order? wdyt?


910-953: DatetimeBasedCursor: added flexible datetime properties
Great consolidation of cursor options with cursor_datetime_formats, start_datetime, start_time_option, end_datetime, and end_time_option. Have we ensured the required fields list still matches expectations (e.g., only start_datetime remains mandatory)? wdyt?


1458-1458: DeclarativeStream: move CustomTransformation last
Custom transformations now appear at the end of the list for better UX—looks good. Have we validated the UI rendering order aligns here? wdyt?


2321-2323: DynamicSchemaLoader: prioritize SimpleRetriever first
Reordering puts SimpleRetriever at the top—this mirrors the DeclarativeStream change. Can we double-check the underlying generator logic uses this new order? wdyt?


2343-2343: DynamicSchemaLoader: move CustomTransformation last
Custom transformations landing last improves discoverability of built-ins—looks consistent with other lists.👍


1694-1698: DefaultErrorHandler: defer CustomBackoffStrategy to the end
Custom backoff now appears last in backoff_strategies—nice for surfacing defaults first. All good here? wdyt?


3966-3969: GroupingPartitionRouter: move CustomPartitionRouter last
Ensures built-in routers appear first, with custom hooks available at the end—makes sense. Have we added a migration note for connectors if they relied on the previous index order? wdyt?


3769-3772: AsyncRetriever: rename decoder title
Changing decoder to HTTP Response Format improves clarity—have we verified this label in the UI matches other retriever components? wdyt?


3781-3783: AsyncRetriever: rename download_decoder title
Updating download_decoder to Download HTTP Response Format is consistent—can we confirm the UI field tooltip updated accordingly? wdyt?

Copy link

github-actions bot commented Jun 9, 2025

PyTest Results (Full)

3 661 tests  ±0   3 651 ✅ ±0   17m 13s ⏱️ +3s
    1 suites ±0      10 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 457a37a. ± Comparison against base commit 99a1a96.

@lmossman lmossman changed the title design: more reordering and title description updates in declarative_component_schema chore: more reordering and title description updates in declarative_component_schema Jun 9, 2025
Copy link
Contributor

@aldogonzalez8 aldogonzalez8 left a comment

Choose a reason for hiding this comment

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

APPROVED
Reordering and new titles make sense to me.

@lmossman lmossman merged commit e44362a into main Jun 9, 2025
30 of 32 checks passed
@lmossman lmossman deleted the lmossman/more-reordering-and-title-description-updates branch June 9, 2025 20:17
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