-
Notifications
You must be signed in to change notification settings - Fork 7
feat: Add Firebolt Core connection support #106
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
Conversation
- Add FireboltCore import from firebolt.client.auth - Modify create_connect_args to detect 'url' parameter for Core connections - Update _determine_auth to return FireboltCore auth when is_core=True - Skip client_id/secret and account_name validation for Core connections - Pass Core URL to SDK via kwargs['url'] - Add comprehensive unit tests for Core connection behavior - Maintain backward compatibility with existing connection patterns Co-Authored-By: [email protected] <[email protected]>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
- Clarify that for Core connections, full URL (scheme, host, port) comes from url parameter - Address GitHub comment feedback about misleading connection string format Co-Authored-By: [email protected] <[email protected]>
- Fix line length violation in firebolt_dialect.py (90 > 88 characters) - Apply isort and black formatting fixes from pre-commit hooks - Ensure code passes flake8 line length requirements Co-Authored-By: [email protected] <[email protected]>
- Break long documentation comment into two lines to meet 88-character limit - All pre-commit checks now pass locally - Unit tests continue to pass (40/40) Co-Authored-By: [email protected] <[email protected]>
… support Co-Authored-By: [email protected] <[email protected]>
- Refactor _determine_auth to accept URL object directly - Add validation for Core connections to reject engine_name, account_name, and credentials - Update existing Core connection tests to use valid format - Add comprehensive tests for Core connection validation errors - Addresses GitHub PR comments for stricter Core connection handling Co-Authored-By: [email protected] <[email protected]>
- Create GitHub workflow for Core integration tests based on firebolt-python-sdk - Add simplified docker-compose.yml without nginx/SSL setup - Add Core configuration file for docker container - Create Core integration test fixtures and test class - Test Core connection, authentication, and simple query execution - Verify Core connections don't require traditional credentials Co-Authored-By: [email protected] <[email protected]>
- Extract Core validation logic into _validate_core_connection method - Extract token cache parsing into _parse_token_cache_flag method - Extract connection kwargs building into _build_connection_kwargs method - Extract account name handling into _handle_account_name method - Extract environment config into _handle_environment_config method - Extract additional parameters building into _build_additional_parameters method - Add proper type annotations to satisfy mypy - Maintain exact same functionality while improving code organization - All unit tests pass (43/43) and pre-commit checks pass Co-Authored-By: [email protected] <[email protected]>
- Explain that url.database maps to engine_name in Firebolt context - Explain that url.host maps to database name in Firebolt context - Address reviewer concerns about validation consistency Co-Authored-By: [email protected] <[email protected]>
- Remove engine_name and account_name validation checks from _validate_core_connection - Keep only credentials validation since FireboltCore auth handles other parameters - Update unit tests to reflect new validation behavior - Address GitHub comment from ptiurin requesting simplified validation Co-Authored-By: [email protected] <[email protected]>
- Add tests to verify SDK handles engine_name parameter validation - Add tests to verify SDK handles account_name parameter validation - Add tests to verify SDK handles invalid URL parameter validation - Demonstrates that SQLAlchemy only validates credentials for Core connections - Other parameters are passed through to SDK for proper validation Addresses GitHub comment requesting integration tests for Core validation Co-Authored-By: [email protected] <[email protected]>
- Handle 'Attempted to call run() from inside a run()' error - Use await_only when already in async context - Note: Async tests still fail due to trio/asyncio incompatibility Co-Authored-By: [email protected] <[email protected]>
…upport' into devin/1751985773-firebolt-core-support
|
ptiurin
left a comment
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.
Tests are passing. Confirmed Superset is working with Core as well.



Add Firebolt Core connection support with dependency update
Summary
This PR adds support for Firebolt Core connections to the SQLAlchemy dialect. Core connections are identified by the presence of a "url" parameter in the connection string and use the
FireboltCoreauthentication class instead of traditional username/password credentials.Key Changes:
create_connect_args()to detect Core connections via "url" parameterFireboltCoreauth support with credential validation (rejects username/password)create_connect_args()into helper methods to reduce cognitive complexitycore-supportbranch tomainbranchReview & Testing Checklist for Human
This is a medium-risk change involving authentication and URL parsing modifications. Please verify:
urlparameterRecommended Test Plan:
firebolt://user:pass@db/engine?account_name=testfirebolt://db?url=http://localhost:3473Diagram
%%{ init : { "theme" : "default" }}%% graph TB setup["setup.cfg<br/>Dependency Update"]:::major-edit dialect["src/firebolt_db/<br/>firebolt_dialect.py<br/>Core Connection Logic"]:::major-edit async_dialect["src/firebolt_db/<br/>firebolt_async_dialect.py<br/>Runtime Error Fix"]:::minor-edit unit_tests["tests/unit/<br/>test_firebolt_dialect.py<br/>Core Unit Tests"]:::major-edit integration_tests["tests/integration/<br/>test_core_integration.py<br/>Core Integration Tests"]:::major-edit setup --> dialect dialect --> async_dialect dialect --> unit_tests dialect --> integration_tests subgraph Legend L1[Major Edit]:::major-edit L2[Minor Edit]:::minor-edit L3[Context/No Edit]:::context end classDef major-edit fill:#90EE90 classDef minor-edit fill:#87CEEB classDef context fill:#FFFFFFNotes
core-supporttomainbranch resolved CI failures and is confirmed workingSession Info: