From 7d87ecb8870cb7a890829ef74a11cd1c8e834773 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] =?UTF-8?q?using=20string=20interpoloation=20to=20gather?= =?UTF-8?q?=20correct=20pointer=20for=20dbt-core=20te=E2=80=A6=20(#80)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Merge `main` into `1.0.latest` (#46) * Slack message for failed nightly runs (#41) * Add Redshift parameter to create tables with backup option specified (#42) * Update impl and adapters to support backup parameter * Add test files * Add test files * Add PR link to Changelog * Add EOF newlines * Debug and split test into two separate cases * Add contributor info Co-authored-by: Jeremy Cohen * Bumping version to 1.0.0rc2 (#45) * Bumping version to 1.0.0rc2 * Update changelog Co-authored-by: Github Build Bot Co-authored-by: Jeremy Cohen Co-authored-by: Dan Bryan Co-authored-by: Jeremy Cohen Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Github Build Bot * [Backport] Bumping version to 1.0.0 (#47) (#48) * Bumping version to 1.0.0 (#47) Co-authored-by: Github Build Bot * Update CHANGELOG.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Github Build Bot * Fix package version (#49) * using string interpoloation to gather correct pointer for dbt-core tests against release branches * created new job for gha to grab correct version of dbt-core to test branch against * minor update * adding Get dbt-core-version step to integration.yaml * modifying version parameters * change for integration testing * updating file * readding pull_request_target now that tests pass * make nit: suggested changes * testing conditional logic in integration.yml * updating test names * creating main.yml versions of new condtional steps for dbt-version gather * trying different version of test v.2 * v.3 of conditional mix of original version of tests and leah logic * adding comment and changelog entry * changes made after review by @VersusFacit and @Kwigley * name change * minor updates * updating name of version ref * name change of dbt-version step to dbt-core-ref to be more descriptive iof where version is coming from * Update test_backup_table_option.py * Update test_backup_table_option.py * reseting file that shouldn't of been changed Co-authored-by: leahwicz <60146280+leahwicz@users.noreply.github.com> Co-authored-by: Dan Bryan Co-authored-by: Jeremy Cohen Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Github Build Bot --- .github/workflows/integration.yml | 13 ++++++++----- .github/workflows/main.yml | 13 ++++++++----- CHANGELOG.md | 3 +++ 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index d98bf91ef..f9b0ef48a 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 88b0c53e7..4958107e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ - Fix table creation statement ordering when including both the BACKUP parameter as well as the dist/sort keys ([#23](https://github.com/dbt-labs/dbt-redshift/issues/60)) - Add unique\_id field to docs generation test catalogs; a follow-on PR to core PR ([#4168](https://github.com/dbt-labs/dbt-core/pull/4618)) and core PR ([#4701](https://github.com/dbt-labs/dbt-core/pull/4701)) +### 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)