Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-rogers-dbt authored Dec 4, 2023
2 parents c13d264 + c489332 commit 49b848e
Show file tree
Hide file tree
Showing 14 changed files with 72 additions and 10 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Dependencies-20231109-005623.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: "Dependencies"
body: "Update black requirement from ~=23.10 to ~=23.11"
time: 2023-11-09T00:56:23.00000Z
custom:
Author: dependabot[bot]
PR: 1013
6 changes: 6 additions & 0 deletions .changes/unreleased/Dependencies-20231113-002529.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: "Dependencies"
body: "Update pytest-xdist requirement from ~=3.3 to ~=3.4"
time: 2023-11-13T00:25:29.00000Z
custom:
Author: dependabot[bot]
PR: 1022
6 changes: 6 additions & 0 deletions .changes/unreleased/Dependencies-20231113-002621.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: "Dependencies"
body: "Bump mypy from 1.6.1 to 1.7.0"
time: 2023-11-13T00:26:21.00000Z
custom:
Author: dependabot[bot]
PR: 1023
6 changes: 6 additions & 0 deletions .changes/unreleased/Dependencies-20231116-001342.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: "Dependencies"
body: "Update ddtrace requirement from ~=2.1 to ~=2.2"
time: 2023-11-16T00:13:42.00000Z
custom:
Author: dependabot[bot]
PR: 1028
6 changes: 6 additions & 0 deletions .changes/unreleased/Dependencies-20231127-004827.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: "Dependencies"
body: "Update wheel requirement from ~=0.41 to ~=0.42"
time: 2023-11-27T00:48:27.00000Z
custom:
Author: dependabot[bot]
PR: 1033
6 changes: 6 additions & 0 deletions .changes/unreleased/Dependencies-20231128-005012.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: "Dependencies"
body: "Bump mypy from 1.7.0 to 1.7.1"
time: 2023-11-28T00:50:12.00000Z
custom:
Author: dependabot[bot]
PR: 1034
6 changes: 6 additions & 0 deletions .changes/unreleased/Dependencies-20231128-005103.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: "Dependencies"
body: "Update ddtrace requirement from ~=2.2 to ~=2.3"
time: 2023-11-28T00:51:03.00000Z
custom:
Author: dependabot[bot]
PR: 1035
6 changes: 6 additions & 0 deletions .changes/unreleased/Dependencies-20231129-001523.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: "Dependencies"
body: "Update pytest-xdist requirement from ~=3.4 to ~=3.5"
time: 2023-11-29T00:15:23.00000Z
custom:
Author: dependabot[bot]
PR: 1037
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20231111-150959.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: replace deterministic batch_id with uuid
time: 2023-11-11T15:09:59.243797-08:00
custom:
Author: colin-rogers-dbt
Issue: "1006"
6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20231117-121214.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: Add tests for --empty flag
time: 2023-11-17T12:12:14.643365-05:00
custom:
Author: michelleark
Issue: "1029"
4 changes: 2 additions & 2 deletions dbt/adapters/bigquery/python_submissions.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import uuid
from typing import Dict, Union

from dbt.events import AdapterLogger
Expand Down Expand Up @@ -126,8 +127,7 @@ def _get_job_client(self) -> dataproc_v1.BatchControllerClient:

def _get_batch_id(self) -> str:
model = self.parsed_model
default_batch_id = model["unique_id"].replace(".", "-").replace("_", "-")
default_batch_id += str(int(model["created_at"]))
default_batch_id = str(uuid.uuid4())
return model["config"].get("batch_id", default_batch_id)

def _submit_dataproc_job(self) -> Batch:
Expand Down
10 changes: 5 additions & 5 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@ git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-tests-adapter&subdirectory=

# if version 1.x or greater -> pin to major version
# if version 0.x -> pin to minor
black~=23.10
black~=23.11
bumpversion~=0.6.0
click~=8.1
ddtrace~=2.1
ddtrace~=2.3
flake8~=6.1
flaky~=3.7
freezegun~=1.2
ipdb~=0.13.13
mypy==1.6.1 # patch updates have historically introduced breaking changes
mypy==1.7.1 # patch updates have historically introduced breaking changes
pip-tools~=7.3
pre-commit~=3.5
pre-commit-hooks~=4.5
pytest~=7.4
pytest-csv~=3.0
pytest-dotenv~=0.5.2
pytest-logbook~=1.2
pytest-xdist~=3.3
pytest-xdist~=3.5
pytz~=2023.3
tox~=4.11
types-pytz~=2023.3
types-protobuf~=4.24
types-requests~=2.31
twine~=4.0
wheel~=0.41
wheel~=0.42
5 changes: 5 additions & 0 deletions tests/functional/adapter/empty/test_empty.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from dbt.tests.adapter.empty.test_empty import BaseTestEmpty


class TestBigQueryEmpty(BaseTestEmpty):
pass
3 changes: 0 additions & 3 deletions tests/functional/adapter/test_python_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,6 @@ def model(dbt, spark):
models:
- name: python_array_batch_id
description: A random table with a calculated column defined in python.
config:
batch_id: '{{ run_started_at.strftime("%Y-%m-%d-%H-%M-%S") }}-python-array'
columns:
- name: A
description: Column A
Expand Down Expand Up @@ -216,7 +214,6 @@ def model(dbt, spark):
"""


@pytest.mark.skip(reason="Currently failing as run_started_at is the same across dbt runs")
class TestPythonBatchIdModels:
@pytest.fixture(scope="class")
def models(self):
Expand Down

0 comments on commit 49b848e

Please sign in to comment.