Skip to content

feat(connector): delegate add_resource imports to external Connector#3084

Open
zihengli-bytedance wants to merge 1 commit into
mainfrom
viking-connector-hook
Open

feat(connector): delegate add_resource imports to external Connector#3084
zihengli-bytedance wants to merge 1 commit into
mainfrom
viking-connector-hook

Conversation

@zihengli-bytedance

@zihengli-bytedance zihengli-bytedance commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Description

Opt-in integration that routes add_resource data fetching and parsing to an external Connector service. When Connector integration is enabled and the requested add_type is allowed, OpenViking delegates the import task to Connector. Connector stages source data and calls back into OV through the standard add_resource pipeline, so the existing ingestion flow remains the source of truth.

The integration is disabled by default and falls back to the existing import path when not enabled or when the requested add_type is not configured for Connector.

Changes Made

  • Added ConnectorClient for Connector doc/add and task/info APIs.
  • Added [connector] config for enablement, endpoints, account ID, timeout, polling interval, and allowed add_type values.
  • Routed ResourceService.add_resource through Connector when enabled and allowed.
  • Preserved the standard add-resource path as the default fallback.
  • Added connector_import task tracking and background Connector task polling.
  • Forwarded request API key through RequestContext for Connector callbacks.
  • Added unit tests for Connector client payloads, config validation, routing/fallback behavior, API-key requirement, and task polling success/failure paths.

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this on the following platforms:
    • Linux
    • macOS
    • Windows

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new lint warnings
  • Any dependent changes have been merged and published

Opt-in integration that routes add_resource data fetching and parsing
to external Connector service; the Connector stages source data and
calls back into OV through the standard add_resource pipeline.

- add ConnectorClient wrapping the control plane's inner doc/add and
  task/info endpoints
- add [connector] config section: enable, connector/tracker endpoint
  URLs, main_account_id, timeout_seconds, poll_interval_ms,
  allowed_add_types
- route add_resource via Connector when enabled and args.add_type is
  in allowed_add_types; otherwise fall back to the standard pipeline
  with an info log
- track imports as connector_import TaskRecords and poll Connector
  task status in the background until terminal state or timeout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant