From 8d2913d73f3edc77ba31d35ef26d5ee6b4db1e1f Mon Sep 17 00:00:00 2001 From: Matthew McKnight <91097623+McKnight-42@users.noreply.github.com> Date: Mon, 21 Mar 2022 16:56:22 -0500 Subject: [PATCH 1/2] backporting #80 to unstick releases for adapters --- .github/workflows/integration.yml | 13 ++++++++----- .github/workflows/main.yml | 13 ++++++++----- CHANGELOG.md | 7 +++++++ 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 32df2d3ee..b0bcc0765 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -151,7 +151,10 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - + - name: Get dbt-core version + # if this is a pull request uses ref of base branch otherwise uses ref of current commit + id: dbt-core-version + run: echo "::set-output name=dbt-core-ref::${{ github.event_name == 'pull_request_target' && github.base_ref || github.ref }}" - name: Install python dependencies run: | pip install --user --upgrade pip @@ -159,13 +162,13 @@ jobs: pip --version tox --version - - name: Install dbt-core latest + - name: Install dbt-core from branch ${{ steps.dbt-core-version.outputs.dbt-core-ref }} run: | - pip install "git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-core&subdirectory=core" + pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-core-ref }}#egg=dbt-core&subdirectory=core" - - name: Install dbt-postgres latest + - name: Install dbt-postgres from ${{ steps.dbt-core-version.outputs.dbt-core-ref }} run: | - pip install "git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-postgres&subdirectory=plugins/postgres" + pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-core-ref }}#egg=dbt-postgres&subdirectory=plugins/postgres" - name: Run tox (redshift) if: matrix.adapter == 'redshift' diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8026befda..442184738 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -93,7 +93,10 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - + - name: Get dbt-core version + # if this is a pull request uses ref of base branch otherwise uses ref of current commit + id: dbt-core-version + run: echo "::set-output name=dbt-core-ref::${{ github.event_name == 'pull_request' && github.base_ref || github.ref }}" - name: Install python dependencies run: | pip install --user --upgrade pip @@ -101,13 +104,13 @@ jobs: pip --version tox --version - - name: Install dbt-core latest + - name: Install dbt-core from branch ${{ steps.dbt-core-version.outputs.dbt-core-ref }} run: | - pip install "git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-core&subdirectory=core" + pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-core-ref }}#egg=dbt-core&subdirectory=core" - - name: Install dbt-postgres latest + - name: Install dbt-postgres from ${{ steps.dbt-core-version.outputs.dbt-core-ref }} run: | - pip install "git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-postgres&subdirectory=plugins/postgres" + pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-core-ref }}#egg=dbt-postgres&subdirectory=plugins/postgres" - name: Run tox run: tox diff --git a/CHANGELOG.md b/CHANGELOG.md index 79c89375a..bb0e41c4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## dbt-redshift 1.0.1 (TBD) + +### Fixes + +### Under the hood +- install compatible branch of dbt-core in unit/integration tests based on merge target ([#80](https://github.com/dbt-labs/dbt-redshift/pull/80)) + ## dbt-redshift 1.0.0 (December 3, 2021) ## dbt-redshift 1.0.0rc2 (November 24, 2021) From beb244f70e1e355e5f867ab05762638a6bfa27e1 Mon Sep 17 00:00:00 2001 From: Matthew McKnight Date: Thu, 24 Mar 2022 16:03:09 -0500 Subject: [PATCH 2/2] updating dev_requirements and commenting out lines in main.yaml --- .github/workflows/main.yml | 20 ++++++++++---------- dev_requirements.txt | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 442184738..02af66095 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -93,10 +93,10 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - - name: Get dbt-core version - # if this is a pull request uses ref of base branch otherwise uses ref of current commit - id: dbt-core-version - run: echo "::set-output name=dbt-core-ref::${{ github.event_name == 'pull_request' && github.base_ref || github.ref }}" + # - name: Get dbt-core version + # # if this is a pull request uses ref of base branch otherwise uses ref of current commit + # id: dbt-core-version + # run: echo "::set-output name=dbt-core-ref::${{ github.event_name == 'pull_request' && github.base_ref || github.ref }}" - name: Install python dependencies run: | pip install --user --upgrade pip @@ -104,13 +104,13 @@ jobs: pip --version tox --version - - name: Install dbt-core from branch ${{ steps.dbt-core-version.outputs.dbt-core-ref }} - run: | - pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-core-ref }}#egg=dbt-core&subdirectory=core" + # - name: Install dbt-core from branch ${{ steps.dbt-core-version.outputs.dbt-core-ref }} + # run: | + # pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-core-ref }}#egg=dbt-core&subdirectory=core" - - name: Install dbt-postgres from ${{ steps.dbt-core-version.outputs.dbt-core-ref }} - run: | - pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-core-ref }}#egg=dbt-postgres&subdirectory=plugins/postgres" + # - name: Install dbt-postgres from ${{ steps.dbt-core-version.outputs.dbt-core-ref }} + # run: | + # pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-core-ref }}#egg=dbt-postgres&subdirectory=plugins/postgres" - name: Run tox run: tox diff --git a/dev_requirements.txt b/dev_requirements.txt index 8bc97c2ce..1211ad993 100644 --- a/dev_requirements.txt +++ b/dev_requirements.txt @@ -1,7 +1,7 @@ # install latest changes in dbt-core + dbt-postgres # TODO: how to switch from HEAD to x.y.latest branches after minor releases? -git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-core&subdirectory=core -git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-postgres&subdirectory=plugins/postgres +git+https://github.com/dbt-labs/dbt-core.git@1.0.latest#egg=dbt-core&subdirectory=core +git+https://github.com/dbt-labs/dbt-core.git@1.0.latest#egg=dbt-postgres&subdirectory=plugins/postgres bumpversion flake8