diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 5b7ab89cd..ae2f682fa 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -33,12 +33,12 @@ jobs: steps: - name: Check out code uses: actions/checkout@v2 - + - name: Set up Python 3.7 uses: actions/setup-python@v2 with: python-version: 3.7 - + - name: Install dependencies run: | python -m pip install --upgrade pip @@ -47,8 +47,8 @@ jobs: - name: Determine env variables run: | if [ "${{ inputs.environment }}" == 'staging' ]; then - echo "USERNAME=${{ secrets.FIREBOLT_USERNAME_STAGING }}" >> "$GITHUB_ENV" - echo "PASSWORD=${{ secrets.FIREBOLT_PASSWORD_STAGING }}" >> "$GITHUB_ENV" + echo "USERNAME=${{ secrets.FIREBOLT_CLIENT_ID_STG_NEW_IDN }}" >> "$GITHUB_ENV" + echo "PASSWORD=${{ secrets.FIREBOLT_CLIENT_SECRET_STG_NEW_IDN }}" >> "$GITHUB_ENV" else echo "USERNAME=${{ secrets.FIREBOLT_USERNAME_DEV }}" >> "$GITHUB_ENV" echo "PASSWORD=${{ secrets.FIREBOLT_PASSWORD_DEV }}" >> "$GITHUB_ENV" @@ -59,12 +59,12 @@ jobs: - name: Setup database and engine id: setup - uses: firebolt-db/integration-testing-setup@v1 + uses: firebolt-db/integration-testing-setup@v2 with: - firebolt-username: ${{ env.USERNAME }} - firebolt-password: ${{ env.PASSWORD }} + firebolt-client-id: ${{ secrets.FIREBOLT_CLIENT_ID_STG_NEW_IDN }} + firebolt-client-secret: ${{ secrets.FIREBOLT_CLIENT_SECRET_STG_NEW_IDN }} + account: "developer" api-endpoint: "api.${{ inputs.environment }}.firebolt.io" - region: "us-east-1" - name: Restore cached failed tests id: cache-tests-restore @@ -93,7 +93,7 @@ jobs: path: | .pytest_cache/v/cache/lastfailed key: ${{ steps.cache-tests-restore.outputs.cache-primary-key }} - + - name: Get Allure history uses: actions/checkout@v2 if: always() diff --git a/dbt/adapters/firebolt/connections.py b/dbt/adapters/firebolt/connections.py index 8718e2172..29c3fe1b8 100644 --- a/dbt/adapters/firebolt/connections.py +++ b/dbt/adapters/firebolt/connections.py @@ -14,7 +14,7 @@ from dbt.events import AdapterLogger # type: ignore from dbt.exceptions import DbtRuntimeError from firebolt.client import DEFAULT_API_URL -from firebolt.client.auth import UsernamePassword +from firebolt.client.auth import ClientCredentials from firebolt.db import connect as sdk_connect from firebolt.db.connection import Connection as SDKConnection from firebolt.db.cursor import Cursor @@ -97,7 +97,7 @@ def open(cls, connection: Connection) -> Connection: def connect() -> SDKConnection: handle = sdk_connect( - auth=UsernamePassword(credentials.user, credentials.password), + auth=ClientCredentials(credentials.user, credentials.password), engine_name=credentials.engine_name, database=credentials.database, api_endpoint=credentials.api_endpoint, diff --git a/setup.cfg b/setup.cfg index d90bd9d9f..5b712dc38 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,7 +24,7 @@ project_urls = packages = find_namespace: install_requires = dbt-core~=1.4 - firebolt-sdk>=0.10.0 + firebolt-sdk>=1.1.0 python_requires = >=3.7 include_package_data = True package_dir =