Skip to content

Feat: connector go discord - #18343

Closed
mkaaad wants to merge 8 commits into
infiniflow:mainfrom
mkaaad:feat/connector-go-discord
Closed

mkaaad wants to merge 8 commits into
infiniflow:mainfrom
mkaaad:feat/connector-go-discord

Conversation

@mkaaad

@mkaaad mkaaad commented Aug 17, 2026

Copy link
Copy Markdown
Member

No description provided.

@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. 💞 feature Feature request, pull request that fullfill a new feature. labels Aug 17, 2026
@mkaaad mkaaad closed this Aug 17, 2026
@coderabbitai

coderabbitai Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 485386dd-af40-4cdc-a096-4342c92c4598

📥 Commits

Reviewing files that changed from the base of the PR and between c6ba54b and 31b4281.

📒 Files selected for processing (8)
  • internal/handler/connector.go
  • internal/handler/connector_test.go
  • internal/syncer/connector/discord.go
  • internal/syncer/connector/discord_test.go
  • internal/syncer/connector/rest_api.go
  • internal/syncer/connector/rest_api_test.go
  • internal/syncer/prune_runner.go
  • internal/syncer/syncer.go

📝 Walkthrough

Walkthrough

The PR adds REST API and Discord connectors with validation, authentication, pagination, document conversion, pruning, retries, and resumable checkpoints. It registers both connectors and updates runtime handling for connector-specific errors and unsupported pruning.

Changes

Connector platform

Layer / File(s) Summary
REST connector contract and security
internal/syncer/connector/rest_api.go, internal/syncer/connector/rest_api_test.go
Adds REST configuration, credentials, validation, authentication, SSRF protection, field extraction, and document conversion.
REST fetching and resumable synchronization
internal/syncer/connector/rest_api.go, internal/syncer/connector/rest_api_test.go
Adds HTTP retries, redirects, pagination, time filtering, document batching, and page-boundary checkpoint resume behavior.
Discord synchronization and pruning
internal/syncer/connector/discord.go, internal/syncer/connector/discord_test.go
Adds Discord target discovery, message retrieval, rate-limit retries, filtering, document merging, checkpoints, and slim-document pruning.
Connector registration and runtime error handling
internal/syncer/syncer.go, internal/syncer/prune_runner.go, internal/handler/connector.go, internal/handler/connector_test.go
Registers the new connectors, maps connector validation errors to data errors, and completes unsupported prune operations as successful no-ops.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related PRs

Suggested reviewers: haruko386

Poem

I’m a rabbit with a checkpoint pack,
Hopping through Discord and REST out back.
Pages turn, messages flow,
Errors take the paths they know.
Slim docs prune, fresh batches grow—
Sync complete beneath the moonlit glow. 🐇

Sequence Diagram(s)

sequenceDiagram
  participant Syncer
  participant RestAPIConnector
  participant HTTPAPI
  participant SyncSession
  Syncer->>RestAPIConnector: OpenSync
  RestAPIConnector->>SyncSession: Create resumable session
  SyncSession->>HTTPAPI: Fetch paginated JSON
  HTTPAPI-->>SyncSession: Return page data
  SyncSession->>Syncer: Emit document batch and checkpoint
Loading

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💞 feature Feature request, pull request that fullfill a new feature. size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant