-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat: Add Outline Knowledge Base Connector #5180
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
base: main
Are you sure you want to change the base?
Conversation
- Add complete Outline connector with API client and connector implementation - Support both self-hosted and cloud-hosted Outline instances - Implement full indexing and incremental polling functionality - Add comprehensive error handling and validation - Include extensive unit and integration tests - Add improved docstrings for API documentation
Add complete frontend support for Outline knowledge base connector: **Frontend Components:** - Add Outline to ValidSources enum and type system - Create custom Outline SVG icon with brand colors - Add OutlineIcon React component following existing patterns - Configure source metadata for Wiki category with documentation link - Add credential configuration for base URL and API token - Add connector configuration interface **Integration Features:** - Full TypeScript support with OutlineCredentialJson interface - Consistent styling and branding with other connectors - Standard credential form for URL and API token input - Source categorization as Wiki The frontend now supports creating and configuring Outline connectors through the standard Onyx connector creation flow.
@gus-costa is attempting to deploy a commit to the Danswer Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Summary
This PR implements a complete Outline Knowledge Base connector that enables Onyx to index and search content from Outline collaborative documentation platforms. The implementation follows the established connector architecture with both LoadConnector and PollConnector interfaces, supporting full indexing and incremental updates.
The connector consists of several key components:
- Backend Integration: Adds OUTLINE to the DocumentSource enum and connector factory mapping
- API Client: Implements OutlineApiClient with RPC-style API communication, Bearer token authentication, comprehensive error handling, and automatic retry logic with exponential backoff
- Connector Implementation: OutlineConnector class handles document processing, pagination, time-range filtering for polling, and converts both Outline collections and documents into searchable Onyx documents
- Frontend Integration: Complete UI support including OutlineIcon component, SOURCE_METADATA_MAP entry, credential forms, and TypeScript interfaces
- Test Coverage: Comprehensive unit tests for the API client and connector, plus integration tests requiring real Outline credentials
The implementation follows established patterns from similar connectors like BookStack and GitHub, with proper separation of concerns between the HTTP client layer and document processing logic. The connector supports both self-hosted and cloud-hosted Outline instances, handles rate limiting gracefully, and provides detailed error messages for troubleshooting.
Confidence score: 4/5
- This PR is generally safe to merge with minor concerns about error handling specificity in tests
- Score reflects comprehensive implementation following established patterns, but some test logic could be more robust
- Pay close attention to test files that use broad exception handling and integration test reliability
15 files reviewed, 7 comments
backend/tests/unit/onyx/connectors/outline/test_outline_connector.py
Outdated
Show resolved
Hide resolved
backend/tests/unit/onyx/connectors/outline/test_outline_connector.py
Outdated
Show resolved
Hide resolved
backend/tests/unit/onyx/connectors/outline/test_outline_connector.py
Outdated
Show resolved
Hide resolved
Resolve all issues identified in code review: **URL Validation Improvements:** - Enhanced URL validation to reject invalid domain structures - Added explicit check for domains requiring dots (except localhost) - Fixed test to validate URL structure rather than network connectivity - Reduced test execution time from ~14s to ~7s by eliminating unnecessary network attempts **Error Handling Fixes:** - Updated JSON decode error handling to catch specific requests.JSONDecodeError - Fixed unsafe getattr usage with proper null checking to prevent malformed URLs - Added proper validation in URL building methods **Test Quality Improvements:** - Fixed contradictory test comments to match actual behavior - Replaced problematic generator equality comparisons with proper iterable checks - Removed unnecessary infinite loop safety checks by fixing mock configuration - Updated tests to mock outline_client properly for isolated unit testing **Code Quality:** - Fixed all linting issues - All type checking passes without issues - Improved error messages for better user experience All tests pass and the connector now handles edge cases more robustly while providing clearer feedback for configuration errors.
Overview
Implements a complete connector for Outline, a collaborative knowledge base platform. Supports both self-hosted and cloud-hosted instances with full indexing of Collections and Documents.
Key Features
Configuration
Users provide:
https://company.getoutline.com
)Testing
Integration tests require environment variables:
Getting API Credentials
Quality Assurance
Demo
outline-connector.webm
Documentation
Related Issues
/fix #3256
/claim #3256
Summary by cubic
Added a new connector for Outline knowledge base, supporting both self-hosted and cloud-hosted instances with full indexing and incremental polling of collections and documents.