Skip to content

Commit

Permalink
Merge branch 'main' into dbt-constraints-bigquery
Browse files Browse the repository at this point in the history
  • Loading branch information
sungchun12 authored Jan 31, 2023
2 parents 725c283 + 8339a03 commit 2d0ab85
Show file tree
Hide file tree
Showing 126 changed files with 788 additions and 2,213 deletions.
10 changes: 8 additions & 2 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
[bumpversion]
current_version = 1.4.0b1
current_version = 1.5.0a1
parse = (?P<major>\d+)
\.(?P<minor>\d+)
\.(?P<patch>\d+)
((?P<prerelease>a|b|rc)(?P<num>\d+))?
((?P<prerelease>a|b|rc)
(?P<num>\d+) # pre-release version num
)(\.(?P<nightly>[a-z..0-9]+)
)?
serialize =
{major}.{minor}.{patch}{prerelease}{num}.{nightly}
{major}.{minor}.{patch}{prerelease}{num}
{major}.{minor}.{patch}
commit = False
Expand All @@ -22,6 +26,8 @@ values =
[bumpversion:part:num]
first_value = 1

[bumpversion:part:nightly]

[bumpversion:file:setup.py]

[bumpversion:file:dbt/adapters/bigquery/__version__.py]
1 change: 1 addition & 0 deletions .changes/0.0.0.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## Previous Releases
For information on prior major and minor releases, see their changelogs:
* [1.4](https://github.com/dbt-labs/dbt-bigquery/blob/1.4.latest/CHANGELOG.md)
- [1.3](https://github.com/dbt-labs/dbt-bigquery/blob/1.3.latest/CHANGELOG.md)
- [1.2](https://github.com/dbt-labs/dbt-bigquery/blob/1.2.latest/CHANGELOG.md)
- [1.1](https://github.com/dbt-labs/dbt-bigquery/blob/1.1.latest/CHANGELOG.md)
Expand Down
18 changes: 0 additions & 18 deletions .changes/1.4.0-b1.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changes/1.4.0/Dependencies-20221010-181501.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions .changes/1.4.0/Features-20220807-164227.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions .changes/1.4.0/Features-20220926-105700.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions .changes/1.4.0/Features-20221020-223914.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions .changes/1.4.0/Fixes-20221019-115618.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions .changes/1.4.0/Fixes-20221026-192327.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions .changes/1.4.0/Under the Hood-20221207-103505.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions .changes/1.4.0/Under the Hood-20221207-151813.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions .changes/unreleased/Dependencies-20221213-135331.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions .changes/unreleased/Features-20220823-085601.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions .changes/unreleased/Features-20221119-115200.yaml

This file was deleted.

7 changes: 7 additions & 0 deletions .changes/unreleased/Fixes-20230125-174159.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Fixes
body: Use IEC standard abbreviations (GiB, TiB, etc)
time: 2023-01-25T17:41:59.921173-07:00
custom:
Author: dbeatty10
Issue: "477"
PR: "477"
7 changes: 0 additions & 7 deletions .changes/unreleased/Under the Hood-20220805-165120.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions .changes/unreleased/Under the Hood-20221219-212421.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions .changes/unreleased/Under the Hood-20221221-124711.yaml

This file was deleted.

3 changes: 1 addition & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,10 @@ jobs:
uses: actions/setup-python@v4.3.0
with:
python-version: ${{ matrix.python-version }}

- name: Install python dependencies
run: |
python -m pip install --user --upgrade pip
python -m pip install --upgrade wheel
python -m pip install --upgrade wheel setuptools twine check-wheel-contents
python -m pip --version
- uses: actions/download-artifact@v2
with:
Expand Down
109 changes: 109 additions & 0 deletions .github/workflows/nightly-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# **what?**
# Nightly releases to GitHub and PyPI. This workflow produces the following outcome:
# - generate and validate data for night release (commit SHA, version number, release branch);
# - pass data to release workflow;
# - night release will be pushed to GitHub as a draft release;
# - night build will be pushed to test PyPI;
#
# **why?**
# Ensure an automated and tested release process for nightly builds
#
# **when?**
# This workflow runs on schedule or can be run manually on demand.

name: Nightly Test Release to GitHub and PyPI

on:
workflow_dispatch: # for manual triggering
schedule:
- cron: 0 9 * * *

permissions:
contents: write # this is the permission that allows creating a new release

defaults:
run:
shell: bash

env:
RELEASE_BRANCH: "main"

jobs:
aggregate-release-data:
runs-on: ubuntu-latest

outputs:
commit_sha: ${{ steps.resolve-commit-sha.outputs.release_commit }}
version_number: ${{ steps.nightly-release-version.outputs.number }}
release_branch: ${{ steps.release-branch.outputs.name }}

steps:
- name: "Checkout ${{ github.repository }} Branch ${{ env.RELEASE_BRANCH }}"
uses: actions/checkout@v3
with:
ref: ${{ env.RELEASE_BRANCH }}

- name: "Resolve Commit To Release"
id: resolve-commit-sha
run: |
commit_sha=$(git rev-parse HEAD)
echo "release_commit=$commit_sha" >> $GITHUB_OUTPUT
- name: "Get Current Version Number"
id: version-number-sources
run: |
current_version=`awk -F"current_version = " '{print $2}' .bumpversion.cfg | tr '\n' ' '`
echo "current_version=$current_version" >> $GITHUB_OUTPUT
- name: "Audit Version And Parse Into Parts"
id: semver
uses: dbt-labs/actions/parse-semver@v1.1.0
with:
version: ${{ steps.version-number-sources.outputs.current_version }}

- name: "Get Current Date"
id: current-date
run: echo "date=$(date +'%m%d%Y')" >> $GITHUB_OUTPUT

- name: "Generate Nightly Release Version Number"
id: nightly-release-version
run: |
number="${{ steps.semver.outputs.version }}.dev${{ steps.current-date.outputs.date }}+nightly"
echo "number=$number" >> $GITHUB_OUTPUT
- name: "Audit Nightly Release Version And Parse Into Parts"
uses: dbt-labs/actions/parse-semver@v1.1.0
with:
version: ${{ steps.nightly-release-version.outputs.number }}

- name: "Set Release Branch"
id: release-branch
run: |
echo "name=${{ env.RELEASE_BRANCH }}" >> $GITHUB_OUTPUT
log-outputs-aggregate-release-data:
runs-on: ubuntu-latest
needs: [aggregate-release-data]

steps:
- name: "[DEBUG] Log Outputs"
run: |
echo commit_sha : ${{ needs.aggregate-release-data.outputs.commit_sha }}
echo version_number: ${{ needs.aggregate-release-data.outputs.version_number }}
echo release_branch: ${{ needs.aggregate-release-data.outputs.release_branch }}
release-github-pypi:
needs: [aggregate-release-data]

uses: ./.github/workflows/release.yml
with:
sha: ${{ needs.aggregate-release-data.outputs.commit_sha }}
target_branch: ${{ needs.aggregate-release-data.outputs.release-branch }}
version_number: ${{ needs.aggregate-release-data.outputs.version_number }}
build_script_path: "scripts/build-dist.sh"
env_setup_script_path: "scripts/env-setup.sh"
s3_bucket_name: "core-team-artifacts"
package_test_command: "dbt --version"
test_run: true
nightly_release: true
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/release-branch-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
max-parallel: 1
fail-fast: false
matrix:
branch: [1.0.latest, 1.1.latest, 1.2.latest, main]
branch: [1.0.latest, 1.1.latest, 1.2.latest, 1.3.latest, 1.4.latest, main]
workflow_name: [main.yml, integration.yml]

steps:
Expand Down
Loading

0 comments on commit 2d0ab85

Please sign in to comment.