Skip to content

Commit

Permalink
Merge branch 'dev/grace-kelly' into dev/stephen-girard
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Beck committed Nov 29, 2018
2 parents 6529c3e + 8af3061 commit 1c0caf9
Show file tree
Hide file tree
Showing 58 changed files with 1,533 additions and 381 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.12.0
current_version = 0.12.1
parse = (?P<major>\d+)
\.(?P<minor>\d+)
\.(?P<patch>\d+)
Expand Down
56 changes: 13 additions & 43 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,113 +1,83 @@
version: 2
jobs:
unit:
docker: &py36_postgres
- image: python:3.6
docker: &test_and_postgres
- image: fishtownjacob/test-container
- image: postgres
name: database
environment: &pgenv
POSTGRES_USER: "root"
POSTGRES_PASSWORD: "password"
POSTGRES_DB: "dbt"
steps:
- checkout
- run: apt-get update && apt-get install -y python-dev python3-dev postgresql
- run: echo 127.0.0.1 database | tee -a /etc/hosts
- run: pip install virtualenvwrapper tox
- run: &setupdb
name: Setup postgres
command: bash test/setup_db.sh
environment:
PGHOST: 127.0.0.1
PGHOST: database
PGUSER: root
PGPASSWORD: password
PGDATABASE: postgres
- run: tox -e pep8,unit-py27,unit-py36
integration-postgres-py36:
docker: *py36_postgres
docker: *test_and_postgres
steps:
- checkout
- run: apt-get update && apt-get install -y python3-dev postgresql
- run: echo 127.0.0.1 database | tee -a /etc/hosts
- run: pip install virtualenvwrapper tox
- run: *setupdb
- run:
name: Run tests
command: tox -e integration-postgres-py36
integration-snowflake-py36:
docker: &py36
- image: python:3.6
docker: &test_only
- image: fishtownjacob/test-container
steps:
- checkout
- run: apt-get update && apt-get install -y python3-dev
- run: echo 127.0.0.1 database | tee -a /etc/hosts
- run: pip install virtualenvwrapper tox
- run:
name: Run tests
command: tox -e integration-snowflake-py36
no_output_timeout: 1h
integration-redshift-py36:
docker: *py36
docker: *test_only
steps:
- checkout
- run: apt-get update && apt-get install -y python3-dev postgresql
- run: echo 127.0.0.1 database | tee -a /etc/hosts
- run: pip install virtualenvwrapper tox
- run:
name: Run tests
command: tox -e integration-redshift-py36
integration-bigquery-py36:
docker: *py36
docker: *test_only
steps:
- checkout
- run: apt-get update && apt-get install -y python3-dev
- run: echo 127.0.0.1 database | tee -a /etc/hosts
- run: pip install virtualenvwrapper tox
- run:
name: Run tests
command: tox -e integration-bigquery-py36
integration-postgres-py27:
docker: &py27_postgres
- image: python:2.7
- image: postgres
environment: *pgenv
docker: *test_and_postgres
steps:
- checkout
- run: apt-get update && apt-get install -y python-dev postgresql
- run: echo 127.0.0.1 database | tee -a /etc/hosts
- run: pip install virtualenvwrapper tox
- run: *setupdb
- run:
name: Run tests
command: tox -e integration-postgres-py27
integration-snowflake-py27:
docker: &py27
- image: python:2.7
docker: *test_only
steps:
- checkout
- run: apt-get update && apt-get install -y python-dev
- run: echo 127.0.0.1 database | tee -a /etc/hosts
- run: pip install virtualenvwrapper tox
- run:
name: Run tests
command: tox -e integration-snowflake-py27
no_output_timeout: 1h
integration-redshift-py27:
docker: *py27
docker: *test_only
steps:
- checkout
- run: apt-get update && apt-get install -y python-dev postgresql
- run: echo 127.0.0.1 database | tee -a /etc/hosts
- run: pip install virtualenvwrapper tox
- run:
name: Run tests
command: tox -e integration-redshift-py27
integration-bigquery-py27:
docker: *py27
docker: *test_only
steps:
- checkout
- run: apt-get update && apt-get install -y python-dev
- run: echo 127.0.0.1 database | tee -a /etc/hosts
- run: pip install virtualenvwrapper tox
- run:
name: Run tests
command: tox -e integration-bigquery-py27
Expand Down
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
## dbt 0.12.0 - Guion Bluford (Currently Unreleased)
## dbt 0.12.1 - (November 15, 2018)

### Overview

This is a bugfix release.

### Fixes

- Fix for relation caching when views outside of a dbt schema depend on relations inside of a dbt schema ([#1119](https://github.com/fishtown-analytics/dbt/issues/1119))


## dbt 0.12.0 - Guion Bluford (November 12, 2018)

### Overview

Expand Down
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
FROM python:3.6

RUN apt-get update

RUN apt-get install -y python-pip netcat
RUN apt-get install -y python-dev python3-dev
# do these on one line so changes trigger apt-get update
RUN apt-get update && \
apt-get install -y python-pip netcat python-dev python3-dev postgresql

RUN pip install pip --upgrade
RUN pip install virtualenv
RUN pip install virtualenvwrapper
RUN pip install tox

RUN useradd -mU dbt_test_user
USER dbt_test_user

WORKDIR /usr/src/app
RUN cd /usr/src/app
8 changes: 6 additions & 2 deletions dbt/adapters/bigquery/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
'timeout_seconds': {
'type': 'integer',
},
'location': {
'type': 'string',
},
},
'required': ['method', 'project', 'schema'],
}
Expand Down Expand Up @@ -124,8 +127,9 @@ def get_bigquery_credentials(cls, profile_credentials):
def get_bigquery_client(cls, profile_credentials):
project_name = profile_credentials.project
creds = cls.get_bigquery_credentials(profile_credentials)

return google.cloud.bigquery.Client(project_name, creds)
location = getattr(profile_credentials, 'location', None)
return google.cloud.bigquery.Client(project_name, creds,
location=location)

@classmethod
def open(cls, connection):
Expand Down
Loading

0 comments on commit 1c0caf9

Please sign in to comment.