-
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
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
175d4d1
Add Firebolt Core connection support
devin-ai-integration[bot] 5d851f2
fix: Update Core connection documentation format
devin-ai-integration[bot] 1178d40
fix: Address pre-commit formatting and line length issues
devin-ai-integration[bot] faf6e87
fix: Resolve line length violation in documentation comment
devin-ai-integration[bot] 15dad9f
fix: Add firebolt-sdk core-support branch dependency for FireboltCore…
devin-ai-integration[bot] 5b08b27
feat: Add Core connection validation and refactor _determine_auth
devin-ai-integration[bot] 85276bd
feat: Add Core integration test workflow and docker setup
devin-ai-integration[bot] eb3f428
refactor: Reduce cognitive complexity of create_connect_args method
devin-ai-integration[bot] 3337b02
fix additional parameter parsing
ptiurin 11c6ad2
fix tests
ptiurin 71746ca
add core to integration tests
ptiurin d57b5e2
register custom mark
ptiurin 01b4eb4
docs: Add clarifying comments about SQLAlchemy URL structure mapping
devin-ai-integration[bot] ef14caf
refactor: Simplify Core connection validation per PR feedback
devin-ai-integration[bot] 8b2ac55
fix: Apply black formatting to resolve CI code-check failure
devin-ai-integration[bot] 65665b5
feat: Add integration tests for Core SDK validation behavior
devin-ai-integration[bot] 57926be
improve tests
ptiurin d29ac37
fix: Attempt to resolve async dialect event loop conflicts
devin-ai-integration[bot] 500f848
Merge remote-tracking branch 'origin/devin/1751985773-firebolt-core-s…
devin-ai-integration[bot] 7740e63
fix: Update firebolt-sdk dependency to main branch
devin-ai-integration[bot] 23864fe
bump python version
ptiurin f8a4ae1
remove hack
ptiurin 2c23796
skip
ptiurin 433c50a
use released version
ptiurin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "nodes": [ | ||
| { | ||
| "host": "firebolt-core" | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| name: firebolt-core | ||
|
|
||
| services: | ||
| firebolt-core: | ||
| image: ghcr.io/firebolt-db/firebolt-core:${IMAGE_TAG} | ||
| container_name: firebolt-core | ||
| command: --node 0 | ||
| privileged: true | ||
| restart: no | ||
| ulimits: | ||
| memlock: 8589934592 | ||
| ports: | ||
| - 3473:3473 | ||
| volumes: | ||
| - ${BASE_DIR}/.github/resources/core/config.json:/firebolt-core/config.json:ro | ||
| - ${BASE_DIR}/firebolt-core:/firebolt-core/data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| name: Core integration tests | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| tag_version: | ||
| description: 'The docker image tag for the firebolt core' | ||
| required: false | ||
| type: string | ||
| default: 'preview-rc' | ||
| python_version: | ||
| description: 'Python version' | ||
| required: false | ||
| type: string | ||
| default: '3.8' | ||
| workflow_call: | ||
| inputs: | ||
| tag_version: | ||
| description: 'The docker image tag for the firebolt core' | ||
| required: false | ||
| type: string | ||
| default: 'preview-rc' | ||
| python_version: | ||
| description: 'Python version' | ||
| required: false | ||
| type: string | ||
| default: '3.8' | ||
|
|
||
| jobs: | ||
| run-core-integration-tests: | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| DOCKER_COMPOSE_FILE: ${{ github.workspace }}/.github/resources/core/docker-compose.yml | ||
| SERVICE_PORT: 3473 | ||
| SERVICE_URL: http://localhost:3473 | ||
| MAX_RETRIES: 30 | ||
| RETRY_INTERVAL: 2 | ||
| steps: | ||
| - name: Check out code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ inputs.python_version }} | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install ".[dev]" | ||
|
|
||
| - name: Log in to GitHub Container Registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Prepare docker-compose.yml | ||
| run: | | ||
| sed -i "s|\${IMAGE_TAG}|${{ inputs.tag_version }}|g" "$DOCKER_COMPOSE_FILE" | ||
| sed -i "s|\${BASE_DIR}|${{ github.workspace }}|g" "$DOCKER_COMPOSE_FILE" | ||
|
|
||
| - name: Start service container | ||
| run: | | ||
| docker compose -f "$DOCKER_COMPOSE_FILE" up -d | ||
| docker compose -f "$DOCKER_COMPOSE_FILE" ps | ||
|
|
||
| - name: Wait for service to be ready | ||
| run: | | ||
| for i in $(seq 1 $MAX_RETRIES); do | ||
| if curl --silent --fail "$SERVICE_URL" --data-binary "SELECT 1" | grep -q "1"; then | ||
| echo "Service is up and responding!" | ||
| exit 0 | ||
| fi | ||
| echo "Waiting for service... ($i/$MAX_RETRIES)" | ||
| sleep $RETRY_INTERVAL | ||
| done | ||
| echo "Error: Service failed to start within timeout" | ||
| docker compose -f "$DOCKER_COMPOSE_FILE" logs | ||
| exit 1 | ||
|
|
||
| - name: Run Core integration tests | ||
| env: | ||
| CORE_URL: "http://localhost:3473" | ||
| run: | | ||
| pytest -o log_cli=true -o log_cli_level=INFO tests/integration -k "core" --alluredir=allure-results | ||
|
|
||
| - name: Stop container | ||
| if: always() | ||
| run: | | ||
| docker compose -f "$DOCKER_COMPOSE_FILE" down | ||
|
|
||
| # Need to pull the pages branch in order to fetch the previous runs | ||
| - name: Get Allure history | ||
| uses: actions/checkout@v4 | ||
| if: always() | ||
| continue-on-error: true | ||
| with: | ||
| ref: gh-pages | ||
| path: gh-pages | ||
|
|
||
| - name: Allure Report | ||
| uses: firebolt-db/action-allure-report@v1 | ||
| if: always() | ||
| with: | ||
| github-key: ${{ secrets.GITHUB_TOKEN }} | ||
| test-type: integration | ||
| allure-dir: allure-results | ||
| pages-branch: gh-pages | ||
| repository-name: firebolt-sqlalchemy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| [pytest] | ||
| trio_mode = true | ||
| markers = | ||
| core: mark test to run only on Firebolt Core. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.