Compare commits

...

364 Commits

Author SHA1 Message Date
Github Build Bot
4a97996760 Bumping version to 1.10.16 and generate changelog 2025-12-16 16:19:19 +00:00
github-actions[bot]
211cca2560 Allow dbt deps to run when vars lack defaults in dbt_project.yml (#12171) (#12221) 2025-11-27 17:52:36 -06:00
Quigley Malcolm
6949e4c0cb Fix generation of deprecations summary (#12202) (#12211)
Co-authored-by: Andrey Siunov <asiunov@users.noreply.github.com>
2025-11-26 09:46:51 -06:00
github-actions[bot]
2c6a06a015 Stop emitting NoNodesForSelectionCriteria three times during build command (#12204) (#12208)
* Add test checking that `NoNodesForSelectionCriteria` is only fired once per invocation

* Stop emitting `NoNodesForSelectionCriteria` three times during `build` command

* update changelog

---------


(cherry picked from commit bca2211246)

Co-authored-by: Quigley Malcolm <QMalcolm@users.noreply.github.com>
Co-authored-by: Michelle Ark <MichelleArk@users.noreply.github.com>
2025-11-25 13:55:24 -06:00
github-actions[bot]
3e416b4312 [Backport 1.10.latest] Validate {{ config }} in SQL for models that don't statically parse (#12056) 2025-11-19 12:15:28 -05:00
FishtownBuildBot
4a3a98495b [Automated] Merged prep-release/1.10.15_19309413363 into target 1.10.latest during release process 2025-11-12 15:06:50 -05:00
Github Build Bot
022accc0b8 Bumping version to 1.10.15 and generate changelog 2025-11-12 19:31:19 +00:00
github-actions[bot]
459f61ce9a add dbt/jsonschemas to recursive-include (#12126) (#12163) 2025-11-12 13:05:27 -05:00
FishtownBuildBot
30da285b3a [Automated] Merged prep-release/1.10.14_19243408641 into target 1.10.latest during release process 2025-11-10 14:56:10 -05:00
Github Build Bot
75efbb7cc5 Bumping version to 1.10.14 and generate changelog 2025-11-10 19:22:52 +00:00
Michelle Ark
d5a22b4754 pin adapters to last 3.9 python support in dev-requirements (#12138) 2025-11-04 11:34:23 -05:00
Michelle Ark
95dfbc2cd4 Manual backport of deb2f3e (#12125) 2025-10-29 10:56:37 -04:00
github-actions[bot]
bbe3a74772 Fix schema file patch collection (#12055) (#12060)
(cherry picked from commit 963251df4e)

Co-authored-by: Gerda Shank <gerda@dbtlabs.com>
2025-09-29 16:45:01 -04:00
FishtownBuildBot
12cd79dcfb [Automated] Merged prep-release/1.10.13_18019090648 into target 1.10.latest during release process 2025-09-25 16:29:25 -04:00
Github Build Bot
28e0650d48 Bumping version to 1.10.13 and generate changelog 2025-09-25 19:57:56 +00:00
github-actions[bot]
767f18e4f6 propagate meta/tags on columns to top-level and config (#11992) (#12017) 2025-09-16 11:08:36 -04:00
github-actions[bot]
8e2d5ac3de skip initial render of loaded_at_query when specified as config (#12010) (#12014) 2025-09-15 12:51:55 -04:00
github-actions[bot]
a7c06a5fa4 manifest schema upgrade framework for state:modified (#11945) (#12009) 2025-09-15 11:23:43 -04:00
github-actions[bot]
2e7fbcd4cf dbt-semantic-interfaces>=0.9.0 (#12005) (#12007) 2025-09-11 14:54:30 -04:00
FishtownBuildBot
6ae4d710db [Automated] Merged prep-release/1.10.12_17624434872 into target 1.10.latest during release process 2025-09-10 15:52:01 -04:00
Github Build Bot
e5ae47949a Bumping version to 1.10.12 and generate changelog 2025-09-10 19:20:08 +00:00
github-actions[bot]
8805063d91 Add catalogs.yml parsing to parse, test, and snapshot (#12002) (#12003) 2025-09-10 15:16:24 -04:00
Michelle Ark
77243436c9 implement checked_agg_time_dimension_for_simple_metric on SemanticModel (#11995) (#12000) 2025-09-10 13:04:53 -04:00
FishtownBuildBot
3b0fb7be9d [Automated] Merged prep-release/1.10.11_17472889431 into target 1.10.latest during release process 2025-09-04 14:48:59 -04:00
Github Build Bot
7d7d64ed67 Bumping version to 1.10.11 and generate changelog 2025-09-04 18:15:41 +00:00
github-actions[bot]
6dcda11022 update to latest jsonschemas (#11987) (#11989) 2025-09-04 10:20:19 -04:00
Michelle Ark
7fa1385c85 Support quoting.snowflake_ignore_case (#11942) (#11988) 2025-09-04 10:06:50 -04:00
FishtownBuildBot
3dc933f4f7 [Automated] Merged prep-release/1.10.10_17303670015 into target 1.10.latest during release process 2025-08-28 14:18:55 -04:00
Github Build Bot
0f61151f90 Bumping version to 1.10.10 and generate changelog 2025-08-28 17:46:41 +00:00
Quigley Malcolm
c9809d2d0c Avoid redundant node patch removal during partial parsing (#11887) (#11971)
* Avoid redundant node patch removal during partial parsing

* Changelog entry

---------

Co-authored-by: Adolfo Rodriguez <correo.de.adolfo@gmail.com>
Co-authored-by: Doug Beatty <44704949+dbeatty10@users.noreply.github.com>
2025-08-28 11:31:49 -05:00
Quigley Malcolm
065e3a5a03 Default parse-time nodes' raw_code property to "" (empty string) to comply with strict str type (#11884) (#11970)
* Default parse-time nodes' raw_code property to "" (empty string) to comply with strict str type

* Changelog entry

---------

Co-authored-by: Adolfo Rodriguez <correo.de.adolfo@gmail.com>
Co-authored-by: Doug Beatty <44704949+dbeatty10@users.noreply.github.com>
2025-08-28 11:10:14 -05:00
github-actions[bot]
3d8fffdedb Bump dbt adapters minimum to 1.16.5 (#11933) (#11936)
* Bump `dbt-adapters` minimum to `1.16.5`

* Add changie doc

(cherry picked from commit ee8884731b)

Co-authored-by: Quigley Malcolm <QMalcolm@users.noreply.github.com>
2025-08-19 10:16:38 -05:00
FishtownBuildBot
ba99646b5c [Automated] Merged prep-release/1.10.9_16997074642 into target 1.10.latest during release process 2025-08-15 15:24:51 -04:00
Github Build Bot
fc45c14694 Bumping version to 1.10.9 and generate changelog 2025-08-15 18:55:00 +00:00
github-actions[bot]
a2c11df7e3 upgrade protobuf to 6.0 (#11916) (#11921)
* upgrade protobuf to 6.0

* upgrade protobuf to 6.0

* signing commits

* update dev-requirements.txt

* add changelog

(cherry picked from commit f1106ad61e)

Co-authored-by: Colin Rogers <111200756+colin-rogers-dbt@users.noreply.github.com>
2025-08-15 13:50:40 -05:00
FishtownBuildBot
12fa1b728b [Automated] Merged prep-release/1.10.8_16909034248 into target 1.10.latest during release process 2025-08-12 09:08:59 -04:00
Github Build Bot
e4922165cd Bumping version to 1.10.8 and generate changelog 2025-08-12 12:38:38 +00:00
github-actions[bot]
19d7d56707 flip require_generic_test_arguments_property behavior change flag (#11911) (#11915) 2025-08-12 14:33:47 +02:00
FishtownBuildBot
5c0ba51495 [Automated] Merged prep-release/1.10.7_16816063100 into target 1.10.latest during release process 2025-08-07 17:50:07 -04:00
Github Build Bot
e48d5817da Bumping version to 1.10.7 and generate changelog 2025-08-07 21:20:58 +00:00
github-actions[bot]
62c5ec088e Remove duplicative PropertyMovedToConfigDeprecation source freshness config move (#11880) (#11905)
(cherry picked from commit 451b745aea)

Co-authored-by: Michelle Ark <MichelleArk@users.noreply.github.com>
2025-08-07 14:17:15 -07:00
github-actions[bot]
8517d839f9 call adapter.add_catalog_integration during parse_manifest (#11889) (#11902)
* call adapter.add_catalog_integration during parse_manifest

* formatting

* updat retry.py

* add changie

* remove unneeded call to adapter.add_catalog_integrations

(cherry picked from commit 3e31117ba1)

Co-authored-by: Colin Rogers <111200756+colin-rogers-dbt@users.noreply.github.com>
2025-08-07 10:43:48 -07:00
github-actions[bot]
5ee20f61b5 Raise PropertyMovedToConfigDeprecation instead of CustomTopLevelKeyDeprecation when additional attribute is a valid config (#11879) (#11893)
(cherry picked from commit d27232a946)

Co-authored-by: Michelle Ark <MichelleArk@users.noreply.github.com>
2025-08-06 11:55:01 -07:00
FishtownBuildBot
fc803744be [Automated] Merged prep-release/1.10.6_16603045229 into target 1.10.latest during release process 2025-07-29 13:58:25 -04:00
Github Build Bot
720b96e945 Bumping version to 1.10.6 and generate changelog 2025-07-29 17:27:50 +00:00
github-actions[bot]
af7bde58f8 add argument values to ArgumentsPropertyInGenericTestDeprecation message (#11872) (#11873) 2025-07-29 12:36:16 -04:00
github-actions[bot]
99c98459f5 deprecate modules.itertools usage (#11734) (#11871) 2025-07-29 11:43:34 -04:00
github-actions[bot]
d6bb57a45f safer handling of pre-existing config.tags on sources/tables (#11854) (#11856) 2025-07-28 18:40:27 -04:00
FishtownBuildBot
e0bdd5ad48 [Automated] Merged prep-release/1.10.5_16445439728 into target 1.10.latest during release process 2025-07-22 09:51:23 -04:00
Github Build Bot
f530f9f385 Bumping version to 1.10.5 and generate changelog 2025-07-22 13:20:18 +00:00
github-actions[bot]
0278e02014 accept generic test args under 'args' (#11840) (#11848) 2025-07-21 19:04:32 -04:00
github-actions[bot]
dd9bf8b17e config.meta and config.tags propagation to top-level on sources and tables (#11839) (#11846) 2025-07-21 16:35:38 -04:00
github-actions[bot]
f380d7292a raise MissingPlusPrefixDeprecation when missing plus-prefix, otherwise skip type-related issues in dbt_project.yml (#11825) (#11833) 2025-07-15 13:58:42 -04:00
github-actions[bot]
787ba932c5 Gate jsonschema validations by adapter support (#11828) (#11832) 2025-07-15 13:06:56 -04:00
github-actions[bot]
70d495cc95 skip type checking deprecation_date on the basis of jsonschemas (#11823) (#11830) 2025-07-15 12:31:30 -04:00
github-actions[bot]
fd57695c7c Some additional SL JSONSchema improvements/fixes (#11821) (#11831) 2025-07-15 10:37:22 -04:00
github-actions[bot]
a58f90937f Create and protect dbt engine environment variable namespace via prefix DBT_ENGINE (#11795) (#11812) 2025-07-15 10:09:30 -04:00
github-actions[bot]
efd8659d84 update semantic layer jsonschemas (#11817) (#11820)
(cherry picked from commit 55bb3c304a)

Co-authored-by: Michelle Ark <MichelleArk@users.noreply.github.com>
2025-07-14 11:05:10 -05:00
github-actions[bot]
c2133135eb Make GenericJSONSchemaValidationDeprecation a "preview" deprecation (#11815) (#11819)
* Make `GenericJSONSchemaValidationDeprecation` a "preview" deprecation

Making the deprecation a preview will:
1. Remove it from the summary
2. Emit it as a Note event instead of the actual deprecation event
  a. This does mean it'll still be in the logs (but as info level instead of warning)

* Update message of `GenericJSONSchemaValidationDeprecation` to state it's only possibly a deprecation

* Add changie doc

* fix GenericJSONSchemaValidationDeprecation related tests

* Add more details to `GenericJSONSchemaValidationDeprecation` message

* Fix tests related to GenericJSONSchemaValidationDeprecation

(cherry picked from commit 693564de40)

Co-authored-by: Quigley Malcolm <QMalcolm@users.noreply.github.com>
2025-07-11 10:57:47 -05:00
FishtownBuildBot
50ae9e1910 [Automated] Merged prep-release/1.10.4_16204517421 into target 1.10.latest during release process 2025-07-10 16:16:59 -04:00
Github Build Bot
419e3a925f Bumping version to 1.10.4 and generate changelog 2025-07-10 19:47:02 +00:00
github-actions[bot]
a5c04bda77 update ModelParamUsageDeprecation message (#11793) (#11794)
(cherry picked from commit 9955ea760a)

Co-authored-by: Michelle Ark <MichelleArk@users.noreply.github.com>
Co-authored-by: Colin Rogers <111200756+colin-rogers-dbt@users.noreply.github.com>
2025-07-10 10:56:13 -07:00
github-actions[bot]
5b63ce9c19 Upgrade to DSI 0.9.0 for more robust saved query support (#11808) (#11811)
* Upgrade to DSI 0.9.0

Note this new version has some breaking changes (changes to class names). This won't impact semantic manifest parsing. The changes in the new version will be used to support order_by and limit on saved queries.

* Changelog

* Update test saved query

(cherry picked from commit 31d974f5eb)

Co-authored-by: Courtney Holcomb <courtneyeholcomb@gmail.com>
2025-07-09 18:48:15 -07:00
Quigley Malcolm
222d6040ed [Backport 1.10.latest] Source Overrides Deprecation (#11802)
* Source Override Deprecation (#11636)

* First draft of SourceOverrideDeprecation warning.

* Refinements and test

* Back out unneeded change`

* Fix unit test.

* add changie doc

* Bump minimum dbt-protos to 1.0.335

---------

Co-authored-by: Quigley Malcolm <quigley.malcolm@dbtlabs.com>

* Update json schemas (#11800)

* Update dbt_project.yml jsonschema spec to handle nested config defs

Additionally adds some more cloud configs

* Update schema files jsonschema definition to not have `overrides` for sources

Additionally add some cloud definitions

* Add changie doc

* Update happy_path fixture to include nested config specifations in dbt_project.yml

* Move source overrides deprecation to jsonschema (#11801)

* Improve deprecation message for SourceOverrideDeprecation

* Move SourceOverrideDeprecation to jsonschema validation code path

* Update test for checking SourceOverrideDeprecation

---------

Co-authored-by: Peter Webb <peter.webb@dbtlabs.com>
2025-07-07 16:06:33 -05:00
FishtownBuildBot
ee538208a0 [Automated] Merged prep-release/1.10.3_16035604957 into target 1.10.latest during release process 2025-07-02 17:28:31 -04:00
Github Build Bot
57fdfb5164 Bumping version to 1.10.3 and generate changelog 2025-07-02 20:57:25 +00:00
github-actions[bot]
ab50b5d917 Bump dbt-common minimum to 1.25.1 (#11790) (#11791)
(cherry picked from commit fdd0546700)

Co-authored-by: Quigley Malcolm <QMalcolm@users.noreply.github.com>
2025-07-02 15:52:34 -05:00
github-actions[bot]
f8a18ff3cd bring in latest properties yaml and dbt project yaml jsonschemas (#11765) (#11788)
(cherry picked from commit 17ec11ad30)

Co-authored-by: Michelle Ark <MichelleArk@users.noreply.github.com>
2025-07-02 13:27:34 -04:00
github-actions[bot]
43bc323581 Validate model sql file provided config (#11768) (#11775)
* Add helper to validate model configs via jsonschema

* Store jsonschemas as module vars instead of reloading everytime

Every time we were calling a jsonschema validation, we were _reloading_
from file the underlying jsonschema. As a one off, this isn't too costly.
However, for large projects it starts to add up. By only loading each json
schema once we can save a lot of time. Calling one of the functions which
loads a jsonschema 10,000 times was costing ~3.7215 seconds. By switching
to this module var paradigm we reduced that to ~0.3743 seconds.

* Begin validating configs from model `.sql` files

It was a bit of a hunt to figure out where to do this. We couldn't do
the validating in `calculate_node_config` because that function is called
4 times per node (which is an issue of itself, but out of scope for this
work). We also couldn't do the validation where `_config_call_dict` is set
because it turns out there are multiple avenues for setting
`_config_call_dict`, which is a fun rabbit hole.

* Ensure .sql configs are validated only once

It turns out that that `update_parsed_node_config` can potentially be
called twice per model. It'll be called from either `ModelParser.render_update`
or `ModelParser.populate`, and it can additionally be called from
`PatchParser.patch_node_config` if there is a .yml definition for the
model. We only want to validate the config once, and we aren't guaranteed
to have a `PatchParser` if there is no patch for the model. Thus, we've
updated `ModelParser.populate` and `ModelParser.render_update` to
request the config validation (which by default doesn't run unless requested).

* Split out the model config specific validation from general jsonschema validation

We're validating model configs from sql files via a subschema of the main
resources jsonschema, different case logic for detecting the different
types of deprecation warnings present. Thus `validate_model_config` cannot
call `jsonschema_validate`. We could have had both logic paths exist in
`jsonschema_validate`, but it would have added another later of if/elses
and bloated the function substantially.

* Handle additional properties of sub config objects

* Give better key path information for .sql config jsonschema issues

* Add tests for validate_model_config

* Add changie doc

* Fix jsonschemas unittests to avoid catching irrelevant issues

(cherry picked from commit 65598f3dc6)

Co-authored-by: Quigley Malcolm <QMalcolm@users.noreply.github.com>
2025-06-27 11:08:53 -05:00
github-actions[bot]
d73102142f bump dbt-common to 1.25.0 to access WarnErrorOptionsV2 (#11762) (#11763) 2025-06-24 10:40:13 -04:00
github-actions[bot]
d0ae49b4af add loaded_at_query and loaded_at_field to SourceConfig (#11759) (#11761) 2025-06-24 09:26:45 -04:00
FishtownBuildBot
3bb6aca33f [Automated] Merged prep-release/1.10.2_15785754601 into target 1.10.latest during release process 2025-06-20 15:24:46 -04:00
Github Build Bot
6df1c65fef Bumping version to 1.10.2 and generate changelog 2025-06-20 18:53:57 +00:00
github-actions[bot]
71a8a08694 Bring back pydantic 2 support (#11756) (#11757)
* Loosen pydantic maximum to <3 (allowing for pydantic 2)

* Add an internal pydantic shim for getting pydantic BaseSettings reguardless of pydantic v1 vs v2

* Add changie doc

(cherry picked from commit 70ad9319d2)

Co-authored-by: Quigley Malcolm <QMalcolm@users.noreply.github.com>
2025-06-20 13:48:23 -05:00
github-actions[bot]
17806c696c bring in latest properties yaml and dbt project yaml jsonschemas (#11745) (#11746) 2025-06-17 17:11:14 -04:00
FishtownBuildBot
4d8f730373 [Automated] Merged prep-release/1.10.1_15690982938 into target 1.10.latest during release process 2025-06-16 16:48:12 -04:00
Github Build Bot
f32eee5ff5 Bumping version to 1.10.1 and generate changelog 2025-06-16 20:17:53 +00:00
Quigley Malcolm
6602852996 Bump minimum jsonschema version to 4.19.1 (#11741) (#11743)
In 1.10.0 we began utilizing `jsonschema._keywords`. However, the submodule
`_keywords` wasn't added until jsonschema `4.19.1` which came out September
20th, 2023. Our jsonschema requirement was being set transitively via
dbt-common as `>=4.0,<5`. This mean people doing a _non_ fresh install of
dbt-core `1.10.0` could end up with a broken system if their existing
jsonschema dependency was anywhere in the range `>=4.0,<4.19.1`. By bumping the
minimum jsonschema version we make it such that anyone install dbt-core 1.10.1 will
automatically get there jsonschema updated (assuming they don't have an exclusionary
pin)
2025-06-16 15:15:16 -05:00
FishtownBuildBot
92912f0ad1 [Automated] Merged prep-release/1.10.0_15685682495 into target 1.10.latest during release process 2025-06-16 12:26:01 -04:00
Github Build Bot
ca1ac9dc9f Bumping version to 1.10.0 and generate changelog 2025-06-16 15:57:21 +00:00
github-actions[bot]
7f3ea39f98 drop model freshness as top level model property (in favor of config freshness) (#11731) (#11736)
* Begin testing that model freshness can't be set as a top level model property

* Remove ability to specify freshness as top level property of models

* Add come comments to calculate_node_config for better readability

* Drop `freshness` as a top level property of models, and let `patch_node_config` handle merging config freshness

Model freshness hasn't been released in a minor release yet, not been documented. Thus
it is safe to remove the top level property of freshness on models. Freshness will instead
be set, and gotten, from the model config. Additionally our way of calculating the
config model freshness only got the top level `+freshness` from dbt_project.yml (ignoring
any path specific definitions). By instead using the built in `calculate_node_config` (which
is eventually called by `patch_node_config`), we get all path specific freshness config handling
and it also handles the precedence of `dbt_project.yml` specification, schema file specification,
and sql file specification.

* add changie doc

(cherry picked from commit 091ba5fe0b)

Co-authored-by: Quigley Malcolm <QMalcolm@users.noreply.github.com>
2025-06-16 10:34:30 -05:00
github-actions[bot]
7c8d98d240 deprecation warnings for --models, --model, -m (#11729) (#11739)
(cherry picked from commit 6bbcce1f1c)

Co-authored-by: Michelle Ark <MichelleArk@users.noreply.github.com>
Co-authored-by: Quigley Malcolm <QMalcolm@users.noreply.github.com>
2025-06-16 10:20:33 -05:00
github-actions[bot]
fe876a3ae2 move TestConfig.post_init logic to finalize_and_validate to respect hierarchical configs (#11730) (#11738)
(cherry picked from commit 0fff5760ff)

Co-authored-by: Michelle Ark <MichelleArk@users.noreply.github.com>
Co-authored-by: Quigley Malcolm <QMalcolm@users.noreply.github.com>
2025-06-16 10:06:57 -05:00
github-actions[bot]
3abb1156ed handle inline model freshness config (#11728) (#11737)
* Revert "bump dbt-common (#11640)"

This reverts commit c6b7655b65.

* update freshness model config handling

* make sure ModelConfig.__pre_deserialize__ returns all nested items as dicts

* add changie

(cherry picked from commit f4988c62e3)

Co-authored-by: Colin Rogers <111200756+colin-rogers-dbt@users.noreply.github.com>
2025-06-16 09:53:54 -05:00
github-actions[bot]
cdb9b1c309 Ensure source node .freshness is equal to node's .config.freshness (#11719) (#11723)
* Ensure source node `.freshness` is equal to node's `.config.freshness`

* Default source config freshness to empty spec if no freshenss spec is given

* Update contract tests for source nodes

(cherry picked from commit 2e6d4f493d)

Co-authored-by: Quigley Malcolm <QMalcolm@users.noreply.github.com>
2025-06-10 11:19:55 -05:00
github-actions[bot]
4c913966d3 Ensure build_after is present in model freshness in parsing, otherwise skip freshness definition (#11711) (#11722)
* Ensure `build_after` is present in model freshness in parsing, otherwise skip freshness definition

* add freshness model config test

* add changelog

---------


(cherry picked from commit 3e593600e0)

Co-authored-by: Quigley Malcolm <QMalcolm@users.noreply.github.com>
Co-authored-by: Colin <colin.rogers@dbtlabs.com>
2025-06-10 11:02:38 -05:00
FishtownBuildBot
8bc9b4a9e9 [Automated] Merged prep-release/1.10.0rc2_15445186608 into target 1.10.latest during release process 2025-06-04 11:07:37 -04:00
Github Build Bot
981058fb43 Bumping version to 1.10.0rc2 and generate changelog 2025-06-04 14:38:04 +00:00
github-actions[bot]
552cf1aa23 Fix null handling of source freshness and dbt_project vs schema spec precedence (#11698) (#11704)
* Handle explicit setting of null for source freshness config

* Abstract out the creation of the target config

This is useful because it makes that portion of code more re-usable/portable
and makes the work we are about to do easier.

* Fix bug in `merge_source_freshness` where empty freshness was preferenced over `None`

The issue was that during merging of freshnesses, an "empty freshness", one
where all values are `None`, was being preferenced over `None`. This was
problematic because an "empty freshness" indicates that a freshness was not
specified at that level. While `None` means that the freshness was _explicitly_
set to `None`. As such we should preference the thing that was specifically set.

* Properly get dbt_project defined freshness and don't merge with schema defined freshness

Previously we were only getting the "top level" freshness from the
dbt_project.yaml. This was ignoring freshness settings for the direct,
source, and table set in the dbt_project.yaml. Additionally, we were
merging the dbt_project.yaml freshness into the schema freshness. Long
term this merging would be desireably, however before we do that we need
to ensure freshness at diffrent levels within the dbt_project.yml get
properly merged (currently the different levels clobber each other). Fixing
that is a larger issue though. So for the time being, the schema defintion
of freshness will clobber any dbt_project.yml definition of freshness.

* Add changie doc

* Fix whitespace to make code quality happy

* Set the parsed source freshness to an empty FreshnessThreshold if None

This maintains backwards compatibility

(cherry picked from commit 87584c73b0)

Co-authored-by: Quigley Malcolm <QMalcolm@users.noreply.github.com>
2025-05-30 11:53:48 -05:00
github-actions[bot]
9bc130d16e Add file_format as CatalogWriteIntegrationConfig (#11695) (#11702)
* Revert "bump dbt-common (#11640)"

This reverts commit c6b7655b65.

* add file_format as a top level config in CatalogWriteIntegrationConfig

* add changelog

(cherry picked from commit 709bd11c71)

Co-authored-by: Colin Rogers <111200756+colin-rogers-dbt@users.noreply.github.com>
2025-05-30 11:37:37 -05:00
github-actions[bot]
40617b42e7 Simplify logic (#11678) (#11701)
(cherry picked from commit f7f53732b2)

Co-authored-by: Kshitij Aranke <kshitij.aranke@dbtlabs.com>
2025-05-30 11:23:54 -05:00
github-actions[bot]
24a581649c Don't warn for metricflow_time_spine with non-day grain (#11689) (#11700)
(cherry picked from commit 36f1143c31)

Co-authored-by: Courtney Holcomb <courtneyeholcomb@gmail.com>
2025-05-30 10:50:47 -05:00
Emily Rockman
ae329219d9 fix changelog (#11694) 2025-05-28 16:43:33 -05:00
FishtownBuildBot
cbb5d3e803 [Automated] Merged prep-release/1.10.0rc1_15308838449 into target 1.10.latest during release process 2025-05-28 15:59:39 -04:00
Github Build Bot
49bba06ec6 Bumping version to 1.10.0rc1 and generate changelog 2025-05-28 19:28:55 +00:00
Grace Goheen
465aa0c2fc May 2025 - dbt Core roadmap post (#11691) 2025-05-28 10:33:09 -06:00
Michelle Ark
a0284edb6b update jsonschemas + dont skip happy path deprecation test (#11682) 2025-05-27 20:08:51 -04:00
Michelle Ark
d2bfb4e215 require count and period on ModelBuildAfter (#11677) 2025-05-27 16:56:01 -04:00
Quigley Malcolm
38443640ce Add singular data tests, generic data tests, and unit tests to happy path fixture (#11674)
* Add a robust schema definition of singular test to happy path fixture

* Add generic tests to happy path fixture

* Add unit tests to happy path fixture

* Fix data test + unit test happy path fixtures so they're valid

* Fix test_list.py for data test + unit test happy path fixture

* Fixup issues due to imperfect merge

* Drop generic data test definition style that we don't want to support from happy path fixture

* Add data test attributes to a pre-existing data test type

* Fix test_list.py again

* Don't forget to normalize in test_list.py
2025-05-26 21:13:02 -05:00
Quigley Malcolm
86e0ad49aa Update latest jsonschema for schema files to have 'warn_unsupported' property (#11675) 2025-05-26 21:12:51 -05:00
Michelle Ark
972eb23d03 add config to columns (#11671) 2025-05-26 21:06:09 -04:00
Michelle Ark
f56c3868cf no type-related deprecations yet, allow additional properties on colu… (#11673) 2025-05-26 18:02:34 -04:00
Michelle Ark
66fc546766 Update latest jsonschema (#11672) 2025-05-26 15:58:07 -04:00
Quigley Malcolm
c71d5f6665 Begin showing event name in msg of deprecation events (#11670)
* Include event name in msg of deprecation warning for all recently added deprecations

* Add behavior flag for gating inclusion of event name in older deprecation messages

* Conditionally append event name to older deprecation events depending on behavior flag

* Add changie doc
2025-05-26 10:34:18 -05:00
Michelle Ark
6e0564a98b update latest.json with metrics objects (#11668) 2025-05-26 09:33:26 -04:00
Michelle Ark
99827ea220 fix exposures happy path fixture (#11663) 2025-05-23 20:07:44 -04:00
Ani Venkateshwaran
0db83d0abd adding quoting to manifest metadata (#11666) 2025-05-23 13:51:19 -07:00
Quigley Malcolm
98711cec75 Deprecate usage of include and exclude for --warn-error-options (#11625)
* Migrate to `WarnErrorOptionsV2` and begin using `error` and `warn` as primary config keys

* Update tests using `WarnErrorOptions` to use `error` and `warn` terminology

* Begin emitting deprecation warning when include/exclude terminology is used with WarnErrorOptions

* bump minimum of dbt-protos

* Add test for new WarnErrorOptions deprecation

* add changie doc

* Fix test_warn_error_options.py tests

* Fix test_singular_tests.py tests

* Add WOEIncludeExcludeDeprecation to test_events.py serialization test
2025-05-23 11:40:10 -05:00
Michelle Ark
4a8f9c181c Support config.meta and description on groups + add to happy path testing (#11649) 2025-05-22 20:09:05 -04:00
Peter Webb
5165716e3d Add snapshots to happy path project. (#11657)
* Add snapshots to happy path project.

* Add a more plausible snapshot source model

* Adjust tests for new snapshots in happy path project.
2025-05-22 19:10:16 -04:00
Michelle Ark
65d428004a happy path seeds: no tags/meta as column properties (#11656) 2025-05-22 15:34:52 -04:00
Kshitij Aranke
14fc39a76f Fix #11506: Add freshness config to models (#11644)
* Fix #11506: Add freshness config to models

* Add deprecation and project validation

* Fix integration tests

* Address PR comments
2025-05-22 17:18:34 +01:00
Michelle Ark
8b4e2a138c update analyses configs + happy path fixture (#11648) 2025-05-21 11:25:12 -04:00
Michelle Ark
a11ee322ae use saner default setting of QueryComment.append in project fixture (#11620) 2025-05-21 11:17:05 -04:00
Michelle Ark
db8ca25da9 Add analyses properties.yml to happy path fixture (#11632) 2025-05-20 15:17:26 -04:00
Quigley Malcolm
c264a7f2b9 Flip behavior flag to disallow spaces in resource names (#11645) 2025-05-20 13:33:26 -05:00
Colin Rogers
da6f0a1bd7 Revert "bump dbt-common (#11640)" (#11643)
This reverts commit c6b7655b65.
2025-05-20 11:32:51 -05:00
Connor McArthur
c643a1d482 move protos into external dependency (#11608) 2025-05-20 10:35:52 -04:00
Kshitij Aranke
0f8f42639d Fix #11506: Add freshness config to sources (#11628)
* Fix #11506: Add freshness config to exposures

* Add freshness to some config

* Update Fixes-20250515-145857.yaml

* Add PropertyMovedToConfigDeprecation

* make core_proto_types

* Add log check

* Use +freshness instead of freshness

* Fix test_events.py
2025-05-20 12:56:02 +01:00
Michelle Ark
ec2cf9b561 add more seed configs to happy_path_project (#11630)
* add more seed configs to happy_path_project

* add remaining properties to seed

* Fix up non-deprecation tests

* woopsie

* Fix test_list to account for seed changes in happy path fixture

---------

Co-authored-by: Quigley Malcolm <quigley.malcolm@dbtlabs.com>
2025-05-19 17:56:17 -05:00
Colin Rogers
c6b7655b65 bump dbt-common (#11640)
* bump dbt-common

* add changelog
2025-05-19 15:00:18 -05:00
Emily Rockman
3e80ad7cc7 move pin (#11629) 2025-05-19 07:07:58 -05:00
Michelle Ark
1efad4e68e add exposure to happy path project (#11631) 2025-05-15 20:10:48 -04:00
Peter Webb
f5e0a3b1b3 Do not check markdown documentation files for stray jinja blocks. (#11623) 2025-05-15 10:44:11 -04:00
Quigley Malcolm
a64b5be25b normalize expected file path of functional test to ensure windows testing doesn't break (#11626) 2025-05-14 17:53:13 -05:00
FishtownBuildBot
b31718a31f [Automated] Merged prep-release/1.10.0b3_15031783445 into target main during release process 2025-05-14 18:20:34 -04:00
Github Build Bot
f6d83c765c Bumping version to 1.10.0b3 and generate changelog 2025-05-14 21:51:20 +00:00
Emily Rockman
5b3b22a2e9 Fix typo (#11624) 2025-05-14 16:48:06 -05:00
Quigley Malcolm
a9b26d03ce Initial happy path testing of jsonschema validations (#11594)
* Begin testing that `happy_path_project` and `project` fixtures have no deprecations

* Add model specific configs to model yml description in happy path test

* Add all possible model config property keys to happy path fixture

* Add more model properties to happy path fixture

* Move configs for happy path testing onto new happy path model fixture

* Fix deprecation tests names

* Add newly generated jsonschema for schema files

* Skip happy path deprecation test for now

* Fix 'database' value of model for happy path fixture

* Fix happy path fixture model grants to a role that exists

* Fix test_list.py
2025-05-14 16:15:55 -05:00
Quigley Malcolm
31cb5a9b72 Allow for deprecation warning previews (#11598)
* Allow for 'previewing' deprecations, before deprecations become real

* add changie doc
2025-05-14 13:04:24 -05:00
Michelle Ark
e5dd4c57a6 deprecate --output/-o usage in dbt source freshness (#11621) 2025-05-14 13:27:57 -04:00
Peter Webb
e7a1c6c315 Eliminate false positive in check for anchor override duplicate properties. (#11619) 2025-05-13 13:43:51 -04:00
Quigley Malcolm
e355be6186 Fixup changelog that I typod (#11616) 2025-05-13 11:33:43 -05:00
Michelle Ark
12850a36ec do not have DbtProject unit tests rely on default QueryCommment settings (#11613) 2025-05-13 09:47:30 -04:00
Quigley Malcolm
010411fed3 Flip behavior flag source-freshness-run-proejct-hooks to true (#11611) 2025-05-13 08:37:29 -05:00
Emily Rockman
f64a4883eb replace all runner names (#11595) 2025-05-12 15:15:41 -05:00
Emily Rockman
2883933549 fix command test (#11605)
* fix command test

* remove parameter
2025-05-12 14:55:52 -05:00
Kshitij Aranke
fe9c78eed8 Fix #11428: Add tags and meta config to exposures (#11589)
* Fix #11428: Add tags and meta config to exposures

* Add tags and meta to unit test

* Fix manifest integration test

* change meta order
2025-05-09 19:17:26 +01:00
Emily Rockman
a5ec58dab9 fix query comment tests (#11596) 2025-05-08 16:34:29 -05:00
Emily Rockman
29a79557d5 stop code checkout (#11575) 2025-05-06 13:23:12 -05:00
Emily Rockman
35fc3fdda2 add read only permissions (#11573) 2025-05-06 11:48:19 -05:00
Kshitij Aranke
8931262fa2 Make codecov informational-only (#11574) 2025-05-06 16:13:17 +01:00
Quigley Malcolm
85d31db1d4 Fix jsonschema validation that fires CustomKeyInConfigDeprecation (#11580)
* Fix detection of additional config property deprecation

Previously we were taking the first `key` on the `instance` property
of the jsonschema ValidationError. However, this validation error
is raised as an "anyOf" violation, which then has sub-errors in its
`context` property. To identify the key in violation, we have to
find the `additionalProperties` validation in the sub-errors. The key
that is an issue can then be parsed from that sub-error.

* Refactor key parsing from jsonschema ValidationError messages to single definition

* Update handling `additionalProperties` violations to handle multiple keys in violation

* Add changelog

* Remove guard logic in jsonschemas validation rule that is no longer needed
2025-05-05 09:33:21 -05:00
Quigley Malcolm
d48476a08d Gate jsonschema validations behind private environment variable (#11579) 2025-05-02 10:03:43 -05:00
Emily Rockman
02f695b423 stop directly using the output (#11555)
* stop directly using the output

* fix error
2025-04-30 13:25:52 -05:00
Gerda Shank
3c95db9c00 Move dbt.include.jsonschemas imports to avoid cycles (#11568) 2025-04-30 12:32:50 -04:00
Doug Beatty
fec20ff914 Install pre-commit in Docker container for running tests (#11545)
* fix Dockerfile.test

* add change

* Ensure that all instances where `pre-commit` is called are prefixed with `$(DOCKER_CMD)`

* Changelog entry

---------

Co-authored-by: Taichi Kato <taichi-8128@outlook.jp>
2025-04-30 16:26:40 +01:00
Kshitij Aranke
de38bc9b0d Fix seed path if project directory name changes (#11525)
* Fix seed path if project directory name changes

* Changelog entry

---------

Co-authored-by: Doug Beatty <44704949+dbeatty10@users.noreply.github.com>
2025-04-29 17:56:49 +01:00
Quigley Malcolm
f4114130c9 Fix functional deprecation tests so they don't break on windows (#11547)
In a lot of our function deprecation warning tests we check for a
matching string within an event message. Some of these matches check
for a file path. The problem with this was that windows formats
file paths differently. This was causing the functional tests to
_fail_ when run in a windows environment. To fix this we've removed
the file path part of the string from the test assertions.
2025-04-28 10:21:56 -05:00
Quigley Malcolm
e920053306 Initial slate of deprecations for 1.10 (#11544)
* Begin basic jsonschema validations of dbt_project.yml (#11505)

* Add jsonschema for validation project file

* Add utility for helping to load jsonschema resources

Currently things are a bit hard coded. We should probably alter this
to be a bit more flexible.

* Begin validating the the `dbt_project.yml` via jsonschema

* Begin emitting deprecation warnings for generic jsonschema violations in dbt_project.yml

* Move from `DbtInternalError` to `DbtRuntimeError` to avoid circular imports

* Add tests for basic jsonschema validation of `dbt_project.yml`

* Add changie doc

* Add seralization test for new deprecation events

* Alter the project jsonschema to not require things that are optional

* Add datafiles to package egg

* Update inclusion of project jsonschema in setup.py to get files correctly

Using the glob spec returns a list of found files. Our previous spec was
raising the error
`error: can't copy 'dbt/resources/input_schemas/project/*.json': doesn't exist or not a regular file`

* Try another approach of adding jsonschema to egg

* Add input_schemas dir to MANIFEST.in spec

* Drop jsonschema inclusion spec from setup.py

* Begin using importlib.resources.files for loading project jsonschema

This doesn't currently work with editable installs :'(

* Use relative paths for loading jsonchemas instead of importlib

Using "importlib" is the blessed way to do this sort of thing. However,
that is failing for us on editable installs. This commit switches us
to using relative paths. Technically doing this has edge cases, however
this is also what we do for the `start_project` used in `dbt init`. So
we're going to do the same, for now. We should revisit this soon.

* Drop requirment of `__additional_properties__` specified by project jsonschema

* Drop requirement for `pre-hook` and `post-hook` specified by project jsonschema

* Reset `active_deprecations` global at the end of tests using `project` fixture

* Begin validation the jsonschema of YAML resource files (#11516)

* Add jsonschema for resources

* Begin jsonschema validating YAML resource files in dbt projects

* Drop `tests` and `data_tests` as required properties of `Columns` and `Models` for resources jsonschema

* Drop `__additional_properties__` as required for `_Metrics` in resources jsonschema

* Drop `post_hook` and `pre_hook` requirement for `__SnapshotsConfig` in resources jsonschema

* Update `_error_path_to_string` to handle empty paths

* Create + use custom Draft7Validator to ignore datetime and date classes

* Break `TestRetry` functional test class into multiple test classes

There was some overflow global state from one test to another which was
causing some of the tests to break.

* Refactor duplicate instances of `jsonschema_validate` to single definition

* Begin testing jsonschema validation of resource YAMLs

* Add changie doc

* Add Deprecation Warnings for Unexpected Jinja Blocks (#11514)

* Add deprecation warnings on unexpected jinja blocks.

* Add changelog entry.

* Add test event.

* Regen proto types.

* Fix event test.

* Add `UnexpectedJinjaBlockDeprecationSummary` and add file context to `UnexpectedJinjaBlockDeprecation` (#11517)

* Add summary event for UnexpectedJinjaBlockDeprecation

* Begin including file information in UnexpectedJinjaBlockDeprecation event

* Add UnexpectedJinjaBlockDeprecationSummary to test_events.py

* Deprecate Custom Top-Level Keys (#11518)

* Add specific deprecation for custom top level keys.

* Add changelog entry

* Add test events

* Add Check for Duplicate YAML Keys (#11510)

* Add functionality to check for duplicate yaml keys, working around PyYAML limitation.

* Fix up some ancient typing issues.

* Ignore typing issue, for now.

* Correct unit tests of `checked_load`

* Add event and deprecation types for duplicate yaml keys

* Begin validating `dbt_project.yml` for duplicate key violations

* Begin checking for duplicate key violations in schema files

* Add test to check duplicate keys are checked in schema files

* Refactor checked_yaml failure handling to reduce duplicate code

* Move `checked_load` utilities to separate file to avoid circular imports

* Handle yaml `start_mark` correctly for top level key errors

* Update changelog

* Fix test.

---------

Co-authored-by: Quigley Malcolm <quigley.malcolm@dbtlabs.com>

* Fix issue with YAML anchors in new CheckedLoader class.

* Deprecate having custom keys in config blocks (#11522)

* Add deprecation event for custom keys found in configs

* Begin checking schema files for custom keys found in configs

* Test new CustomConfigInConfigDeprecation event

* Add changie doc

* Add custom config key deprecation events to event serialization test

* Provide message to ValidationError in `SelectorConfig.from_path`

This typing error is unrelated to the changes in this PR. However,
it was failing CI, so I figured it'd be simple to just fix it.

* Add some extra guards around the ValidationFailure `path` and `instance`

* [TIDY-FRIST] Use new `deprecation_tag` (#11524)

* Tidy First: Update deprecation events to use the new `deprecation_tag`

Note did this for a majority of deprecations, but not _all_ deprecations.
That is because not all deprecations were following the pattern. As some
people do string parsing of our logs with regex, altering the deprecations
that weren't doing what `deprecation_tag` does to use `deprecation_tag`
would be a _breaking change_ for those events, thus we did not alter those
events

* Bump minimum dbt-common to `1.22.0`

* Fix tests

* Begin emitting deprecation events for custom properties found in objects (#11526)

* Fix CustomKeyInConfigDeprecationSummary

* Add deprecation type for custom properties in YAML objects

* Begin emitting deprecation events for custom properties found in objects

* Add changie doc

* Add `loaded_at_query` property to `_Sources` definition in jsonschema

This was breaking the test tests/unit/parser/test_parser.py::SchemaParserSourceTest::test_parse_source_custom_freshness_at_source

* Move validating jsonschema of schema files earlier in the process

Previously we were validating the jsonschema of schema files in
`SchemaParser.parse_file`. However, the file is originally loaded in
`yaml_from_file` (which happens before `SchemaParser.parse_file`), and
`yaml_from_file` _modifies_ the loaded dictionary to add some additional
properties. These additional properties violate the jsonschema unfortunately,
and thus we needed to start validating the schema against the jsonschema
before any such modifications.

* Skip parser tests for `model.freshness`

Model freshness never got fully implemented, won't be implemented nor
documented for 1.10. As such we're gonna consider the `model.freshness`
property an "unknown additional property". This is actually good as some
people have "accidentally" defined "freshness" on their models (likely due
to copy/paste of a source), and that property isn't doing anything.

* One single DeprecationsSummary event to rule them all (#11540)

* Begin emitting singular deprecations summary, instead of summary per deprecation type

* Remove concept of deprecation specific summary events in deprecations module

* Drop deprecation summary events that have been added to `feature-branch--11335-deprecations` but not `main`

These are save to drop with no notice because they only ever existed
on a feature branch, never main.

* Correct code numbers for new events on feature-branch that haven't made it to main yet

* Kill `PackageRedirectDeprecationSummary` event, and retire its event code

* add changie doc

* Update jsonschemas to versions 0.0.110 (#11541)

* Update jsonschems to 0.0.110

* Don't allow additional properties in configs

* Don't allow additional top level properties on objects

* Allow for 'loaded_at_query' on Sources and Tables

* Don't allow additional top level properties in schema files

---------

Co-authored-by: Peter Webb <peter.webb@dbtlabs.com>
2025-04-25 14:39:12 -05:00
Gerda Shank
511ff8e0e9 Fix duplicate error when multiple macros in one file with macro patches (#11531) 2025-04-23 17:13:16 -04:00
Emily Rockman
0220941849 fix trigger for artifact review check (#11529)
* fix trigger

* reorg for a single event
2025-04-22 14:14:13 -05:00
Mirna Wong
7594d42e02 add link to yaml tips (#11474)
this pr adds a link to the yaml tips page
2025-04-17 12:17:14 -07:00
Taichi Kato
bd08d13ddc Add pre-commit installation to Docker container for testing compatibility (#11499)
* fix Dockerfile.test

* add change

---------

Co-authored-by: Kshitij Aranke <kshitij.aranke@dbtlabs.com>
2025-04-17 11:35:09 -07:00
Doug Beatty
5095e8d1e8 Revert "Install pre-commit in Docker container for running tests (#11501)" (#11508)
This reverts commit 2a4da100ff.
2025-04-17 18:29:00 +01:00
Cypher Pepe
a1958c1193 fix: dead link in ARCHITECTURE.md (#11475)
* Update dead link in `ARCHITECTURE.md`

* Update ARCHITECTURE.md

Co-authored-by: Quigley Malcolm <QMalcolm@users.noreply.github.com>

---------

Co-authored-by: Quigley Malcolm <QMalcolm@users.noreply.github.com>
2025-04-15 09:24:42 -07:00
Doug Beatty
2a4da100ff Install pre-commit in Docker container for running tests (#11501)
* Install `pre-commit` in Docker container for running tests

* Install `pre-commit` checks in Docker container (if specified)
2025-04-15 08:16:28 -06:00
Jeremy Cohen
9c91ab27b1 Add package 'name' to lock file (#11488)
* Add package 'name' to lock file

* PR feedback + changie

* Fix test + add comment
2025-04-14 22:19:27 -07:00
Quigley Malcolm
3f56cbce5f Behavior flag to handle all warnings with warn_error logic (#11483) 2025-04-11 13:12:24 -05:00
Emily Rockman
7cca8470e0 converts to using custom conclustions, updated triggers (#11481) 2025-04-10 11:34:59 -05:00
Mario Loaiciga
c82ceaaf39 [#9791] Fix datetime.datetime.utcnow() is deprecated as of Python 3.12 (#9839)
* [#9791] Fix datetime.datetime.utcnow() is deprecated as of Python 3.12

* Explicit UTC timezone declaration for instances of datetime.now()

* Keep utcnow() in functional test case to avoid setup errors

* Utilize the more specific datetime class import for microbatch config

* Replace utcnow calls in contracts and artifacts

* Replace utcnow calls in functional and unit test cases

* Test deserialization of compiled run execution results

* Test deserialization of instantiated run execution result

* Code style improvements
2025-04-09 15:03:19 -07:00
Quigley Malcolm
e2e86b788c General Deprecation Warning Improvements (#11466) 2025-04-04 20:38:23 -05:00
Cédric OLIVIER
6b747fe801 fix(dbt-doc): Allow copying asset when dbt docs command is run outside th… (#11219)
* fix(doc): Allow copying asset when dbt docs command is run outside the dbt project

* fix: add test for doc generate from another dir
2025-04-03 12:13:04 -07:00
Kshitij Aranke
9e6facc4d1 Remove homebrew services (#11456) 2025-04-03 14:10:29 +01:00
FishtownBuildBot
5cd966cafa [Automated] Merged prep-release/1.10.0b2_14227037801 into target main during release process 2025-04-02 15:08:30 -04:00
Github Build Bot
47d5d99693 Bumping version to 1.10.0b2 and generate changelog 2025-04-02 18:40:00 +00:00
Chenyu Li
359b195d23 better track of artifacts to upload, more retry (#11449)
* better track of artifact to upload, more retry

* fix-tests
2025-04-01 13:17:46 -07:00
Emily Rockman
2a64b7365f stop manual cleanup because it’s not allowed anymore (#11451) 2025-04-01 14:49:42 -05:00
David Thorn
c6aeb4a291 Stringify profiles_dir in logging event (#11430) 2025-04-01 13:41:14 -04:00
Michelle Ark
5001e4f0e1 Parse catalogs.yml (#11162)
* rough in catalog contracts + requires.catalog

* set catalog integration

* add initial functional test for catalog parsing

* use dbt-adapters.git@feature/externalCatalogConfig

* add concrete catalog integration config

* add requires.catalog to build + reorder requires

* separate data objects from loaders

* improve functional test and fix import

* Discard changes to tests/functional/adapter/simple_seed/test_seed_type_override.py

* Change branch name for dot-adapters

* make table_format and catalog_type strings for now

* remove uv from makefile

* Discard changes to dev-requirements.txt

* Overhaul parsing catalogs.yml

* Use [] instead of None

* update postgres macos action

* Add more tests

* Add changie

* Second round of refactoring

* Address PR comments

---------

Co-authored-by: Colin <colin.rogers@dbtlabs.com>
Co-authored-by: Kshitij Aranke <kshitij.aranke@dbtlabs.com>
2025-04-01 17:00:00 +01:00
Quigley Malcolm
61648b5ed2 Fix microbatch model edge case of having only one batch (that failed) but counting as success (#11446) 2025-04-01 07:11:23 -05:00
Jordi van Dooren
4aa5169212 Remove and correct outdated docs relating to include/ and include/global_project. (#10726)
* Remove and correct outdated  docs.

* correct markdown hyperlink

* Update core/dbt/clients/README.md

Co-authored-by: Mike Alfare <13974384+mikealfare@users.noreply.github.com>

---------

Co-authored-by: Quigley Malcolm <QMalcolm@users.noreply.github.com>
Co-authored-by: Mike Alfare <13974384+mikealfare@users.noreply.github.com>
2025-03-28 19:20:07 -05:00
Jeremy Cohen
729caf0d5e Update issue template to direct adapters issues -> dbt-adapters (#11445) 2025-03-28 21:49:17 +01:00
Doug Beatty
f26d82217e Fix microbatch file naming for compiled code (#11220)
* Functional test for hourly microbatch model

* Use today's date for functional test for hourly microbatch model

* Use today's date for functional test for hourly microbatch model

* Restore to original

* Only use alphanumeric characters within batch ids

* Add tests for batch_id and change expected output for format_batch_start

* Handle missing batch_start

* Revert "Handle missing batch_start"

This reverts commit 65a1db0048. Reverting this because
`batch_start` for `format_batch_start` cannot be `None` and `start_time` for `batch_id`
cannot be `None`.

* Improve BatchSize specific values for `format_batch_start` and `batch_id` methods

---------

Co-authored-by: Quigley Malcolm <quigley.malcolm@dbtlabs.com>
2025-03-28 09:14:38 -05:00
Kshitij Aranke
e264675db7 Add retry to macos postgres setup (#11432)
* Retry macos postgres setup

* Retry command instead of step

* Use setup_db.sh

* Simplify macos postgres setup
2025-03-27 12:58:16 +00:00
Chenyu Li
300aa09fc5 Support artifact upload (#11419)
* wip

* reorganize

* changie

* retry

* nits

* nits

* improve retry, adjust error, adjust host name

* adjust logic

* pr_feedback

* Update .changes/unreleased/Features-20250323-151625.yaml

Co-authored-by: Emily Rockman <emily.rockman@dbtlabs.com>

---------

Co-authored-by: Emily Rockman <emily.rockman@dbtlabs.com>
2025-03-25 10:24:29 -07:00
Kshitij Aranke
493008417c Revert "Add secondary_profiles to profile.py (#11308)" (#11408)
This reverts commit 71a93b0cd3.
2025-03-21 16:20:47 +00:00
Michelle Ark
906e07c1f2 Add node_checksum to node_info on structured logs (#11368)
* update node_info to include node checksum

* changelog entry

* Discard changes to dev-requirements.txt

---------

Co-authored-by: Chenyu Li <chenyulee777@gmail.com>
Co-authored-by: Quigley Malcolm <quigley.malcolm@dbtlabs.com>
2025-03-20 15:26:19 -05:00
Kshitij Aranke
6a954e2d24 fix postgres github action using vibe coding (#11409) 2025-03-20 18:29:09 +00:00
Peter Webb
3b724acc54 Add Support for Python 3.13 (#11401)
* Update to latest ddtrace within minor version range.

* Add test coverage for Python 3.13

* Update setup.py to indicate Python 3.13 support.

* Update freezegun version to support Python 3.13

* Add changelog entry.
2025-03-20 09:37:15 -04:00
Peter Webb
b0ca1256ae Macro Annotations and Inference (#11389)
* Default macro argument information from original definitions.

* Add argument type and count warnings behind behavior flag.

* Add changelog entry.

* Make flag test more robust.

* Use a unique event for macro annotation warnings, per review.

* Add event to test list.

* Regenerate core_types_pb2 using protoc 5.28.3

---------

Co-authored-by: Quigley Malcolm <quigley.malcolm@dbtlabs.com>
2025-03-18 13:00:54 -04:00
FishtownBuildBot
9d7820c356 [Automated] Merged prep-release/1.10.0b1_13821590310 into target main during release process 2025-03-12 17:41:19 -04:00
Github Build Bot
1fc193167d Bumping version to 1.10.0b1 and generate changelog 2025-03-12 21:12:13 +00:00
Quigley Malcolm
d9f96a95c1 Remove DBT_EXPERIMENTAL_SAMPLE_MODE env var gating for sample mode (#11382) 2025-03-12 09:27:12 -05:00
amardatar
138a2acf84 Fix parsing error for projects using the new YAML format for snapshots (#11362) 2025-03-10 12:28:22 -04:00
Emily Rockman
88ada4aa31 bump libpq-dev (#11373) 2025-03-07 12:22:09 -06:00
Emily Rockman
77d8e3262a handle ubuntu 20.04 deprecation (#11354)
* update ubuntu 20.04 to 24.04

* updates to ubuntu-latest instead

* try postgres update

* Change owner of db creation script so postgres can run it.

* Add sudos.

* Add debug logging.

* Set execute bit on scripts.

* More debug logging.

* try a service

* clean up and split the integrations tests by os

---------

Co-authored-by: Peter Allen Webb <peter.webb@dbtlabs.com>
2025-03-04 12:41:23 -06:00
Quigley Malcolm
94b6ae13b3 Rewrite execution of microbatch models to avoid blocking the main thread (#11332)
* Push orchestration of batches previously in the `RunTask` into `MicrobatchModelRunner`

* Split `MicrobatchModelRunner` into two separate runners

`MicrobatchModelRunner` is now an orchestrator of `MicrobatchBatchRunner`s, the latter being what handle actual batch execution

* Introduce new `DbtThreadPool` that knows if it's been closed

* Enable `MicrobatchModelRunner` to shutdown gracefully when it detects the thread pool has been closed
2025-03-03 15:21:24 -06:00
Michelle Ark
f7c4c3c9cc add database to ModelNodeArgs in partial parsing test to better reflect prod (#11330) 2025-02-21 16:36:28 -05:00
Kshitij Aranke
71a93b0cd3 Add secondary_profiles to profile.py (#11308)
* Add secondary_profiles to profile.py

* Add more tests for edge cases

* Add changie

* Allow inferring target name and add tests for the same

* Incorporate review feedback

* remove unnecessary nesting

* Use typing_extensions.Self

* use quoted type again

* address pr comments round 2
2025-02-20 16:38:36 +00:00
Emily Rockman
7bdf27af31 Update artifact triggers and concurrency rules (#11327)
* update trigger

* fix concurrency

* remove duplicate counts and check lt gt not eq
2025-02-19 12:26:36 -06:00
Gerda Shank
e60b41d9fa Add invocation_started_at (#11291) 2025-02-18 11:32:04 -05:00
Kshitij Aranke
2ba765d360 Fix #11275: _get_doc_blocks is crashing parsing if .format is called (#11310)
* Fix #11275: get_doc_blocks is crashing parsing

* Add changie
2025-02-18 15:23:28 +00:00
dependabot[bot]
93e27548ce Bump peter-evans/create-pull-request from 6 to 7 (#10680)
* Bump peter-evans/create-pull-request from 6 to 7

Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 6 to 7.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v6...v7)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Add automated changelog yaml from template for bot PR

* Delete .changes/unreleased/Dependencies-20240909-004501.yaml

remove changelog, not needed

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Github Build Bot <buildbot@fishtownanalytics.com>
Co-authored-by: Emily Rockman <emily.rockman@dbtlabs.com>
2025-02-18 08:18:31 -06:00
Quigley Malcolm
aa89740311 Allow sampling from snapshots and of snapshots (#11311)
* Allow for rendering of refs/sources in snapshots to be sampled

Of note the parameterization of `test_resolve_event_time_filter` in
tests/unit/context/test_providers.py is getting large and cumbersome.
It may be time soon to split it into a few distinct tests to facilitate
the necessity of fewer parametrized arguments for a given test.

* Simplify `isinstance` checks when resolving event time filter

Previously we were doing `isintance(a, class1) or (isinstance(a, class2)`
but this can be simplified to `isintance(a, (class1, class2))`. Woops.

* Ensure sampling of refs of snapshots is possible

Notably we didn't have to add `insinstance(self.target, SnapshotConfig)` to the
checks in `resolve_event_time_filter` because `SnapshotConfig` is a subclass
of `NodeConfig`.

* Add changie doc
2025-02-14 16:02:31 -06:00
Quigley Malcolm
aa306693a5 Allow for running sample mode with build command (#11307) 2025-02-14 12:40:13 -06:00
Quigley Malcolm
7041e5822f Ability to sample seeds (#11304)
* Allow for sampling of seeds

* Add changie doc

* Fix seed column types for `TestSampleSeedRefs` tests
2025-02-13 17:12:38 -06:00
Quigley Malcolm
a08255e4cb Combine --sample and --sample-window into one CLI param (#11303)
* Combine `--sample` and `--sample-window` CLI params

* Add changie doc
2025-02-13 15:59:41 -06:00
Emily Rockman
2cde93bf63 Require 2 CODEOWNER reviews for artifact changes (#11256)
* first pass

* resolve TODOs

* updates after testing
2025-02-11 13:06:28 -06:00
Kshitij Aranke
f29836fcf3 Round 2: Add doc_blocks to manifest for nodes and columns (#11294)
* Reapply "Add `doc_blocks` to manifest for nodes and columns (#11224)" (#11283)

This reverts commit 55e0df181f.

* Expand doc_blocks backcompat test

* Refactor to method, add docstring
2025-02-11 16:01:16 +00:00
William Deng
7f32e42230 Update ShowTaskDirect to correctly handle --limit -1 (#11284)
* Update  to support  properly

* changelog
2025-02-10 16:53:04 +00:00
Kshitij Aranke
55e0df181f Revert "Add doc_blocks to manifest for nodes and columns (#11224)" (#11283)
This reverts commit d71f309c1e.
2025-02-07 17:12:06 +00:00
Kshitij Aranke
588cbabe94 Don't automatically run Artifact Schema Check on PRs (#11260)
* Don't automatically run Artifact Schema Check on PRs

* Add branch as argument
2025-02-06 18:46:31 +00:00
Quigley Malcolm
5f873da929 Sample Mode Alpha (#11247)
* Add `--sample` flag to `run` command

* Remove no longer needed `if` statement around EventTimeFilter creation for microbatch models

Upon the initial implementation of microbatch models, the the `start` for a batch was _optional_.
However, in c3d87b89fb they became guaranteed. Thus the if statement
guarding when `start/end` isn't present for microbatch models was no longer actually doing anything.
Hence, the if statement was safe to remove.

* Get sample mode working with `--event-time-start/end`

This is temporary as a POC. In the end, sample mode can't depend on the arguments
`--event-time-start/end` and will need to be split into their own CLI args / project
config, something like `--sample-window`. The issue with using `--event-time-start/end`
is that if people set those in the project configs, then their microbatch models would
_always_ run with those values even outside of sample mode. Despite that, this is a
useful checkpoint even though it will go away.

* Begin using `--sample-window` for sample mode instead of `--event-time-start/end`

Using `--event-time-start/end` for sample mode was conflicting with microbatch models
when _not_ running in sample mode. We will have to do _slightly_ more work to plumb
this new way of specifying sample time to microbatch models.

* Move `SampleWindow` class to `sample_window.py` in `event_time` submodule

This is mostly symbolic. We are going to be adding some utilities for "event_time"
type things, which will all live in the `event_time` submodule. Additionally we plan
to refactor `/incremental/materializations/microbatch.py` into the sub module as well.

* Create an `offset_timestamp` separate from MicrobatchBuilder

The `MicrobatchBuilder.offset_timestamp` _truncates_ the timestamp before
offsetting it. We don't want to do that, we want to offset the "raw" timestamp.
We could have split renamed the microbatch builder function name to
`truncate_and_offset_timestamp` and separated the offset logic into a separate
abstract function. However, the offset logic in the MicrobatchBuilder context
depends on the truncation. We might later on be able to refactor the Microbatch
provided function by instead truncating _after_ offsetting instead of before.
But that is out of scope for this initial work, and we should instead revisit it
later.

* Add `types-python-dateutil` to dev requirements

The previous commit began using a submodule of the dateutil builtin
python library. We weren't previously using this library, and thus didn't
need the type stubs for it. But now that we do use it, we need to have
the type stubs during development.

* Begin supporting microbatch models in sample mode

* Move parsing logic of `SampleWindowType` to `SampleWindow`

* Allow for specificaion of "specific" sample windows

In most cases people will want to set "relative" sample windows, i.e.
"3 days" to sample the last three days. However, there are some cases
where people will want to "specific" sample windows for some chunk of
historic time, i.e. `{'start': '2024-01-01', 'end': '2024-01-31'}`.

* Fix tests of `BaseResolver.resolve_event_time_filter` for sample mode changes

* Add `--no-sample` as it's necessary for retry

* Add guards to accessing of `sample` and `sample_window`

This was necessary because these aren't _always_ available. I had expected
to need to do this after putting the `sample` flag behind an environment
variable (which I haven't done yet). However, we needed to add the guards
sooner because the `render` logic is called multiple times throughout the
dbt process, and earlier on the flags aren't available.

* Gate sample mode functionality via env var `DBT_EXPERIMENTAL_SAMPLE_MODE`

At this point sample mode is _alpha_ and should not be depended upon. To make
this crystal clear we've gated the functionality behind an environment variable.
We'll likely remove this gate in the coming month.

* Add sample mode tests for incremental models

* Add changie doc for sample mode initial implementation

* Fixup sample mode functional tests

I had updated the `later_input_model.sql` to be easier to test with. However,
I didn't correspondingly update the inital `input_model.sql` to match.

* Ensure microbatch creates correct number of batches when sample mode env var isn't present

Previously microbatch was creating the _right_ number of batches when:
1. sample mode _wasn't_ being used
2. sample mode _was_ being used AND the env var was present

Unfortunately sample mode _wasn't_ creating the right number of batches when:
3. sample mode _was_ being used AND the env var _wasn't_ present.

In case (3) sample mode shouldn't be run. Unfortunately we weren't gating sample
mode by the environment variable during batch creation. This lead to a situtation
where in creating batches it was using sample mode but in the rendering of refs
it _wasn't_ using sample mode. Putting it in an inbetween state... This commit
fixes that issue.

Additionally of note, we currently have duplicate sample mode gating logic in the
batch creation as well as in the rendering of refs. We should probably consolidate
this logic into a singular importable function, that way any future changes of how
sample mode is gated is easier to implement.

* Correct comment in SampleWindow post serialization method

* Hide CLI sample mode options

We are doing this _temporarily_ while sample mode as a feature is in
alpha/beta and locked behind an environment variable. When we remove the
environment variable we should also unhide these.
2025-02-03 18:08:28 -06:00
Anders
fdabe9534c post-hoc addition of roadmap (#11259) 2025-01-30 11:48:21 -06:00
Chenyu Li
c0423707b0 loosen validation for freshness (#11253) 2025-01-28 14:20:36 -08:00
Mike Alfare
48d9afa677 point to the dbt-adapters subdirectory post-monorepo migration (#11244) 2025-01-27 19:01:01 -05:00
Kshitij Aranke
d71f309c1e Add doc_blocks to manifest for nodes and columns (#11224) 2025-01-27 19:49:02 +00:00
Emily Rockman
cb323ef78c ADAP-1183: Use the new location for dbt-postgres (#11234)
* use the new location for dbt-postgres

* Update docker/README.md
2025-01-27 10:35:14 -06:00
Quigley Malcolm
22bc1c374e [TIDY FIRST] Click option defintiion organization (alphabetization) (#11236)
* First pass of alphebetizing click option definitions

* Second pass at organizing cli param click options
2025-01-23 13:34:58 -06:00
Kshitij Aranke
31881d2a3b Misc fixes for group info in logging (#11218) 2025-01-21 11:07:25 +00:00
dependabot[bot]
1dcdcd2f52 Bump codecov/codecov-action from 4 to 5 (#11009)
* Bump codecov/codecov-action from 4 to 5

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Add automated changelog yaml from template for bot PR

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Github Build Bot <buildbot@fishtownanalytics.com>
2025-01-17 11:35:19 -06:00
Gerda Shank
3de3b827bf Fix generic test not null and unique custom configs (#11208) 2025-01-15 17:02:03 -05:00
Kshitij Aranke
8a8857a85c Fix error counts for exposures (#11207) 2025-01-10 21:07:15 +00:00
Gerda Shank
e4d5a4e777 Re-cast definition of unique_key in SnapshotConfig (#11205) 2025-01-09 16:03:17 -05:00
internetcoffeephone
b414ef2cc5 Fix microbatch dbt list --output JSON (#11187)
Currently, running this command on a project containing a microbatch
model results in an error, as microbatch models require a datetime
value in their config which cannot be serialized by the default JSON
serializer.

There already exists a custom JSON serializer within the dbt-core
project that converts datetime to ISO string format. This change uses
the above serializer to resolve the error.
2025-01-09 10:59:49 -05:00
Michelle Ark
57e279cc1b Fix exception type of run operation macro not found (#11193) 2025-01-08 10:17:40 -05:00
Quigley Malcolm
2eb1a5c3ea Always emit warning when microbatch models lack any filtered input node (#11196)
* Update `TestMicrobatchWithInputWithoutEventTime` to check running again raises warning

The first time the project is run, the appropriate warning about inputs is raised. However,
the warning is only being raised when a full parse happens. When partial parsing happens
the warning isn't getting raised. In the next commit we'll fix this issue. This commit updates
the test to show that the second run (with partial parsing) doesn't raise the update, and thus
the test fails.

* Update manifest loading to _always_ check microbatch model inputs

Of note we are at the point where multiple validations are iterating
all of the nodes in a manifest. We should refactor these _soon_ such that
we are not iterating over the same list multiple times.

* Add changie doc
2025-01-08 09:16:30 -06:00
Kshitij Aranke
dcc9a0ca29 Create LogNodeResult event (#11195)
* Create LogNodeResult event

* add msg directly during object creation
2025-01-08 14:14:29 +00:00
Devon Fulcher
892c545985 Meta config for dimensions, measures, and entities (#11190) 2025-01-07 11:17:24 -08:00
Chenyu Li
a8702b8374 add model freshness for adaptive job (#11170) 2025-01-07 10:02:52 -08:00
Daniel Cole
1592987de8 fix: partial parsing - reparse downstream nodes when adding versioning (#11184) 2025-01-07 12:12:47 -05:00
Gerda Shank
710600546a Move initialization of keyword_args up (#11188) 2025-01-06 15:01:21 -05:00
Emily Rockman
0bf38ce294 Revert "Fix circular import (#11137)" (#11175)
This reverts commit 95c090bed0.
2024-12-24 12:18:26 -05:00
Grace Goheen
459d156e85 Roadmap update (Dec 2024) (#11173)
* roadmap post december 2024

* fix yml spacing

* fix code snippet format
2024-12-20 12:56:33 -07:00
dmr
95c090bed0 Fix circular import (#11137)
Co-authored-by: Doug Beatty <44704949+dbeatty10@users.noreply.github.com>
2024-12-19 12:45:42 -08:00
Chenyu Li
f2222d2621 Custom SQL for get source maxLoadedAt (#11163) 2024-12-19 11:49:07 -08:00
Patrick Yost
97ffc37405 Add tags to SavedQueries (#10987) 2024-12-19 10:18:50 -08:00
Gerda Shank
bf18b59845 Fix for dbt_project.yml "tests" config resulting in incorrect state:modified (#11166) 2024-12-18 17:21:45 -05:00
Gerda Shank
88e953e8aa Check modified contracts when doing state:modified (#11161) 2024-12-18 15:40:18 -05:00
Gerda Shank
6076cf7114 Fix yaml snapshot specification with data tests (#11156) 2024-12-18 14:24:27 -05:00
Doug Beatty
a1757934ef Auto-response for bug reports during holiday break (#11152) 2024-12-17 07:47:31 -06:00
Quigley Malcolm
6c61cb7f7a Warn if concurrent_batches config is set to True, but the available adapter doesn't support it (#11145)
* Begin producing warning when attempting to force concurrent batches without adapter support

Batches of microbatch models can be executed sequentially or concurrently. We try to figure out which to do intelligently. As part of that, we implemented an override, the model config `concurrent_batches`, to allow the user to bypass _some_ of our automatic detection. However, a user _cannot_ for batches to run concurrently if the adapter doesn't support concurrent batches (declaring support is opt in). Thus, if an adapter _doesn't_ support running batches concurrently, and a user tries to force concurrent execution via `concurrent_batches`, then we need to warn the user that that isn't happening.

* Add custom event type for warning about invalid `concurrent_batches` config

* Fire `InvalidConcurrentBatchesConfig` warning via `warn_or_error` so it can be silenced
2024-12-16 10:35:08 -06:00
Chenyu Li
4b1f1c4029 add allow additional property for Model and SourceDefinition (#11138) 2024-12-15 23:30:48 -08:00
Kshitij Aranke
7df04b0fe4 Create a no-op exposure runner (#11082) 2024-12-12 15:28:34 +00:00
dave-connors-3
662101590d update adapter version messages (#10919) 2024-12-11 10:56:38 -05:00
Michelle Ark
fc6167a2ee fix MicrobatchExecutionDebug message (#11071)
* fix MicrobatchExecutionDebug message

* Fix typing in `describe_batch` to convince mypy `batch_start` exists when needed

---------

Co-authored-by: Quigley Malcolm <quigley.malcolm@dbtlabs.com>
2024-12-10 09:59:46 -06:00
Quigley Malcolm
983cbb4f28 Fix microbatch model PartialSuccess status to result in non-zero exit code (#11115)
* Update partial success test to assert partial successes mean that the run failed

* Update results interpretation to include `PartialSuccess` as failure status
2024-12-10 09:48:41 -06:00
Quigley Malcolm
c9582c2323 Fix erroneous additional batch execution (#11113)
* Update single batch test case to check for generic exceptions

* Explicitly skip last final batch execution when there is only one batch

Previously if there was only one batch, we would try to execute _two_
batches. The first batch, and a "last" non existent batch. This would
result in an unhandled exception.

* Changie doc
2024-12-10 09:28:07 -06:00
Michelle Ark
03fdb4c157 Microbatch first last batch serial (#11072)
* microbatch: split out first and last batch to run in serial

* only run pre_hook on first batch, post_hook on last batch

* refactor: internalize parallel to RunTask._submit_batch

* Add optional `force_sequential` to `_submit_batch` to allow for skipping parallelism check

* Force last batch to run sequentially

* Force first batch to run sequentially

* Remove batch_idx check in `should_run_in_parallel`

`should_run_in_parallel` shouldn't, and no longer needs to, take into
consideration where in batch exists in a larger context. The first and
last batch for a microbatch model are now forced to run sequentially
by `handle_microbatch_model`

* Begin skipping batches if first batch fails

* Write custom `on_skip` for `MicrobatchModelRunner` to better handle when batches are skipped

This was necessary specifically because the default on skip set the `X of Y` part
of the skipped log using the `node_index` and the `num_nodes`. If there was 2
nodes and we are on the 4th batch of the second node, we'd get a message like
`SKIPPED 4 of 2...` which didn't make much sense. We're likely in a future commit
going to add a custom event for logging the start, result, and skipping of batches
for better readability of the logs.

* Add microbatch pre-hook, post-hook, and sequential first/last batch tests

* Fix/Add tests around first batch failure vs latter batch failure

* Correct MicrobatchModelRunner.on_skip to handle skipping the entire node

Previously `MicrobatchModelRunner.on_skip` only handled when a _batch_ of
the model was being skipped. However, that method is also used when the
entire microbatch model is being skipped due to an upstream node error. Because
we previously _weren't_ handling this second case, it'd cause an unhandled
runtime exception. Thus, we now need to check whether we're running a batch or not,
and there is no batch, then use the super's on_skip method.

* Correct conditional logic for setting pre- and post-hooks for batches

Previously we were doing an if+elif for setting pre- and post-hooks
for batches, where in the `if` matched if the batch wasn't the first
batch, and the `elif` matched if the batch wasn't the last batch. The
issue with this is that if the `if` was hit, the `elif` _wouldn't_ be hit.
This caused the first batch to appropriately not run the `post-hook` but
then every hook after would run the `post-hook`.

* Add two new event types `LogStartBatch` and `LogBatchResult`

* Update MicrobatchModelRunner to use new batch specific log events

* Fix event testing

* Update microbatch integration tests to catch batch specific event types

---------

Co-authored-by: Quigley Malcolm <quigley.malcolm@dbtlabs.com>
2024-12-07 12:43:15 -06:00
Peter Webb
afe25a99fe Improve the Performance Characteristics of add_test_edges() (#11092)
* New function to add graph edges.

* Clean up, leave out flag temporarily for testing.

* Put new test edge behavior behind flag.

* Final draft of documentaiton.
2024-12-05 16:33:16 -05:00
Gerda Shank
e32b8a90ac Implement partial parsing for singular data tests configs in yaml files (#11100) 2024-12-05 15:57:56 -05:00
Peter Webb
1472b86ee2 Improve performance of select_children() and select_parents() (#11099)
* Improve performance of select_children() and select_parents()

* Add changelog entry.
2024-12-05 15:03:57 -05:00
William Deng
ff6745c795 Update core to support DSI 0.8.3 (#10990)
Co-authored-by: Courtney Holcomb <courtneyeholcomb@gmail.com>
2024-12-05 09:48:33 -08:00
Thomas Reynaud
fdfe03d561 Access DEBUG flag through get_flags() (#11069) 2024-12-04 11:03:12 -05:00
Michelle Ark
1b7d9b5704 [Tidy first] move microbatch compilation to .compile method (#11063) 2024-11-27 19:08:36 -05:00
Quigley Malcolm
c3d87b89fb Add batch context object to microbatch jinja context (#11031)
* Add `batch_id` to jinja context of microbatch batches

* Add changie doc

* Update `format_batch_start` to assume `batch_start` is always provided

* Add "runtime only" property `batch_context` to `ModelNode`

By it being "runtime only" we mean that it doesn't exist on the artifact
and thus won't be written out to the manifest artifact.

* Begin populating `batch_context` during materialization execution for microbatch batches

* Fix circular import

* Fixup MicrobatchBuilder.batch_id property method

* Ensure MicrobatchModelRunner doesn't double compile batches

We were compiling the node for each batch _twice_. Besides making microbatch
models more expensive than they needed to be, double compiling wasn't
causing any issue. However the first compilation was happening _before_ we
had added the batch context information to the model node for the batch. This
was leading to models which try to access the `batch_context` information on the
model to blow up, which was undesirable. As such, we've now gone and skipped
the first compilation. We've done this similar to how SavedQuery nodes skip
compilation.

* Add `__post_serialize__` method to `BatchContext` to ensure correct dict shape

This is weird, but necessary, I apologize. Mashumaro handles the
dictification of this class via a compile time generated `to_dict`
method based off of the _typing_ of th class. By default `datetime`
types are converted to strings. We don't want that, we want them to
stay datetimes.

* Update tests to check for `batch_context`

* Update `resolve_event_time_filter` to use new `batch_context`

* Stop testing for batchless compiled code for microbatch models

In 45daec72f4 we stopped an extra compilation
that was happening per batch prior to the batch_context being loaded. Stopping
this extra compilation means that compiled sql for the microbatch model without
the event time filter / batch context is no longer produced. We have discussed
this and _believe_ it is okay given that this is a new node type that has not
hit GA yet.

* Rename `ModelNode.batch_context` to `ModelNode.batch`

* Rename `build_batch_context` to `build_jinja_context_for_batch`

The name `build_batch_context` was confusing as
1) We have a `BatchContext` object, which the method was not building
2) The method builds the jinja context for the batch
As such it felt appropriate to rename the method to more accurately
communicate what it does.

* Rename test macro `invalid_batch_context_macro_sql` to `invalid_batch_jinja_context_macro_sql`

This rename was to make it more clear that the jinja context for a
batch was being checked, as a batch_context has a slightly different
connotation.

* Update changie doc
2024-11-27 16:06:41 -06:00
Quigley Malcolm
0f084e16ca Rename internal batch_info variable to previous_batch_results (#11056)
* Rename `batch_info` to `previous_batch_results`

* Exclude `previous_batch_results` from serialization of model node to avoid jinja context bloat

* Drop `previous_batch_results` key from `test_manifest.py` unit tests

In 4050e377ec we began excluding
`previous_batch_results` from the serialized representation of the
ModelNode. As such, we no longer need to check for it in `test_manifest.py`.
2024-11-27 10:46:45 -06:00
Apoorv Mehrotra
3464be7f70 Fixes dbt retry does not respect --threads (#10591) 2024-11-26 11:21:46 -08:00
Gerda Shank
407f6caa1c Pin mashumaro to <3.15 (#11046) 2024-11-25 10:49:17 -05:00
Peter Webb
ad575ec699 Add New Config Properties and Schema for Snapshot Hard Deletes (#10972)
* Add changelog entry.

* Update schemas and test fixtures for new snapshot meta-column

* Add back comment.
2024-11-21 18:15:30 -05:00
Kshitij Aranke
f582ac2488 Fix #11012: Catch DbtRuntimeError for hooks (#11023) 2024-11-21 22:27:45 +00:00
Gerda Shank
f5f0735d00 Bump libpq-dev to 13.18-0+deb11u1 in docker/Dockerfile (#11029) 2024-11-21 17:24:53 -05:00
FishtownBuildBot
3abf575fa6 Cleanup main after cutting new 1.9.latest branch (#11027)
* Clean up changelog on main

* Bumping version to 1.10.0a1

* Code quality cleanup

* add 1.8,1.9 link

---------

Co-authored-by: Emily Rockman <emily.rockman@dbtlabs.com>
2024-11-21 15:54:56 -06:00
Michelle Ark
a42303c3af make microbatch models skippable (#11020) 2024-11-21 12:40:37 -05:00
Jeremy Cohen
6fccfe84ea Fix plural of "partial success" (#11002) 2024-11-21 11:33:45 -05:00
Michelle Ark
fd6ec71dab Microbatch parallelism (#10958) 2024-11-21 00:31:47 -05:00
Gerda Shank
ae957599e1 Fix restrict-access to not restrict within same package (#11014) 2024-11-20 19:05:54 -05:00
Gerda Shank
f080346227 Use protobuf >=5.0,<=6.0 (#10969) 2024-11-19 17:37:19 -05:00
Doug Beatty
2a75dd4683 Parseable JSON and text output in quiet mode for dbt show and dbt compile (#9958)
* Allow `dbt show` and `dbt compile` to output JSON without extra logs

* Add `quiet` attribute for ShowNode and CompiledNode messages

* Output of protoc compiler

* Utilize the `quiet` attribute for ShowNode and CompiledNode

* Reuse the `dbt list` approach when the `--quiet` flag is used

* Use PrintEvent to get to stdout even if the logger is set to ERROR

* Functional tests for quiet compile

* Functional tests for quiet show

* Fire event same way regardless if LOG_FORMAT is json or not

* Switch back to firing ShowNode and CompiledNode events

* Make `--inline-direct` to be quiet-compatible

* Temporarily change to dev branch for dbt-common

* Remove extraneous newline

* Functional test for `--quiet` for `--inline-direct` flag

* Update changelog entry

* Update `core_types_pb2.py`

* Restore the original branch in `dev-requirements.txt`

---------

Co-authored-by: Kshitij Aranke <kshitij.aranke@dbtlabs.com>
2024-11-18 21:37:44 -07:00
Michelle Ark
945539e3ae add index.html to .gitignore (#11008) 2024-11-15 17:31:08 -05:00
bruno messias
84230ce333 fix: override materialization python models (#8538) 2024-11-14 10:31:23 -08:00
Michelle Ark
35c09203ad fire GenericExceptionOnRun for batch-level exception (#11003) 2024-11-14 12:50:16 -05:00
bruno messias
1625eb059a fix: unit tests with versioned refs (#10889) 2024-11-14 11:41:45 -05:00
Kshitij Aranke
2c43af897d Fix #10988: Validate manifest has group_map during group_lookup init (#10995) 2024-11-14 10:59:34 -05:00
Quigley Malcolm
6e1f64f8b4 Bump minimum dbt-adapters requirement to 1.9.0 (#10998)
This is needed for dbt-core + dbt-adapters to work properly in regards to
the microbatch project_flag/behavior flag `require_batched_execution_for_custom_microbatch_strategy`
2024-11-13 13:19:01 -06:00
Michelle Ark
e9a2b548cb fix deprecation firing for microbatch model w custom strategy (#10989) 2024-11-13 13:52:11 -05:00
Michelle Ark
89caa33fb4 Replace environment variable with a project flag to gate microbatch functionality (#10799)
* first pass: replace os env with project flag

* Fix `TestMicrobatchMultipleRetries` to not use `os.env`

* Turn off microbatch project flag for `TestMicrobatchCustomUserStrategyDefault` as it was prior to a9df50f

* Update `BaseMicrobatchTest` to turn on microbatch via project flags

* Add changie doc

* Fix functional tests after merging in main

* Add function to that determines whether the new microbatch functionality should be used

The new microbatch functionality is, unfortunately, potentially dangerous. That is
it adds a new materalization strategy `microbatch` which an end user could have
defined as a custom strategy previously. Additionally we added config keys to nodes,
and as `config` is just a Dict[str, Any], it could contain anything, thus meaning
people could already be using the configs we're adding for different purposes. Thus
we need some intellegent gating. Specifically something that adheres to the following:

cms = Custom Microbatch Strategy
abms = Adapter Builtin Microbatch Strategy
bf = Behavior flag
umb = Use Microbatch Batching
t/f/e = True/False/Error

| cms | abms | bf | umb |
| t   | t    | t  | t   |
| f   | t    | t  | t   |
| t   | f    | t  | t   |
| f   | f    | t  | e   |
| t   | t    | f  | f   |
| f   | t    | f  | t   |
| t   | f    | f  | f   |
| f   | f    | f  | e   |

(The above table assumes that there is a microbatch model present in the project)

In order to achieve this we need to check that either the microbatch behavior
flag is set to true OR microbatch materializaion being used is the _root_ microbatch
materialization (i.e. not custom). The function we added in this commit,
`use_microbatch_batches`, does just that.

* Gate microbatch functionality by `use_microbatch_batches` manifest function

* Rename microbatch behavior flag to `require_batched_execution_for_custom_microbatch_strategy`

* Extract logic of `find_macro_by_name` to `find_macro_candiate_by_name`

In 0349968c61 I had done this for the function
`find_materialization_macro_by_name`, but that wasn't the right function to
do it to, and will be reverted shortly. `find_materialization_macro_by_name`
is used for finding the general materialization macro, whereas `find_macro_by_name`
is more general. For the work we're doing, we need to find the microbatch
macro, which is not a materialization macro.

* Use `find_macro_candidate_by_name` to find the microbatch macro

* Fix microbatch macro locality check to search for `core` locality instead of `root`

Previously were were checking for a locality of `root`. However, a locality
of `root` means it was provided by a `package`. We wnt to check for locality
of `core` which basically means `builtin via dbt-core/adapters`. There is
another locality `imported` which I beleive means it comes from another
package.

* Move the evaluation of `use_microbatch_batches` to the last position in boolean checks

The method `use_microbatch_batches` is always invoked to evaluate an `if`
statement. In most instances, it is part of a logic chain (i.e. there are
multiple things being evaluated in the `if` statement). In `if` statements
where there are multiple things being evaulated, `use_microbatch_batches`
should come _last_ (or as late as possible). This is because it is likely
the most costly thing to evaluate in the logic chain, and thus any shortcuts
cuts via other evaluations in the if statement failing (and thus avoiding
invoking `use_microbatch_batches) is desirable.

* Drop behavior flag setting for BaseMicrobatchTest tests

* Rename 'env_var' to 'project_flag' in test_microbatch.py

* Update microbatch tests to assert when we are/aren't running with batches

* Update `test_resolve_event_time_filter` to use `use_microbatch_batches`

* Fire deprecation warning for custom microbatch macros

* Add microbatch deprecation events to test_events.py

---------

Co-authored-by: Quigley Malcolm <quigley.malcolm@dbtlabs.com>
2024-11-11 08:49:17 -06:00
Michelle Ark
30b8a92e38 [Fix] assert resolver.model is ModelNode prior to resolving event_time_filter (#10975) 2024-11-06 16:02:41 -05:00
FishtownBuildBot
b95f7a7f2c [Automated] Merged prep-release/1.9.0b4_11711043647 into target main during release process 2024-11-06 15:37:57 -05:00
Michelle Ark
e451a371e6 Ensure inferred primary_key is a List[str] (#10984) 2024-11-06 15:31:54 -05:00
Tim Sturge
81067d4fc4 Support disabling unit tests (#10831) 2024-11-06 15:20:35 -05:00
Github Build Bot
3198ce4809 Bumping version to 1.9.0b4 and generate changelog 2024-11-06 20:08:59 +00:00
Emily Rockman
0c51985c83 upgrade macos version (#10974)
* upgrade to macos-latest

* force link
2024-11-06 11:56:08 -06:00
Devon Fulcher
e26af57989 Behavior change cumulative type param (#10909)
* Behavior change for mf timespinse without yaml config

* Flipping behavior flag causes parse error

* Added more tests

* Appending just one error
2024-11-05 14:22:56 -08:00
Gerda Shank
bdf28d7eff Support --empty option for 'snapshot' command (#10962) 2024-11-01 13:47:28 -04:00
Quigley Malcolm
289d2dd932 Ensure KeyboardInterrupt halts microbatch model execution (#10879) 2024-10-31 13:35:44 -05:00
Devon Fulcher
8a17a0d7e7 Behavior change for mf timespine without yaml configuration (#10857) 2024-10-31 11:40:39 -04:00
Quigley Malcolm
8c6bec4fb5 Emit ArtifactWritten event when artifacts are written (#10940)
* Add new `ArtifactWritten` event

* Emit ArtifactWritten event whenever an artifact is written

* Get artifact_type from class name for ArtifactWritten event

* Add changie docs

* Add test to check that ArtifactWritten events are being emitted

* Regenerate core_types_pb2.py using correct protobuf version

* Regen core_types_pb2 again, using a more correct protoc version
2024-10-30 15:05:50 -05:00
Quigley Malcolm
7f5abdc565 Ensure run results artifact get written during "after run hooks" (#10941)
* Add unit tests to check how `safe_run_hooks` handles exceptions

* Improve exception handling in `get_execution_status`

Previously in `get_execution_status` if a non `DbtRuntimeError` exception was
raised, the finally would be entered, but the `status`/`message` would not be
set, and thus a `status not defined` exception would get raised on attempting
to return. Tangentially, there is another issue where somehow the `node_status`
is becoming `None`. In all my playing with `get_execution_status` I found that
trying to return an undefined variable in the `finally` caused an undefined
variable exception. However, if in some python version, it instead just handed
back `None`, then this fix should also solve that.

* Add changie docs

* Ensure run_results get written if KeyboardInterrupt happens during end run hooks
2024-10-30 14:53:09 -05:00
FishtownBuildBot
f714e84282 [Automated] Merged prep-release/1.9.0b3_11600026512 into target main during release process 2024-10-30 15:39:06 -04:00
Github Build Bot
7f92c6e003 Bumping version to 1.9.0b3 and generate changelog 2024-10-30 19:12:00 +00:00
Quigley Malcolm
8de0229a04 Bump dbt adapters minior minimum to 1.8.0 (#10947)
* Bump minimum dbt-adpaters to 1.8.0

In https://github.com/dbt-labs/dbt-core/pull/10859 we started using the
`get_adapter_run_info` method provided by `dbt-adapters`. However that
function is only available in dbt-adapters >= 1.8.0. Thus 1.8.0 is our
new minimum for dbt-adapters.

* Add changie doc
2024-10-30 14:07:56 -05:00
Quigley Malcolm
dd77210756 Update microbatch end_time to the batch_size ceiling (#10883)
* Add function to MicrobatchBuilder to get ceiling of timestamp by batch_size

* Update `MicrobatchBuilder.build_end_time` to use `ceiling_timestamp`

* fix TestMicrobatchBuilder.test_build_end_time by specifying a BatchSize + asserting actual is a ceiling timestamp

* Add changie

---------

Co-authored-by: Michelle Ark <michelle.ark@dbtlabs.com>
2024-10-29 17:26:28 -05:00
Quigley Malcolm
8df5c96f3d Make --event-time-start and --event-time-end mutually required (#10878)
* Stop validating that `--event-time-start` is before "current" time

In the next commit we'll be adding a validation that requires that `--event-time-start`
and `--event-time-end` are mutually required. That is, whenever one is specified,
the other is required. In that world, `--event-time-start` will never need to be compared
against the "current" time, because it'll never be run in conjunction with the "current"
time.

* Validate that `--event-time-start` and `--event-time-end` are mutually present

* Add changie doc for validation changes

* Alter functional microbatch tests to work with updated `event_time_start/end` reqs

We made it such that when `event_time_start` is specified, `event_time_end` must also
be specified (and vice versa). This broke numerous tests, in a few different ways:

1. There were tests that used `--event-time-start` without `--event-time-end` butg
were using event_time_start essentially as the `begin` time for models being initially
built or full refreshed. These tests could simply drop the `--event-time-start` and
instead rely on the `begin` value.

2. There was a test  that was trying to load a subset of the data _excluding_ some
data which would be captured by using `begin`. In this test we added an appropriate
`--event-time-end` as the `--event-time-start` was necessary to statisfy what the
test was testing

3. There was a test which was trying to ensure that two microbatch models would be
given the same "current" time. Because we wanted to ensure the "current" time code
path was used, we couldn't add `--event-time-end` to resolve the problem, thus we
needed to remove the `--event-time-start` that was being used. However, this led to
the test being incredibly slow. This was resolved by switching the relevant microbatch
models from having `batch_size`s of `day` to instead have `year`. This solution should
be good enough for roughly ~40 years? We'll figure out a better solution then, so see ya
in 2064. Assuming I haven't died before my 70th birthday, feel free to ping me to get
this taken care of.

---------

Co-authored-by: Michelle Ark <michelle.ark@dbtlabs.com>
2024-10-29 15:31:19 -05:00
Michelle Ark
6b5db1796f raise MicrobatchModelNoEventTimeInputs warning when no microbatch input has event_time config (#10929) 2024-10-29 11:20:44 -04:00
Michelle Ark
3224589fe7 restore dev-requirements for dbt-adapters@main (#10930) 2024-10-28 17:56:30 -04:00
Michelle Ark
b71ceb3166 Microbatch: store model context var as dict, not ModelNode (#10917) 2024-10-28 17:26:49 -04:00
Mila Page
4d4b05effc Add adapter telemetry to snowplow event. (#10859)
* Add adapter telemetry to snowplow event.

* Temporary dev branch switch.

* Set tracking for overrideable adapter method.

* Do safer adapter ref.

* Improve comment.

* Code review comments.

* Don't call the asdict on a dict.

* Bump ci to pull in fix from base adapter.

* Add unit tests for coverage.

* Update field name from base adapter/schema change.

* remove breakpoint.
2024-10-28 14:21:42 -07:00
Michelle Ark
316ecfca28 Fix: Source quoting ignores global configuration (#10905) 2024-10-25 10:33:21 -04:00
Quigley Malcolm
d07bfda9df Change microbatch lookback default from 0 to 1 (#10876)
* Change `lookback` default from `0` to `1`

* Regen jsonschema manifest v12 to include `lookback` default change

* Regen saved state of v12 manifest for functional artifact testing

* Add changie doc for lookback default change
2024-10-24 17:16:32 -05:00
Doug Beatty
8ae689c674 Fix regression when an exposure references a deprecated model (#10915)
* Avoid a KeyError if `child_unique_id` is not found in the dictionary

* Changelog entry

* Functional test when an exposure references a deprecated model
2024-10-24 12:13:56 -06:00
Gerda Shank
bdb79e8626 Partial parse yaml snapshots (#10907) 2024-10-23 14:16:33 -04:00
Gerda Shank
f7b7935a97 Support multiple unique keys in snapshots (#10795) 2024-10-22 14:47:51 -04:00
Peter Webb
3d96b4e36c Loosen Type in TimingInfo (#10897) 2024-10-21 19:01:15 -04:00
Quigley Malcolm
7920b0e71d Update microbatch tests to handle update wherein incremental strategies are always validated (#10884)
dbt-adapters updated the incremental_strategy validation of incremental models such that
the validation now _always_ happens when an incremental model is executed. A test in dbt-core
`TestMicrobatchCustomUserStrategyEnvVarTrueInvalid` was previously set to _expect_ buggy behavior
where an incremental model would succeed on it's "first"/"refresh" run even if it had an invalid
incremental strategy. Thus we needed to update this test in dbt-core to expect the now correct
behavior of incremental model execution time validation
2024-10-21 13:10:00 -07:00
Chenyu Li
a0674db840 exclude hook results from results in on-run-end context (#10885)
* exclude hook results from results in on-run-end context

* changelog

* preserve previous behavior
2024-10-18 15:07:03 -07:00
Kshitij Aranke
ba6c7baf1d [Tidy-First]: Fix timings object for hooks and macros, and make types of timings explicit (#10882)
* [Tidy-First]: Fix `timings` object for hooks and macros, and make types of timings explicit

* cast literal to str

* change test

* change jsonschema to enum

* Discard changes to schemas/dbt/manifest/v12.json

* nits

---------

Co-authored-by: Chenyu Li <chenyu.li@dbtlabs.com>
2024-10-18 17:28:58 -04:00
Paul Yang
8be063502b Add order_by and limit fields to saved queries (#10532)
* Add `order_by` and `limit` fields to saved queries.

* Update JSON schema

* Add change log for #10531.

* Check order by / limit in saved-query parsing test.
2024-10-17 10:54:30 -07:00
Gerda Shank
78c05718c5 Remove Python 3.8 from various places (#10861)
* Remove Python 3.8 from various places

* Add changelog entry.

---------

Co-authored-by: Peter Allen Webb <peter.webb@dbtlabs.com>
2024-10-16 15:15:27 -04:00
Quigley Malcolm
d18f50bbb8 Ensure consistent current_time across microbatch models in an invocation (#10830)
* Add test that checks microbatch models are all operating with the same `current_time`

* Set an `invocated_at` on the `RuntimeConfig` and plumb to `MicrobatchBuilder`

* Add changie doc

* Rename `invocated_at` to `invoked_at`

* Simply conditional logic for setting MicrobatchBuilder.batch_current_time

* Rename `batch_current_time` to `default_end_time` for MicrobatchBuilder
2024-10-15 16:55:19 -05:00
Gerda Shank
ffa75ca9ff Refactor code to properly handle reference deprecations (#10852) 2024-10-15 16:44:27 -04:00
Gerda Shank
8f847167fa Remove dbt_valid_to_current test (will go in adapter zone) (#10854) 2024-10-15 15:39:01 -04:00
Kshitij Aranke
cd6bb9e782 Fix #2578: Allow instances of generic data tests to be documented (#10850) 2024-10-15 18:53:51 +01:00
Kshitij Aranke
ef9abe6c06 [Tidy-First] Fix node_status for hooks (#10845) 2024-10-14 21:27:34 +01:00
Peter Webb
40c350ff21 Add better typing in jinja_static.py (#10835)
* Add better typing in jinja_static.py, remove commented code, clarify names

* Avoid circular dependency.

* Actually work around the circular dependency.
2024-10-11 12:19:37 -04:00
Gerda Shank
c7d8693f70 Enable setting datetime value for dbt_valid_to when the record is current (#10780) 2024-10-10 18:41:03 -04:00
Colin Rogers
6743e32574 add builder config to test node config (#10767)
* add builder config to node config

* add changie

* raise expected exceptions

* add code comment and additional tests

* update tests

* update tests
2024-10-10 14:32:19 -07:00
Quigley Malcolm
f6cdacc61e Stop making microbatch batches with filters that will never have any rows (#10826) 2024-10-08 18:56:10 -05:00
Quigley Malcolm
5db0b81da1 Track batch execution time for microbatch models (#10828)
* Begin testing that microbatch execution times are being tracked and set

* Begin tracking the execution time of batches for microbatch models

* Add changie doc

* Additional assertions in microbatch testing
2024-10-08 14:32:58 -05:00
Quigley Malcolm
fc8eb820aa Validate --event-time-start is before --event-time-end (#10820)
* Validate that `event_time_start` is before `event_time_end` when passed from CLI

Sometimes CLI options have restrictions based on other CLI options. This is the case
for `--event-time-start` and `--event-time-end`. Unfortunately, click doesn't provide
a good way for validating this, at least not that I found. Additionaly I'm not sure
if we have had anything like this previously. In any case, I couldn't find a
centralized validation area for such occurances. Thus I've gone and added one,
`validate_option_interactions`. Long term if more validations are added, we should
add this wrapper to each CLI command. For now I've only added it to the commands that
support `event_time_start` and `event_time_end`, specifically `build` and `run`.

* Add changie doc

* If `--event-time-end` is not specififed, ensure `--event-time-start` is less than the current time

* Fixup error message about event_time_start and event_time_end

* Move logic to validate `event_time` cli flags to `flags.py`

* Update validation of `--event-time-start` against `datetime.now` to use UTC
2024-10-07 14:34:42 -05:00
FishtownBuildBot
fc83f5edfa [Automated] Merged prep-release/1.9.0b2_11213923466 into target main during release process 2024-10-07 07:17:39 -04:00
Github Build Bot
8248d1eb53 Bumping version to 1.9.0b2 and generate changelog 2024-10-07 10:50:33 +00:00
Kshitij Aranke
6b9c1da1ae Revert "state:modified vars, behind "state_modified_compare_vars" behaviour flag" (#10793) (#10813) 2024-10-02 21:00:48 +01:00
Courtney Holcomb
7940ad5c78 Fix case-sensitivity in validation warning (#10807) 2024-10-01 15:40:51 -05:00
Doug Beatty
3ec8fa79bd --inline-direct is an internal CLI flag (#10806) 2024-10-01 14:28:41 -06:00
FishtownBuildBot
396cf2d683 [Automated] Merged prep-release/1.9.0b1_11131260909 into target main during release process 2024-10-01 14:57:06 -04:00
Github Build Bot
87b1143a62 Bumping version to 1.9.0b1 and generate changelog 2024-10-01 18:30:08 +00:00
Kshitij Aranke
75a09621cd [tidy_first] Set default for STATE_MODIFIED_COMPARE_VARS flag, mark TestProjInfo as not a test class (#10805) 2024-10-01 17:27:44 +01:00
Kshitij Aranke
5e9f1b515f [Round 2] Fix #9005: Allow singular tests to be documented in properties.yml (#10792) 2024-10-01 08:05:36 +01:00
Quigley Malcolm
25a68a990c When retrying microbatch models, propagate prior successful state (#10802)
* When retrying microbatch models, propagate prior successful state

* Changie doc for microbatch dbt retry fixes

* Fix test_manifest unit tests for batch_info key

* Add functional test for when a microbatch model has multiple retries

* Add comment about when batch_info will be something other than None
2024-10-01 00:16:05 -05:00
Michelle Ark
a86e2b4ffc [state:modified] store unrendered_database and unrendered_schema on source definition for state:modified comparisons (#10675) 2024-09-30 17:50:33 +02:00
Michelle Ark
94917432f9 add model_incremental_strategy to track_model_run (#10758) 2024-09-30 17:35:33 +02:00
Michelle Ark
d1857b39ca state:modified vars, behind "state_modified_compare_vars" behaviour flag (#10793) 2024-09-30 16:32:37 +02:00
Kshitij Aranke
2ff3f20863 Create skip_nodes_if_on_run_start_fails behavior change flag (#10699) 2024-09-30 13:53:08 +01:00
Courtney Holcomb
5e3d418264 Add new validations for custom granularities (#10789)
* Bump DSI to latest version to ensure mantle users have new validations for custom granularities

* Changelog
2024-09-27 08:37:04 -05:00
Chenyu Li
5d32aa8b62 Revert "Fix #9005: Allow singular tests to be documented in properties.yml" (#10790)
This reverts commit 3ac20ce7a8.
2024-09-26 17:03:10 -07:00
Quigley Malcolm
d8b1bf53f7 [CT-10785] Microbatch models should respect full_refresh model config (#10788)
* Add tests to check how microbatch models respect `full_refresh` model configs

* Fix `_is_incremental` to properly respect `full_refresh` model config

In dbt-core, it is generally expected that values passed via CLI flags take
precedence over model level configs. However, `full_refresh` on a model is an
exception to this rule, where in the model config takes precedence. This
config exists specifically to _prevent_ accidental full refreshes of large
incremental models, as doing so can be costly. **_It is actually best
practice_** to set `full_refresh=False` on incremental models.

Prior to this commit, for microbatch models, the above was not happening. The
CLI flag `--full-refresh` was taking precedence over the model config
`full_refresh`. That meant that if `--full-refresh` was supplied, then the
microbatch model **_would full refresh_** even if `full_refresh=False` was
set on the model. This commit solves that problem.

* Add changie doc for microbatch `full_refresh` config handling
2024-09-26 16:43:14 -05:00
Kshitij Aranke
1076352293 [CORE-388] Add group metadata info to LogModelResult and LogTestResult (#10775) 2024-09-26 20:57:06 +01:00
Gerda Shank
1fe9c1bbfe Attempt to skip saved query processing when no semantic manifest changes (#10784) 2024-09-26 13:04:19 -04:00
Quigley Malcolm
41e4836c0f Fix changie doc for microbatch retry functionality (#10787)
The changie log was referencing the microbatch epic instead of the specific
issues it resolved
2024-09-26 11:34:41 -05:00
Michelle Ark
b590045b9f [state:modified] persist unrendered_config from schema.yml, and more reliably compute unrendered_config from .sql files (#10487) 2024-09-26 16:03:40 +01:00
Quigley Malcolm
1fd4d2eae6 Enable retry support for Microbatch models (#10751)
* Add `PartialSuccess` status type and use it for microbatch models with mixed results

* Handle `PartialSuccess` in `interpret_run_result`

* Add `BatchResults` object to `BaseResult` and begin tracking during microbatch runs

* Ensure batch_results being propagated to `run_results` artifact

* Move `batch_results` from `BaseResult` class to `RunResult` class

* Move `BatchResults` and `BatchType` to separate arifacts file to avoid circular imports

In our next commit we're gonna modify `dbt/contracts/graph/nodes.py` to import the
`BatchType` as part of our work to implement dbt retry for microbatch model nodes.
Unfortunately, the import in `nodes.py` creates a circular dependency because
`dbt/artifacts/schemas/results.py` imports from `nodes.py` and `dbt/artifacts/schemas/run/v5/run.py`
imports from that `results.py`. Thus the new import creates a circular import. Now this
_shouldn't_ be necessary as nothing in artifacts should import from the rest of dbt-core.
However, we do. We should fix this, but this is also out of scope for this segement of work.

* Add `PartialSuccess` as a retry-able status, and use batches to retry microbatch models

* Fix BatchType type so that the first datetime is no longer Optional

* Ensure `PartialSuccess` causes skipping of downstream nodes

* Alter `PartialSuccess` status to be considered an error in `interpret_run_result`

* Update schemas and test artifacts to include new batch_results run results key

* Add functional test to check that 'dbt retry' retries 'PartialSuccess' models

* Update partition failure test to assert downstream models are skipped

* Improve `success`/`error`/`partial success` messaging for microbatch models

* Include `PartialSuccess` in status that `--fail-fast` counts as a failure

* Update `LogModelResult` to handle partial successes

* Update `EndOfRunSummary` to handle partial successes

* Cleanup TODO comment

* Raise a DbtInternalError if we get a batch run result without `batch_results`

* When running a microbatch model with supplied batches, force non full-refresh behavior

This is necessary because of retry. Say on the initial run the microbatch model
succeeds on 97% of it's batches. Then on retry it does the last 3%. If the retry
of the microbatch model executes in full refresh mode it _might_ blow away the
97% of work that has been done. This edge case seems to be adapter specific.

* Only pass batches to retry for microbatch model when there was a PartialSuccess

In the previous commit we made it so that retries of microbatch models wouldn't
run in full refresh mode when the microbatch model to retry has batches already
specified from the prior run. This is only problematic when the run being retried
was a full refresh AND all the batches for a given microbatch model failed. In
that case WE DO want to do a full refresh for the given microbatch model. To better
outline the problem, consider the following:

* a microbatch model had a begin of `2020-01-01` and has been running this way for awhile
* the begin config has changed to `2024-01-01` and  dbt run --full-refresh gets run
* every batch for an microbatch model fails
* on dbt retry the the relation is said to exist, and the now out of range data (2020-01-01 through 2023-12-31) is never purged

To avoid this, all we have to do is ONLY pass the batch information for partially successful microbatch
models. Note: microbatch models only have a partially successful status IFF they have both
successful and failed batches.

* Fix test_manifest unit tests to know about model 'batches' key

* Add some console output assertions to microbatch functional tests

* add batch_results: None to expected_run_results

* Add changie doc for microbatch retry functionality

* maintain protoc version 5.26.1

* Cleanup extraneous comment in LogModelResult

---------

Co-authored-by: Michelle Ark <michelle.ark@dbtlabs.com>
2024-09-26 08:45:47 -05:00
Gerda Shank
ac66f91351 Improve performance of infer primary key (#10782) 2024-09-25 18:16:33 -04:00
Peter Webb
359a2c0cc5 Add '--inline-direct' parameter to 'dbt show'. (#10770)
* Add '--inline-direct' parameter to 'dbt show'.

* Add changelog entry.

* Update core/dbt/cli/main.py

Co-authored-by: Doug Beatty <44704949+dbeatty10@users.noreply.github.com>

* Add test of failure for --inline-direct

---------

Co-authored-by: Kshitij Aranke <kshitij.aranke@dbtlabs.com>
Co-authored-by: Doug Beatty <44704949+dbeatty10@users.noreply.github.com>
2024-09-25 12:31:05 -04:00
Quigley Malcolm
bbdb98fa5d Microbatch Config Validation (#10752) 2024-09-24 19:56:34 +01:00
Katsuya Shimabukuro
a8d4ba2b4a Fix unit tests for incremental models with alias (#10755) 2024-09-24 17:57:37 +01:00
Doug Beatty
09e973d24a Test case for merge_exclude_columns (#8268)
* Test case for `merge_exclude_columns`

* Update expected output for `merge_exclude_columns`

* Skip TestMergeExcludeColumns test

* Enable this test since PostgreSQL 15+ is available in CI now

* Undo modification to expected output
2024-09-24 08:10:44 -06:00
Michelle Ark
730e40a867 Add required 'begin' config support for microbatch models (#10756) 2024-09-24 14:13:02 +01:00
Michelle Ark
a1e4753020 Write microbatch compiled + run code to separate target files (#10743) 2024-09-24 14:12:44 +01:00
Kshitij Aranke
3ac20ce7a8 Fix #9005: Allow singular tests to be documented in properties.yml (#10744) 2024-09-24 13:15:03 +01:00
Michelle Ark
aa23af98e5 ignore --empty in unit test ref/source calls (#10764) 2024-09-23 23:36:28 +01:00
Peter Webb
46da967115 Allow snapshots to be defined with YAML only. (#10762) 2024-09-23 16:33:30 -04:00
Gerda Shank
db694731c9 Allow configuration of snapshot column names (#10608) 2024-09-20 19:31:05 -04:00
Doug Beatty
7016cd3085 Standardize returning ResourceTypeSelector instances in dbt list and dbt build (#10739)
* Remove duplicated constructor for `ResourceTypeSelector`

* Add type annotation for `ResourceTypeSelector`

* Standardize on constructor for `ResourceTypeSelector` where `include_empty_nodes=True`

* Changelog entry
2024-09-19 16:53:16 -06:00
Doug Beatty
9ca10fbfd9 Enable --resource-type and --exclude-resource-type CLI flags and environment variables for dbt test (#10706)
* Adding logic to TestSelector to remove unit tests if they are in excluded_resource_types

* Adding change log

* Respect `--resource-type` and `--exclude-resource-type` CLI flags and associated environment variables

* Test CLI flag for excluding unit tests for the `dbt test` command

* Satisy isort pre-commit hook

* Fix mypy for positional argument "resource_types" in call to "TestSelector"

* Replace `TestSelector` with `ResourceTypeSelector`

* Add co-author

* Update changelog description

* Add functional tests for new feature

* Compare the actual results, not just the count

* Remove test case covered elsewhere

* Test for `DBT_EXCLUDE_RESOURCE_TYPES` environment variable for `dbt test`

* Update per pre-commit hook

* Restore to original form (until we refactor extraneous `ResourceTypeSelector` references later)

---------

Co-authored-by: Matthew Cooper <asimov.1st@gmail.com>
2024-09-19 16:52:59 -06:00
Quigley Malcolm
3308a4365e Split out model vs microbatch execution (#10737) 2024-09-18 22:13:50 -05:00
Mike Alfare
f8bfd32ed6 fix mock in unit test after removing deprecated snowplow method (#10738) 2024-09-18 15:45:11 -07:00
Mike Alfare
3e437a6734 snowplow is deprecating track_struct_event; use StructuredEvent instead (#10736) 2024-09-18 16:29:18 -04:00
Doug Beatty
9e633f6178 Replace TestSelector with ResourceTypeSelector (#10718)
* [tidy first] Replace `TestSelector` with `ResourceTypeSelector`

* Changelog entry

* Fully preserve current behavior

* Revert "Fully preserve current behavior"

This reverts commit ceecfec96d.
2024-09-18 14:13:50 -06:00
Mike Alfare
d182d06644 Add Snowplow tracking for behavior flags (#10721)
* add behavior deprecation snowplow callback
* update tests for new callback
* update test input with the new required field
2024-09-18 15:09:23 -04:00
Peter Webb
054c6fde37 Fix calls to pre_model_hook which were apparently passing an object of the wrong type. (#10735) 2024-09-18 14:09:02 -04:00
Ly Nguyen
4c326e40b5 Update template for docs issues (#10731)
* Update template for docs issues

* Update .github/workflows/docs-issue.yml

* Update .github/workflows/docs-issue.yml

* Update .github/workflows/docs-issue.yml
2024-09-18 13:02:26 -05:00
Michelle Ark
8fe5ea1ee7 Microbatch: batched execution (#10677)
* initial rough-in with CLI flags

* dbt-adapters testing against event-time-ref-filtering

* fix TestList

* Checkpoint

* fix tests

* add event_time_start params to build

* rename configs

* Gate resolve_event_time_filter via micro batch strategy and fix strptime usage

* Add unit test for resolve_event_time_filter

* Additional unit tests for `resolve_event_time_filter` to ensure lookback + batch_size work

* Remove extraneous comments and print statements from resolve_event_time_filter

* Fixup microbatch functional tests to use microbatch strategy

* Gate microbatch functionality behind env_var while in beta

* Add comment about how _is_incremental should be removed

* Improve `event_time_start/end` cli parameters to auto convert to datetime objects

* for testing: dbt-postgres 'microbatch' strategy

* rough in: chunked backfills

* partial failure of microbatch runs

* decouple run result methods

* initial refactor

* rename configs to __dbt_internal

* update compiled_code in context after re-compilation

* finish rename of context vars

* changelog entry

* fix patch_microbatch_end_time

* refactor into MicrobatchBuilder

* fix provider unit tests + add unit tests for MicrobatchBuilder

* add TestMicrobatchJinjaContextVarsAvailable

* unit test offset + truncate timestamp methods

* Remove pairing.md file

* Add tying to microbatch specific functions added in `task/run.py`

* Add doc strings to microbatch.py functions and classes

* Set microbatch node status to `ERROR` if all batches for node failed

* Fire an event for batch exceptions instead of directly printing

* Fix firing of failed microbatch log event

---------

Co-authored-by: Quigley Malcolm <quigley.malcolm@dbtlabs.com>
2024-09-18 11:46:06 -05:00
Doug Beatty
16f5023f4d Fix --resource-type test for dbt list and dbt build (#10730)
* Update functional tests to cover this case

* Revert "Update functional tests to cover this case"

This reverts commit 4c78e816f6.

* New functional tests to cover the resource_type config

* Separate data tests from unit tests for `resource_types` config of `dbt list` and `dbt build`

* Changelog entry
2024-09-18 10:21:14 -06:00
Courtney Holcomb
c6b8f7e595 Add custom granularities to YAML spec (#10664)
* Add custom granularities to YAML spec

* Changelog

* Add tests

* Remove unneeded duplicate classes
2024-09-17 13:02:56 -05:00
Michelle Ark
77aeb3ea68 Add functional tests for custom incremental strategies names 'microbatch' (#10716)
* Add functional tests for custom incremental strategies names 'microbatch'

* Point dev-requirement of `dbt-adapters` back to the main branch

The associated branch/PR in `dbt-adapters` that we were previously
pointing to has been merged. Thus we can point back to `main` again.

---------

Co-authored-by: Quigley Malcolm <quigley.malcolm@dbtlabs.com>
2024-09-16 14:38:14 -05:00
Emily Rockman
1e20772d33 Update docs-issue.yml (#10720) 2024-09-16 11:59:15 -05:00
Doug Beatty
8ce2c46a2f [tidy first] Fix a couple misspellings (#10717) 2024-09-16 10:02:30 -06:00
Gerda Shank
aeaaedcaa1 Update docs and title for schemas.getdbt.com changes (#10719) 2024-09-16 11:11:08 -04:00
Michelle Ark
6c111f2e31 add patch_microbatch_event_time (#10712) 2024-09-13 22:01:31 -04:00
Michelle Ark
139b9ac54f delete extraneous EventCatcher (#10710) 2024-09-13 18:19:33 -04:00
Michelle Ark
cc8541c05f Microbatch: event_time ref + source filtering (#10594) 2024-09-12 18:16:04 -04:00
Michelle Ark
ab500a9709 install postgres-16 in CI (#10687) 2024-09-11 12:43:33 -04:00
448 changed files with 61459 additions and 6130 deletions

View File

@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.9.0a1
current_version = 1.10.16
parse = (?P<major>[\d]+) # major version number
\.(?P<minor>[\d]+) # minor version number
\.(?P<patch>[\d]+) # patch version number

View File

@@ -3,6 +3,8 @@
For information on prior major and minor releases, see their changelogs:
* [1.9](https://github.com/dbt-labs/dbt-core/blob/1.9.latest/CHANGELOG.md)
* [1.8](https://github.com/dbt-labs/dbt-core/blob/1.8.latest/CHANGELOG.md)
* [1.7](https://github.com/dbt-labs/dbt-core/blob/1.7.latest/CHANGELOG.md)
* [1.6](https://github.com/dbt-labs/dbt-core/blob/1.6.latest/CHANGELOG.md)
* [1.5](https://github.com/dbt-labs/dbt-core/blob/1.5.latest/CHANGELOG.md)

128
.changes/1.10.0.md Normal file
View File

@@ -0,0 +1,128 @@
## dbt-core 1.10.0 - June 16, 2025
### Breaking Changes
- Add invocations_started_at field to artifact metadata ([#11272](https://github.com/dbt-labs/dbt-core/issues/11272))
- Flip behavior flag `source-freshness-run-project-hooks` to true ([#11609](https://github.com/dbt-labs/dbt-core/issues/11609))
- Flip behavior flag to disallow spaces in resource names ([#11610](https://github.com/dbt-labs/dbt-core/issues/11610))
### Features
- Add new hard_deletes="new_record" mode for snapshots. ([#10235](https://github.com/dbt-labs/dbt-core/issues/10235))
- Add `batch` context object to model jinja context ([#11025](https://github.com/dbt-labs/dbt-core/issues/11025))
- Ensure pre/post hooks only run on first/last batch respectively for microbatch model batches ([#11094](https://github.com/dbt-labs/dbt-core/issues/11094), [#11104](https://github.com/dbt-labs/dbt-core/issues/11104))
- Support "tags" in Saved Queries ([#11155](https://github.com/dbt-labs/dbt-core/issues/11155))
- Calculate source freshness via a SQL query ([#8797](https://github.com/dbt-labs/dbt-core/issues/8797))
- Add freshness definition on model for adaptive job ([#11123](https://github.com/dbt-labs/dbt-core/issues/11123))
- Meta config for dimensions measures and entities ([#None](https://github.com/dbt-labs/dbt-core/issues/None))
- Add doc_blocks to manifest for nodes and columns ([#11000](https://github.com/dbt-labs/dbt-core/issues/11000), [#11001](https://github.com/dbt-labs/dbt-core/issues/11001))
- Initial implementation of sample mode ([#11227](https://github.com/dbt-labs/dbt-core/issues/11227), [#11230](https://github.com/dbt-labs/dbt-core/issues/11230), [#11231](https://github.com/dbt-labs/dbt-core/issues/11231), [#11248](https://github.com/dbt-labs/dbt-core/issues/11248), [#11252](https://github.com/dbt-labs/dbt-core/issues/11252), [#11254](https://github.com/dbt-labs/dbt-core/issues/11254), [#11258](https://github.com/dbt-labs/dbt-core/issues/11258))
- Combine `--sample` and `--sample-window` CLI params ([#11299](https://github.com/dbt-labs/dbt-core/issues/11299))
- Allow for sampling of ref'd seeds ([#11300](https://github.com/dbt-labs/dbt-core/issues/11300))
- Enable sample mode for 'build' command ([#11298](https://github.com/dbt-labs/dbt-core/issues/11298))
- Allow sampling nodes snapshots depend on and of snapshots as a dependency ([#11301](https://github.com/dbt-labs/dbt-core/issues/11301))
- Add opt-in validation of macro argument names and types ([#11274](https://github.com/dbt-labs/dbt-core/issues/11274))
- Add support for Python 3.13! ([#11401](https://github.com/dbt-labs/dbt-core/issues/11401))
- Support artifact upload to dbt Cloud ([#11418](https://github.com/dbt-labs/dbt-core/issues/11418))
- Show summaries for deprecations and add ability to toggle seeing all deprecation violation instances ([#11429](https://github.com/dbt-labs/dbt-core/issues/11429))
- Add behavior flag for handling all warnings via warn_error logic ([#11116](https://github.com/dbt-labs/dbt-core/issues/11116))
- Basic jsonschema validation of `dbt_project.yml` ([#11503](https://github.com/dbt-labs/dbt-core/issues/11503))
- Begin checking YAML files for duplicate keys ([#11296](https://github.com/dbt-labs/dbt-core/issues/11296))
- Add deprecation warnings for unexpected blocks in jinja. ([#11393](https://github.com/dbt-labs/dbt-core/issues/11393))
- Begin validating the jsonschema of resource YAML files ([#11504](https://github.com/dbt-labs/dbt-core/issues/11504))
- Add deprecation warning for custom top level keys in YAML files. ([#11338](https://github.com/dbt-labs/dbt-core/issues/11338))
- Begin emitting deprecationw warnings for custom keys in config blocks ([#11337](https://github.com/dbt-labs/dbt-core/issues/11337))
- Begin emitting deprecation events for custom properties found in objects ([#11336](https://github.com/dbt-labs/dbt-core/issues/11336))
- Create a singular deprecations summary event ([#11536](https://github.com/dbt-labs/dbt-core/issues/11536))
- Deprecate --output/-o usage in source freshness ([#11559](https://github.com/dbt-labs/dbt-core/issues/11559))
- Deprecate usage of `include`/`exclude` terminology with warn-error-options ([#11557](https://github.com/dbt-labs/dbt-core/issues/11557))
- Support description and config.meta on groups ([#11319](https://github.com/dbt-labs/dbt-core/issues/11319))
- Adding Quoting to manifest metadata ([#na](https://github.com/dbt-labs/dbt-core/issues/na))
- Include event names in deprecation warning messages ([#11471](https://github.com/dbt-labs/dbt-core/issues/11471))
- Support config on columns ([#11651](https://github.com/dbt-labs/dbt-core/issues/11651))
- Add file_format to catalog integration config ([#11695](https://github.com/dbt-labs/dbt-core/issues/11695))
- 11561 ([#deprecate](https://github.com/dbt-labs/dbt-core/issues/deprecate), [#--models,--model,](https://github.com/dbt-labs/dbt-core/issues/--models,--model,), [#and](https://github.com/dbt-labs/dbt-core/issues/and), [#-m](https://github.com/dbt-labs/dbt-core/issues/-m), [#flags](https://github.com/dbt-labs/dbt-core/issues/flags))
### Fixes
- datetime.datetime.utcnow() is deprecated as of Python 3.12 ([#9791](https://github.com/dbt-labs/dbt-core/issues/9791))
- dbt retry does not respect --threads ([#10584](https://github.com/dbt-labs/dbt-core/issues/10584))
- update adapter version messages ([#10230](https://github.com/dbt-labs/dbt-core/issues/10230))
- Catch DbtRuntimeError for hooks ([#11012](https://github.com/dbt-labs/dbt-core/issues/11012))
- Access DBUG flag more consistently with the rest of the codebase in ManifestLoader ([#11068](https://github.com/dbt-labs/dbt-core/issues/11068))
- Improve the performance characteristics of add_test_edges() ([#10950](https://github.com/dbt-labs/dbt-core/issues/10950))
- Implement partial parsing for singular data test configs in yaml files ([#10801](https://github.com/dbt-labs/dbt-core/issues/10801))
- Fix debug log messages for microbatch batch execution information ([#11111](https://github.com/dbt-labs/dbt-core/issues/11111))
- Fix running of extra "last" batch when there is only one batch ([#11112](https://github.com/dbt-labs/dbt-core/issues/11112))
- Fix interpretation of `PartialSuccess` to result in non-zero exit code ([#11114](https://github.com/dbt-labs/dbt-core/issues/11114))
- Warn about invalid usages of `concurrent_batches` config ([#11122](https://github.com/dbt-labs/dbt-core/issues/11122))
- Error writing generic test at run time ([#11110](https://github.com/dbt-labs/dbt-core/issues/11110))
- Run check_modified_contract for state:modified ([#11034](https://github.com/dbt-labs/dbt-core/issues/11034))
- Fix unrendered_config for tests from dbt_project.yml ([#11146](https://github.com/dbt-labs/dbt-core/issues/11146))
- Make partial parsing reparse referencing nodes of newly versioned models. ([#8872](https://github.com/dbt-labs/dbt-core/issues/8872))
- Ensure warning about microbatch lacking filter inputs is always fired ([#11159](https://github.com/dbt-labs/dbt-core/issues/11159))
- Fix microbatch dbt list --output json ([#10556](https://github.com/dbt-labs/dbt-core/issues/10556), [#11098](https://github.com/dbt-labs/dbt-core/issues/11098))
- Fix for custom fields in generic test config for not_null and unique tests ([#11208](https://github.com/dbt-labs/dbt-core/issues/11208))
- Allow copying asset when dbt docs command is run outside the dbt project ([#9308](https://github.com/dbt-labs/dbt-core/issues/9308))
- Loosen validation on freshness to accomodate previously wrong but harmless config. ([#11123](https://github.com/dbt-labs/dbt-core/issues/11123))
- Handle `--limit -1` properly in `ShowTaskDirect` so that it propagates None instead of a negative int ([#None](https://github.com/dbt-labs/dbt-core/issues/None))
- _get_doc_blocks is crashing parsing if .format is called ([#11310](https://github.com/dbt-labs/dbt-core/issues/11310))
- Fix microbatch execution to not block main thread nor hang ([#11243](https://github.com/dbt-labs/dbt-core/issues/11243), [#11306](https://github.com/dbt-labs/dbt-core/issues/11306))
- Fixes parsing errors when using the new YAML format for snapshots ([#11164](https://github.com/dbt-labs/dbt-core/issues/11164))
- Update ConfigFolderDirectory dir to use str. ([#9768](https://github.com/dbt-labs/dbt-core/issues/9768), [#11305](https://github.com/dbt-labs/dbt-core/issues/11305))
- Fix microbatch models couting as success when only having one batch (and that batch failing) ([#11390](https://github.com/dbt-labs/dbt-core/issues/11390))
- Add pre-commit installation to Docker container for testing compatibility ([#11498](https://github.com/dbt-labs/dbt-core/issues/11498))
- Fix duplicate macro error message with multiple macros and multiple patches ([#4233](https://github.com/dbt-labs/dbt-core/issues/4233))
- Fix seed path for partial parsing if project directory name changes ([#11550](https://github.com/dbt-labs/dbt-core/issues/11550))
- Add `pre-commit` installation to Docker container for testing compatibility ([#11498](https://github.com/dbt-labs/dbt-core/issues/11498))
- Ensure the right key is associatd with the `CustomKeyInConfigDeprecation` deprecation ([#11576](https://github.com/dbt-labs/dbt-core/issues/11576))
- Add tags and meta config to exposures ([#11428](https://github.com/dbt-labs/dbt-core/issues/11428))
- Add freshness config to sources ([#11506](https://github.com/dbt-labs/dbt-core/issues/11506))
- Add freshness config to models ([#11506](https://github.com/dbt-labs/dbt-core/issues/11506))
- require count and period on model freshness.build_after ([#11669](https://github.com/dbt-labs/dbt-core/issues/11669))
- Don't warn for metricflow_time_spine with non-day grain ([#11690](https://github.com/dbt-labs/dbt-core/issues/11690))
- Fix source freshness set via config to handle explicit nulls ([#11685](https://github.com/dbt-labs/dbt-core/issues/11685))
- Ensure build_after is present in model freshness in parsing, otherwise skip freshness definition ([#11709](https://github.com/dbt-labs/dbt-core/issues/11709))
- Ensure source node `.freshness` is equal to node's `.config.freshness` ([#11717](https://github.com/dbt-labs/dbt-core/issues/11717))
- ignore invalid model freshness configs in inline model configs ([#11728](https://github.com/dbt-labs/dbt-core/issues/11728))
- Fix store_failures hierarachical config parsing ([#10165](https://github.com/dbt-labs/dbt-core/issues/10165))
- Remove model freshness property support in favor of config level support ([#11713](https://github.com/dbt-labs/dbt-core/issues/11713))
### Under the Hood
- Create a no-op exposure runner ([#](https://github.com/dbt-labs/dbt-core/issues/), [#](https://github.com/dbt-labs/dbt-core/issues/))
- Improve selection peformance by optimizing the select_children() and select_parents() functions. ([#11099](https://github.com/dbt-labs/dbt-core/issues/11099))
- Change exception type from DbtInternalException to UndefinedMacroError when macro not found in 'run operation' command ([#11192](https://github.com/dbt-labs/dbt-core/issues/11192))
- Create LogNodeResult event ([#](https://github.com/dbt-labs/dbt-core/issues/), [#](https://github.com/dbt-labs/dbt-core/issues/))
- Fix error counts for exposures ([#](https://github.com/dbt-labs/dbt-core/issues/), [#](https://github.com/dbt-labs/dbt-core/issues/))
- Misc fixes for group info in logging ([#11218](https://github.com/dbt-labs/dbt-core/issues/11218))
- Add node_checksum to node_info on structured logs ([#11372](https://github.com/dbt-labs/dbt-core/issues/11372))
- Parse catalogs.yml ([#XPLAT-242](https://github.com/dbt-labs/dbt-core/issues/XPLAT-242))
- Add package 'name' to lock file ([#11487](https://github.com/dbt-labs/dbt-core/issues/11487))
- Allow for deprecation previews ([#11597](https://github.com/dbt-labs/dbt-core/issues/11597))
- Move core_types.proto into shared dbt-protos library ([#11608](https://github.com/dbt-labs/dbt-core/issues/11608))
- Prevent overcounting PropertyMovedToConfigDeprecation for source freshness ([#11660](https://github.com/dbt-labs/dbt-core/issues/11660))
### Dependencies
- Upgrading dbt-semantic-interfaces to 0.8.3 for custom grain support in offset windows ([#None](https://github.com/dbt-labs/dbt-core/issues/None))
- Bump codecov/codecov-action from 4 to 5 ([#11009](https://github.com/dbt-labs/dbt-core/issues/11009))
### Contributors
- [@DevonFulcher](https://github.com/DevonFulcher) ([#None](https://github.com/dbt-labs/dbt-core/issues/None))
- [@Threynaud](https://github.com/Threynaud) ([#11068](https://github.com/dbt-labs/dbt-core/issues/11068))
- [@WilliamDee](https://github.com/WilliamDee) ([#None](https://github.com/dbt-labs/dbt-core/issues/None), [#None](https://github.com/dbt-labs/dbt-core/issues/None))
- [@amardatar](https://github.com/amardatar) ([#11164](https://github.com/dbt-labs/dbt-core/issues/11164))
- [@aranke](https://github.com/aranke) ([#11000](https://github.com/dbt-labs/dbt-core/issues/11000), [#11001](https://github.com/dbt-labs/dbt-core/issues/11001), [#11012](https://github.com/dbt-labs/dbt-core/issues/11012), [#11310](https://github.com/dbt-labs/dbt-core/issues/11310), [#11550](https://github.com/dbt-labs/dbt-core/issues/11550), [#11428](https://github.com/dbt-labs/dbt-core/issues/11428), [#11506](https://github.com/dbt-labs/dbt-core/issues/11506), [#11506](https://github.com/dbt-labs/dbt-core/issues/11506), [#](https://github.com/dbt-labs/dbt-core/issues/), [#](https://github.com/dbt-labs/dbt-core/issues/), [#](https://github.com/dbt-labs/dbt-core/issues/), [#](https://github.com/dbt-labs/dbt-core/issues/), [#](https://github.com/dbt-labs/dbt-core/issues/), [#](https://github.com/dbt-labs/dbt-core/issues/), [#11218](https://github.com/dbt-labs/dbt-core/issues/11218), [#XPLAT-242](https://github.com/dbt-labs/dbt-core/issues/XPLAT-242), [#11660](https://github.com/dbt-labs/dbt-core/issues/11660))
- [@cedric-orange](https://github.com/cedric-orange) ([#9308](https://github.com/dbt-labs/dbt-core/issues/9308))
- [@cmcarthur](https://github.com/cmcarthur) ([#11608](https://github.com/dbt-labs/dbt-core/issues/11608))
- [@courtneyholcomb](https://github.com/courtneyholcomb) ([#11690](https://github.com/dbt-labs/dbt-core/issues/11690))
- [@d-cole](https://github.com/d-cole) ([#8872](https://github.com/dbt-labs/dbt-core/issues/8872))
- [@dave-connors-3](https://github.com/dave-connors-3) ([#10230](https://github.com/dbt-labs/dbt-core/issues/10230))
- [@donjin-master](https://github.com/donjin-master) ([#10584](https://github.com/dbt-labs/dbt-core/issues/10584))
- [@internetcoffeephone](https://github.com/internetcoffeephone) ([#10556](https://github.com/dbt-labs/dbt-core/issues/10556), [#11098](https://github.com/dbt-labs/dbt-core/issues/11098))
- [@kato1208](https://github.com/kato1208) ([#11498](https://github.com/dbt-labs/dbt-core/issues/11498), [#11498](https://github.com/dbt-labs/dbt-core/issues/11498))
- [@slothkong](https://github.com/slothkong) ([#9791](https://github.com/dbt-labs/dbt-core/issues/9791))
- [@theyostalservice](https://github.com/theyostalservice) ([#11155](https://github.com/dbt-labs/dbt-core/issues/11155))
- [@thorn14](https://github.com/thorn14) ([#9768](https://github.com/dbt-labs/dbt-core/issues/9768), [#11305](https://github.com/dbt-labs/dbt-core/issues/11305))
- [@venkaa28](https://github.com/venkaa28) ([#na](https://github.com/dbt-labs/dbt-core/issues/na))

5
.changes/1.10.1.md Normal file
View File

@@ -0,0 +1,5 @@
## dbt-core 1.10.1 - June 16, 2025
### Dependencies
- Bump minimum jsonschema version to `4.19.1` ([#11740](https://github.com/dbt-labs/dbt-core/issues/11740))

13
.changes/1.10.10.md Normal file
View File

@@ -0,0 +1,13 @@
## dbt-core 1.10.10 - August 28, 2025
### Fixes
- Avoid redundant node patch removal during partial parsing ([#11886](https://github.com/dbt-labs/dbt-core/issues/11886))
- Comply with strict `str` type when `block.contents` is `None` ([#11492](https://github.com/dbt-labs/dbt-core/issues/11492))
### Dependencies
- Bump dbt-adapters minimum to 1.16.5 ([#11932](https://github.com/dbt-labs/dbt-core/issues/11932))
### Contributors
- [@wircho](https://github.com/wircho) ([#11886](https://github.com/dbt-labs/dbt-core/issues/11886), [#11492](https://github.com/dbt-labs/dbt-core/issues/11492))

13
.changes/1.10.11.md Normal file
View File

@@ -0,0 +1,13 @@
## dbt-core 1.10.11 - September 04, 2025
### Features
- No-op when project-level `quoting.snowflake_ignore_case` is set. ([#11882](https://github.com/dbt-labs/dbt-core/issues/11882))
### Under the Hood
- Update jsonschemas used for schema-based deprecations ([#11987](https://github.com/dbt-labs/dbt-core/issues/11987))
### Contributors
- [@aksestok](https://github.com/aksestok) ([#11882](https://github.com/dbt-labs/dbt-core/issues/11882))
- [@michellark](https://github.com/michellark) ([#11987](https://github.com/dbt-labs/dbt-core/issues/11987))

9
.changes/1.10.12.md Normal file
View File

@@ -0,0 +1,9 @@
## dbt-core 1.10.12 - September 10, 2025
### Features
- Parse catalogs.yml during parse, seed, and test commands ([#12002](https://github.com/dbt-labs/dbt-core/issues/12002))
### Fixes
- Implement checked_agg_time_dimension_for_simple_metric to satisfy dbt-semantic-interfaces>0.9.0 ([#11998](https://github.com/dbt-labs/dbt-core/issues/11998))

14
.changes/1.10.13.md Normal file
View File

@@ -0,0 +1,14 @@
## dbt-core 1.10.13 - September 25, 2025
### Fixes
- Propagate column meta/tags from config to tests ([#11984](https://github.com/dbt-labs/dbt-core/issues/11984))
- Skip initial render of loaded_at_query when specified as source or table config ([#11973](https://github.com/dbt-labs/dbt-core/issues/11973))
### Under the Hood
- Introduce dbt_version-based manifest json upgrade framework to avoid state:modified false positives on minor evolutions ([#12006](https://github.com/dbt-labs/dbt-core/issues/12006))
### Dependencies
- Loosen dbt-semantic-interfaces lower pin to >=0.9.0 ([#12005](https://github.com/dbt-labs/dbt-core/issues/12005))

9
.changes/1.10.14.md Normal file
View File

@@ -0,0 +1,9 @@
## dbt-core 1.10.14 - November 10, 2025
### Fixes
- Fix errors in partial parsing when working with versioned models ([#11869](https://github.com/dbt-labs/dbt-core/issues/11869))
### Under the Hood
- Reorganize jsonschemas directory structure ([#12121](https://github.com/dbt-labs/dbt-core/issues/12121))

5
.changes/1.10.15.md Normal file
View File

@@ -0,0 +1,5 @@
## dbt-core 1.10.15 - November 12, 2025
### Under the Hood
- add dbt/jsonschemas to manifest.in ([#12126](https://github.com/dbt-labs/dbt-core/issues/12126))

14
.changes/1.10.16.md Normal file
View File

@@ -0,0 +1,14 @@
## dbt-core 1.10.16 - December 16, 2025
### Features
- Validate {{ config }} in SQL for models that don't statically parse ([#12046](https://github.com/dbt-labs/dbt-core/issues/12046))
### Fixes
- Allow dbt deps to run when vars lack defaults in dbt_project.yml ([#8913](https://github.com/dbt-labs/dbt-core/issues/8913))
- Fix generation of deprecations summary ([#12146](https://github.com/dbt-labs/dbt-core/issues/12146))
- :bug: :snowman: Stop emitting `NoNodesForSelectionCriteria` three times during `build` command ([#11627](https://github.com/dbt-labs/dbt-core/issues/11627))
### Contributors
- [@asiunov](https://github.com/asiunov) ([#12146](https://github.com/dbt-labs/dbt-core/issues/12146))

9
.changes/1.10.2.md Normal file
View File

@@ -0,0 +1,9 @@
## dbt-core 1.10.2 - June 20, 2025
### Features
- Update jsonschemas with builtin data test properties and exposure configs in dbt_project.yml for more accurate deprecations ([#11335](https://github.com/dbt-labs/dbt-core/issues/11335))
### Dependencies
- Allow for either pydantic v1 and v2 ([#11634](https://github.com/dbt-labs/dbt-core/issues/11634))

14
.changes/1.10.3.md Normal file
View File

@@ -0,0 +1,14 @@
## dbt-core 1.10.3 - July 02, 2025
### Features
- Support loaded_at_query and loaded_at_field on source and table configs ([#11659](https://github.com/dbt-labs/dbt-core/issues/11659))
- Begin validating configs from model sql files ([#11727](https://github.com/dbt-labs/dbt-core/issues/11727))
### Fixes
- Bump dbt-common to 1.25.0 to access WarnErrorOptionsV2 ([#11755](https://github.com/dbt-labs/dbt-core/issues/11755))
### Dependencies
- Bump dbt-common minimum to 1.25.1 ([#11789](https://github.com/dbt-labs/dbt-core/issues/11789))

17
.changes/1.10.4.md Normal file
View File

@@ -0,0 +1,17 @@
## dbt-core 1.10.4 - July 10, 2025
### Features
- Deprecate `overrides` property for sources ([#11566](https://github.com/dbt-labs/dbt-core/issues/11566))
### Fixes
- Update jsonschema definitions with nested config defs, cloud info, and dropping source overrides ([#N/A](https://github.com/dbt-labs/dbt-core/issues/N/A))
### Dependencies
- Upgrade to dbt-semantic-interfaces==0.9.0 for more robust saved query support. ([#11809](https://github.com/dbt-labs/dbt-core/issues/11809))
### Contributors
- [@courtneyholcomb](https://github.com/courtneyholcomb) ([#11809](https://github.com/dbt-labs/dbt-core/issues/11809))
- [@peterallenwebb](https://github.com/peterallenwebb) ([#11566](https://github.com/dbt-labs/dbt-core/issues/11566))

15
.changes/1.10.5.md Normal file
View File

@@ -0,0 +1,15 @@
## dbt-core 1.10.5 - July 22, 2025
### Features
- Create constrained namespace for dbt engine env vars ([#11340](https://github.com/dbt-labs/dbt-core/issues/11340))
- Gate jsonschema validations by adapter ([#11680](https://github.com/dbt-labs/dbt-core/issues/11680))
- Deprecate top-level argument properties in generic tests ([#11847](https://github.com/dbt-labs/dbt-core/issues/11847))
### Fixes
- Make `GenericJSONSchemaValidationDeprecation` a "preview" deprecation ([#11814](https://github.com/dbt-labs/dbt-core/issues/11814))
- Correct JSONSchema Semantic Layer node issues ([#11818](https://github.com/dbt-labs/dbt-core/issues/11818))
- Improve SL JSONSchema definitions ([#N/A](https://github.com/dbt-labs/dbt-core/issues/N/A))
- raise MissingPlusPrefixDeprecation instead of GenericJSONSchemaValidationDeprecation when config missing plus prefix in dbt_project.yml ([#11826](https://github.com/dbt-labs/dbt-core/issues/11826))
- Propagate config.meta and config.tags to top-level on source nodes ([#11839](https://github.com/dbt-labs/dbt-core/issues/11839))

9
.changes/1.10.6.md Normal file
View File

@@ -0,0 +1,9 @@
## dbt-core 1.10.6 - July 29, 2025
### Features
- Deprecate {{ modules.itertools }} usage ([#11725](https://github.com/dbt-labs/dbt-core/issues/11725))
### Fixes
- Safe handling of malformed config.tags on sources/tables ([#11855](https://github.com/dbt-labs/dbt-core/issues/11855))

10
.changes/1.10.7.md Normal file
View File

@@ -0,0 +1,10 @@
## dbt-core 1.10.7 - August 07, 2025
### Fixes
- Raise PropertyMovedToConfigDeprecation instead of CustomTopLevelKeyDeprecation when additional attribute is a valid node config ([#11879](https://github.com/dbt-labs/dbt-core/issues/11879))
- Remove duplicative PropertyMovedToConfigDeprecation for source freshness ([#11880](https://github.com/dbt-labs/dbt-core/issues/11880))
### Under the Hood
- call adapter.add_catalog_integration during parse_manifest ([#11889](https://github.com/dbt-labs/dbt-core/issues/11889))

5
.changes/1.10.8.md Normal file
View File

@@ -0,0 +1,5 @@
## dbt-core 1.10.8 - August 12, 2025
### Features
- Default require_generic_test_arguments_property flag to True - The 'arguments' property will be parsed as keyword arguments to data tests, if provided ([#11911](https://github.com/dbt-labs/dbt-core/issues/11911))

5
.changes/1.10.9.md Normal file
View File

@@ -0,0 +1,5 @@
## dbt-core 1.10.9 - August 15, 2025
### Dependencies
- upgrade protobuf to 6.0 ([#11916](https://github.com/dbt-labs/dbt-core/issues/11916))

View File

@@ -1,6 +0,0 @@
kind: Breaking Changes
body: Fix changing the current working directory when using dpt deps, clean and init.
time: 2023-12-06T19:24:42.575372+09:00
custom:
Author: rariyama
Issue: "8997"

View File

@@ -1,6 +0,0 @@
kind: Dependencies
body: Remove logbook dependency
time: 2024-05-09T09:37:17.745129-05:00
custom:
Author: emmyoop
Issue: "8027"

View File

@@ -1,7 +0,0 @@
kind: Dependencies
body: Increase supported version range for dbt-semantic-interfaces. Needed to support
custom calendar features.
time: 2024-08-20T13:19:09.015225-07:00
custom:
Author: courtneyholcomb
Issue: "9265"

View File

@@ -1,6 +0,0 @@
kind: Docs
body: Enable display of unit tests
time: 2024-03-11T14:03:44.490834-04:00
custom:
Author: gshank
Issue: "501"

View File

@@ -1,6 +0,0 @@
kind: Docs
body: Unit tests not rendering
time: 2024-05-01T02:10:50.987412+02:00
custom:
Author: aranke
Issue: "506"

View File

@@ -1,6 +0,0 @@
kind: Docs
body: Add support for Saved Query node
time: 2024-05-16T22:30:36.206492-07:00
custom:
Author: ChenyuLInx
Issue: "486"

View File

@@ -1,6 +0,0 @@
kind: Docs
body: Fix npm security vulnerabilities as of June 2024
time: 2024-06-13T15:10:48.301989+01:00
custom:
Author: aranke
Issue: "513"

View File

@@ -1,6 +0,0 @@
kind: Features
body: serialize inferred primary key
time: 2024-05-06T17:56:42.757673-05:00
custom:
Author: dave-connors-3
Issue: "9824"

View File

@@ -1,6 +0,0 @@
kind: Features
body: 'Add unit_test: selection method'
time: 2024-05-07T16:27:17.047585-04:00
custom:
Author: michelleark
Issue: "10053"

View File

@@ -1,7 +0,0 @@
kind: Features
body: Maximally parallelize dbt clone
in clone command"
time: 2024-05-22T00:03:09.765977-04:00
custom:
Author: michelleark
Issue: "7914"

View File

@@ -1,6 +0,0 @@
kind: Features
body: Add --host flag to dbt docs serve, defaulting to '127.0.0.1'
time: 2024-05-27T12:44:05.040843-04:00
custom:
Author: michelleark
Issue: "10229"

View File

@@ -1,6 +0,0 @@
kind: Features
body: Update data_test to accept arbitrary config options
time: 2024-05-31T15:08:16.431966-05:00
custom:
Author: McKnight-42
Issue: "10197"

View File

@@ -1,6 +0,0 @@
kind: Features
body: add pre_model and post_model hook calls to data and unit tests to be able to provide extra config options
time: 2024-06-06T11:23:34.758675-05:00
custom:
Author: McKnight-42
Issue: "10198"

View File

@@ -1,6 +0,0 @@
kind: Features
body: add --empty value to jinja context as flags.EMPTY
time: 2024-06-17T10:39:48.275801-04:00
custom:
Author: michelleark
Issue: "10317"

View File

@@ -1,6 +0,0 @@
kind: Features
body: Warning message for snapshot timestamp data types
time: 2024-06-21T14:16:35.717637-04:00
custom:
Author: gshank
Issue: "10234"

View File

@@ -1,6 +0,0 @@
kind: Features
body: Support cumulative_type_params & sub-daily granularities in semantic manifest.
time: 2024-06-25T09:51:07.983248-07:00
custom:
Author: courtneyholcomb
Issue: "10360"

View File

@@ -1,6 +0,0 @@
kind: Features
body: Add time_granularity to metric spec.
time: 2024-06-27T16:29:53.500917-07:00
custom:
Author: courtneyholcomb
Issue: "10376"

View File

@@ -1,6 +0,0 @@
kind: Features
body: Support standard schema/database fields for snapshots
time: 2024-07-12T21:45:46.06011-04:00
custom:
Author: gshank
Issue: "10301"

View File

@@ -1,6 +0,0 @@
kind: Features
body: Support ref and source in foreign key constraint expressions, bump dbt-common minimum to 1.6
time: 2024-07-19T16:18:41.434278-04:00
custom:
Author: michelleark
Issue: "8062"

View File

@@ -1,6 +0,0 @@
kind: Features
body: Support new semantic layer time spine configs to enable sub-daily granularity.
time: 2024-07-22T20:22:38.258249-07:00
custom:
Author: courtneyholcomb
Issue: "10475"

View File

@@ -1,6 +0,0 @@
kind: Features
body: Add support for behavior flags
time: 2024-08-29T13:53:20.16122-04:00
custom:
Author: mikealfare
Issue: "10618"

View File

@@ -1,6 +0,0 @@
kind: Fixes
body: Remove unused check_new method
time: 2023-06-01T20:41:57.556342+02:00
custom:
Author: kevinneville
Issue: "7586"

View File

@@ -1,6 +0,0 @@
kind: Fixes
body: Convert "Skipping model due to fail_fast" message to DEBUG level
time: 2024-01-13T07:36:15.836294-00:00
custom:
Author: scottgigante,nevdelap
Issue: "8774"

View File

@@ -1,7 +0,0 @@
kind: Fixes
body: 'Restore previous behavior for --favor-state: only favor defer_relation if not
selected in current command"'
time: 2024-05-08T15:11:27.510912+02:00
custom:
Author: jtcohen6
Issue: "10107"

View File

@@ -1,6 +0,0 @@
kind: Fixes
body: Unit test fixture (csv) returns null for empty value
time: 2024-05-09T09:14:11.772709-04:00
custom:
Author: michelleark
Issue: "9881"

View File

@@ -1,7 +0,0 @@
kind: Fixes
body: Fix json format log and --quiet for ls and jinja print by converting print call
to fire events
time: 2024-05-16T15:39:13.896723-07:00
custom:
Author: ChenyuLInx
Issue: "8756"

View File

@@ -1,6 +0,0 @@
kind: Fixes
body: Add resource type to saved_query
time: 2024-05-16T22:35:10.287514-07:00
custom:
Author: ChenyuLInx
Issue: "10168"

View File

@@ -1,7 +0,0 @@
kind: Fixes
body: 'Fix: Order-insensitive unit test equality assertion for expected/actual with
multiple nulls'
time: 2024-05-22T18:28:55.91733-04:00
custom:
Author: michelleark
Issue: "10167"

View File

@@ -1,6 +0,0 @@
kind: Fixes
body: Renaming or removing a contracted model should raise a BreakingChange warning/error
time: 2024-05-23T20:42:51.033946-04:00
custom:
Author: michelleark
Issue: "10116"

View File

@@ -1,6 +0,0 @@
kind: Fixes
body: prefer disabled project nodes to external node
time: 2024-05-24T13:11:35.440443-04:00
custom:
Author: michelleark
Issue: "10224"

View File

@@ -1,6 +0,0 @@
kind: Fixes
body: Fix issues with selectors and inline nodes
time: 2024-06-05T11:16:52.187667-04:00
custom:
Author: gshank
Issue: 8943 9269

View File

@@ -1,6 +0,0 @@
kind: Fixes
body: Fix snapshot config to work in yaml files
time: 2024-06-07T13:46:48.383215-04:00
custom:
Author: gshank
Issue: "4000"

View File

@@ -1,6 +0,0 @@
kind: Fixes
body: Improve handling of error when loading schema file list
time: 2024-06-10T13:21:30.963371-04:00
custom:
Author: gshank
Issue: "10284"

View File

@@ -1,6 +0,0 @@
kind: Fixes
body: Use model alias for the CTE identifier generated during ephemeral materialization
time: 2024-06-10T20:05:22.510814008Z
custom:
Author: jeancochrane
Issue: "5273"

View File

@@ -1,6 +0,0 @@
kind: Fixes
body: Saved Query node fail during skip
time: 2024-06-12T12:42:56.329073-07:00
custom:
Author: ChenyuLInx
Issue: "10029"

View File

@@ -1,6 +0,0 @@
kind: Fixes
body: Implement state:modified for saved queries
time: 2024-06-12T15:21:39.851426-04:00
custom:
Author: gshank
Issue: "10294"

View File

@@ -1,6 +0,0 @@
kind: Fixes
body: DOn't warn on `unit_test` config paths that are properly used
time: 2024-06-13T18:31:17.486497-07:00
custom:
Author: QMalcolm
Issue: "10311"

View File

@@ -1,6 +0,0 @@
kind: Fixes
body: Fix setting `silence` of `warn_error_options` via `dbt_project.yaml` flags
time: 2024-06-24T17:17:29.464865-07:00
custom:
Author: QMalcolm
Issue: "10160"

View File

@@ -1,7 +0,0 @@
kind: Fixes
body: Attempt to provide test fixture tables with all values to set types correctly
for comparisong with source tables
time: 2024-06-25T17:17:37.514619-07:00
custom:
Author: versusfacit
Issue: "10365"

View File

@@ -1,6 +0,0 @@
kind: Fixes
body: Limit data_tests deprecation to root_project
time: 2024-06-27T15:44:48.579869-04:00
custom:
Author: gshank
Issue: "9835"

View File

@@ -1,6 +0,0 @@
kind: Fixes
body: CLI flags should take precedence over env var flags
time: 2024-07-09T17:24:40.918977-04:00
custom:
Author: gshank
Issue: "10304"

View File

@@ -1,6 +0,0 @@
kind: Fixes
body: Fix typing for artifact schemas
time: 2024-07-14T10:02:54.452099+09:00
custom:
Author: nakamichiworks
Issue: "10442"

View File

@@ -1,6 +0,0 @@
kind: Fixes
body: Fix over deletion of generated_metrics in partial parsing
time: 2024-07-16T13:37:03.49651-04:00
custom:
Author: gshank
Issue: "10450"

View File

@@ -1,6 +0,0 @@
kind: Fixes
body: Fix error constructing warn_error_options
time: 2024-07-16T17:14:27.837171-04:00
custom:
Author: gshank
Issue: "10452"

View File

@@ -1,6 +0,0 @@
kind: Fixes
body: Do not update varchar column definitions if a contract exists
time: 2024-07-28T22:14:21.67712-04:00
custom:
Author: gshank
Issue: "10362"

View File

@@ -1,6 +0,0 @@
kind: Fixes
body: fix all_constraints access, disabled node parsing of non-uniquely named resources
time: 2024-07-31T09:51:52.751135-04:00
custom:
Author: michelleark gshank
Issue: "10509"

View File

@@ -1,6 +0,0 @@
kind: Fixes
body: Propagate measure label when using create_metrics
time: 2024-08-06T17:21:10.265494-07:00
custom:
Author: aliceliu
Issue: "10536"

View File

@@ -1,6 +0,0 @@
kind: Fixes
body: respect --quiet and --warn-error-options for flag deprecations
time: 2024-08-06T19:48:43.399453-04:00
custom:
Author: michelleark
Issue: "10105"

View File

@@ -1,6 +0,0 @@
kind: Fixes
body: Fix state:modified check for exports
time: 2024-08-13T15:42:35.471685-07:00
custom:
Author: aliceliu
Issue: "10138"

View File

@@ -1,6 +0,0 @@
kind: Fixes
body: Filter out empty nodes after graph selection to support consistent selection of nodes that depend on upstream public models
time: 2024-08-16T14:08:07.426235-07:00
custom:
Author: jtcohen6
Issue: "8987"

View File

@@ -1,6 +0,0 @@
kind: Fixes
body: Late render pre- and post-hooks configs in properties / schema YAML files
time: 2024-08-24T21:09:03.252733-06:00
custom:
Author: dbeatty10
Issue: "10603"

View File

@@ -1,7 +0,0 @@
kind: Fixes
body: Allow the use of env_var function in certain macros in which it was previously
unavailable.
time: 2024-08-29T10:57:01.160613-04:00
custom:
Author: peterallenwebb
Issue: "10609"

View File

@@ -1,6 +0,0 @@
kind: Fixes
body: 'Remove deprecation for tests: to data_tests: change'
time: 2024-09-05T18:02:48.086421-04:00
custom:
Author: gshank
Issue: "10564"

View File

@@ -1,6 +0,0 @@
kind: Security
body: Explicitly bind to localhost in docs serve
time: 2024-05-22T09:45:40.748185-04:00
custom:
Author: ChenyuLInx michelleark
Issue: "10209"

View File

@@ -1,6 +0,0 @@
kind: Under the Hood
body: Clear error message for Private package in dbt-core
time: 2024-05-02T15:44:30.713097-07:00
custom:
Author: ChenyuLInx
Issue: "10083"

View File

@@ -1,6 +0,0 @@
kind: Under the Hood
body: Enable use of context in serialization
time: 2024-05-06T14:55:11.1812-04:00
custom:
Author: gshank
Issue: "10093"

View File

@@ -1,6 +0,0 @@
kind: Under the Hood
body: Make RSS high water mark measurement more accurate on Linux
time: 2024-05-19T15:59:46.700842315-04:00
custom:
Author: peterallenwebb
Issue: "10177"

View File

@@ -1,6 +0,0 @@
kind: Under the Hood
body: Enable record filtering by type.
time: 2024-05-29T10:28:14.547624-05:00
custom:
Author: emmyoop
Issue: "10240"

View File

@@ -1,6 +0,0 @@
kind: Under the Hood
body: Remove IntermediateSnapshotNode
time: 2024-06-18T14:06:52.618602-04:00
custom:
Author: gshank
Issue: "10326"

View File

@@ -1,6 +0,0 @@
kind: Under the Hood
body: Additional logging for skipped ephemeral models
time: 2024-07-01T13:17:50.827788-04:00
custom:
Author: gshank
Issue: "10389"

View File

@@ -1,6 +0,0 @@
kind: Under the Hood
body: bump black to 24.3.0
time: 2024-07-16T18:48:59.651834-04:00
custom:
Author: michelleark
Issue: "10454"

View File

@@ -1,6 +0,0 @@
kind: Under the Hood
body: generate protos with protoc version 5.26.1
time: 2024-07-16T20:57:03.332448-04:00
custom:
Author: michelleark
Issue: "10457"

View File

@@ -1,6 +0,0 @@
kind: Under the Hood
body: Move from minimal-snowplow-tracker fork back to snowplow-tracker
time: 2024-08-06T15:54:06.422444-04:00
custom:
Author: peterallenwebb
Issue: "8409"

View File

@@ -1,7 +0,0 @@
kind: Under the Hood
body: Add group info to RunResultError, RunResultFailure, RunResultWarning log lines
time: 2024-08-07T15:56:52.171199-05:00
custom:
Author: aranke
Issue: ""
JiraID: "364"

View File

@@ -1,6 +0,0 @@
kind: Under the Hood
body: Improve speed of tree traversal when finding children, increasing build speed for some selectors
time: 2024-08-09T13:02:34.759905-07:00
custom:
Author: ttusing
Issue: "10434"

View File

@@ -1,6 +0,0 @@
kind: Under the Hood
body: Add test for sources tables with quotes
time: 2024-08-21T09:55:16.038101-04:00
custom:
Author: gshank
Issue: "10582"

View File

@@ -1,6 +0,0 @@
kind: Under the Hood
body: Additional type hints for `core/dbt/version.py`
time: 2024-08-27T10:50:14.047859-05:00
custom:
Author: QMalcolm
Issue: "10612"

View File

@@ -1,6 +0,0 @@
kind: Under the Hood
body: Fix typing issues in core/dbt/contracts/sql.py
time: 2024-08-27T11:31:23.749912-05:00
custom:
Author: QMalcolm
Issue: "10614"

View File

@@ -1,6 +0,0 @@
kind: Under the Hood
body: Fix type errors in `dbt/core/task/clean.py`
time: 2024-08-27T11:48:10.438173-05:00
custom:
Author: QMalcolm
Issue: "10616"

View File

@@ -61,7 +61,7 @@ body:
label: Environment
description: |
examples:
- **OS**: Ubuntu 20.04
- **OS**: Ubuntu 24.04
- **Python**: 3.9.12 (`python3 --version`)
- **dbt-core**: 1.1.1 (`dbt --version`)
value: |

View File

@@ -12,15 +12,6 @@ contact_links:
- name: Participate in Discussions
url: https://github.com/dbt-labs/dbt-core/discussions
about: Do you have a Big Idea for dbt? Read open discussions, or start a new one
- name: Create an issue for dbt-redshift
url: https://github.com/dbt-labs/dbt-redshift/issues/new/choose
about: Report a bug or request a feature for dbt-redshift
- name: Create an issue for dbt-bigquery
url: https://github.com/dbt-labs/dbt-bigquery/issues/new/choose
about: Report a bug or request a feature for dbt-bigquery
- name: Create an issue for dbt-snowflake
url: https://github.com/dbt-labs/dbt-snowflake/issues/new/choose
about: Report a bug or request a feature for dbt-snowflake
- name: Create an issue for dbt-spark
url: https://github.com/dbt-labs/dbt-spark/issues/new/choose
about: Report a bug or request a feature for dbt-spark
- name: Create an issue for adapters
url: https://github.com/dbt-labs/dbt-adapters/issues/new/choose
about: Report a bug or request a feature for an adapter

View File

@@ -55,7 +55,7 @@ body:
label: Environment
description: |
examples:
- **OS**: Ubuntu 20.04
- **OS**: Ubuntu 24.04
- **Python**: 3.9.12 (`python3 --version`)
- **dbt-core (working version)**: 1.1.1 (`dbt --version`)
- **dbt-core (regression version)**: 1.2.0 (`dbt --version`)

8
.github/_README.md vendored
View File

@@ -120,7 +120,7 @@ Some triggers of note that we use:
```yaml
jobs:
dependency_changelog:
runs-on: ubuntu-latest
runs-on: ${{ vars.UBUNTU_LATEST }}
steps:
- name: Get File Name Timestamp
@@ -188,6 +188,12 @@ ___
- The [GitHub CLI](https://cli.github.com/) is available in the default runners
- Actions run in your context. ie, using an action from the marketplace that uses the GITHUB_TOKEN uses the GITHUB_TOKEN generated by your workflow run.
### Runners
- We dynamically set runners based on repository vars. Admins can view repository vars and reset them. Current values are the following but are subject to change:
- `vars.UBUNTU_LATEST` -> `ubuntu-latest`
- `vars.WINDOWS_LATEST` -> `windows-latest`
- `vars.MACOS_LATEST` -> `macos-14`
### Actions from the Marketplace
- Dont use external actions for things that can easily be accomplished manually.
- Always read through what an external action does before using it! Often an action in the GitHub Actions Marketplace can be replaced with a few lines in bash. This is much more maintainable (and wont change under us) and clear as to whats actually happening. It also prevents any

View File

@@ -33,7 +33,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
runs-on: ${{ vars.UBUNTU_LATEST }}
steps:
- uses: actions/checkout@v3
- name: Wrangle latest tag

View File

@@ -3,24 +3,24 @@ on:
workflow_dispatch:
inputs:
package:
description: The package to publish
required: true
description: The package to publish
required: true
version_number:
description: The version number
required: true
description: The version number
required: true
jobs:
build:
runs-on: ubuntu-latest
runs-on: ${{ vars.UBUNTU_LATEST }}
steps:
- uses: actions/checkout@v3
- name: Wrangle latest tag
id: is_latest
uses: ./.github/actions/latest-wrangler
with:
package: ${{ github.event.inputs.package }}
new_version: ${{ github.event.inputs.new_version }}
gh_token: ${{ secrets.GITHUB_TOKEN }}
- name: Print the results
run: |
echo "Is it latest? Survey says: ${{ steps.is_latest.outputs.latest }} !"
- uses: actions/checkout@v3
- name: Wrangle latest tag
id: is_latest
uses: ./.github/actions/latest-wrangler
with:
package: ${{ github.event.inputs.package }}
new_version: ${{ github.event.inputs.new_version }}
gh_token: ${{ secrets.GITHUB_TOKEN }}
- name: Print the results
run: |
echo "Is it latest? Survey says: ${{ steps.is_latest.outputs.latest }} !"

View File

@@ -1,10 +0,0 @@
name: "Set up postgres (linux)"
description: "Set up postgres service on linux vm for dbt integration tests"
runs:
using: "composite"
steps:
- shell: bash
run: |
sudo systemctl start postgresql.service
pg_isready
sudo -u postgres bash ${{ github.action_path }}/setup_db.sh

View File

@@ -1 +0,0 @@
../../../test/setup_db.sh

View File

@@ -1,24 +0,0 @@
name: "Set up postgres (macos)"
description: "Set up postgres service on macos vm for dbt integration tests"
runs:
using: "composite"
steps:
- shell: bash
run: |
brew services start postgresql
echo "Check PostgreSQL service is running"
i=10
COMMAND='pg_isready'
while [ $i -gt -1 ]; do
if [ $i == 0 ]; then
echo "PostgreSQL service not ready, all attempts exhausted"
exit 1
fi
echo "Check PostgreSQL service status"
eval $COMMAND && break
echo "PostgreSQL service not ready, wait 10 more sec, attempts left: $i"
sleep 10
((i--))
done
createuser -s postgres
bash ${{ github.action_path }}/setup_db.sh

View File

@@ -1 +0,0 @@
../../../test/setup_db.sh

View File

@@ -5,8 +5,22 @@ runs:
steps:
- shell: pwsh
run: |
$pgService = Get-Service -Name postgresql*
Write-Host -Object "Installing PostgreSQL 16 as windows service..."
$installerArgs = @("--install_runtimes 0", "--superpassword root", "--enable_acledit 1", "--unattendedmodeui none", "--mode unattended")
$filePath = Invoke-DownloadWithRetry -Url "https://get.enterprisedb.com/postgresql/postgresql-16.1-1-windows-x64.exe" -Path "$env:PGROOT/postgresql-16.1-1-windows-x64.exe"
Start-Process -FilePath $filePath -ArgumentList $installerArgs -Wait -PassThru
Write-Host -Object "Validating PostgreSQL 16 Install..."
Get-Service -Name postgresql*
$pgReady = Start-Process -FilePath "$env:PGBIN\pg_isready" -Wait -PassThru
$exitCode = $pgReady.ExitCode
if ($exitCode -ne 0) {
Write-Host -Object "PostgreSQL is not ready. Exitcode: $exitCode"
exit $exitCode
}
Write-Host -Object "Starting PostgreSQL 16 Service..."
$pgService = Get-Service -Name postgresql-x64-16
Set-Service -InputObject $pgService -Status running -StartupType automatic
Start-Process -FilePath "$env:PGBIN\pg_isready" -Wait -PassThru
$env:Path += ";$env:PGBIN"
bash ${{ github.action_path }}/setup_db.sh

179
.github/workflows/artifact-reviews.yml vendored Normal file
View File

@@ -0,0 +1,179 @@
# **what?**
# Enforces 2 reviews when artifact or validation files are modified.
# **why?**
# Ensure artifact changes receive proper review from designated team members. GitHub doesn't support
# multiple reviews on a single PR based on files changed, so we need to enforce this manually.
# **when?**
# This will run when reviews are submitted and dismissed.
name: "Enforce Additional Reviews on Artifact and Validations Changes"
permissions:
checks: write
pull-requests: write
contents: read
on:
# trigger check on review events. use pull_request_target for forks.
pull_request_target:
types: [opened, reopened, ready_for_review, synchronize, review_requested]
pull_request_review:
types: [submitted, edited, dismissed]
# only run this once per PR at a time
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
env:
required_approvals: 2
team: "core-group"
jobs:
check-reviews:
name: "Validate Additional Reviews"
runs-on: ${{ vars.UBUNTU_LATEST }}
steps:
- name: "Get list of changed files"
id: changed_files
run: |
# Fetch files as JSON and process with jq to sanitize output
gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files \
| jq -r '.[].filename' \
| while IFS= read -r file; do
# Sanitize the filename by removing any special characters and command injection attempts
clean_file=$(echo "$file" | sed 's/[^a-zA-Z0-9\.\/\-_]//g')
echo "$clean_file"
done > changed_files.txt
echo "CHANGED_FILES<<EOF" >> $GITHUB_OUTPUT
cat changed_files.txt >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Check if any artifact files changed"
id: artifact_files_changed
run: |
artifact_changes=false
while IFS= read -r file; do
# Only process if file path looks legitimate
if [[ "$file" =~ ^[a-zA-Z0-9\.\/\-_]+$ ]]; then
if [[ "$file" == "core/dbt/artifacts/"* ]] ; then
artifact_changes=true
break
fi
fi
done < changed_files.txt
echo "artifact_changes=$artifact_changes" >> $GITHUB_OUTPUT
- name: "Get Core Team Members"
if: steps.artifact_files_changed.outputs.artifact_changes == 'true'
id: core_members
run: |
gh api -H "Accept: application/vnd.github+json" \
/orgs/dbt-labs/teams/${{ env.team }}/members > core_members.json
# Extract usernames and set as multiline output
echo "membership<<EOF" >> $GITHUB_OUTPUT
jq -r '.[].login' core_members.json >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ secrets.IT_TEAM_MEMBERSHIP }}
- name: "Verify ${{ env.required_approvals }} core team approvals"
if: steps.artifact_files_changed.outputs.artifact_changes == 'true'
id: check_approvals
run: |
# Get all reviews
REVIEWS=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews)
echo "All reviews:"
echo "$REVIEWS"
# Count approved reviews from core team members (only most recent review per user)
CORE_APPROVALS=0
while IFS= read -r member; do
echo "Checking member: $member"
APPROVED=$(echo "$REVIEWS" | jq --arg user "$member" '
group_by(.user.login) |
map(select(.[0].user.login == $user) |
sort_by(.submitted_at) |
last) |
map(select(.state == "APPROVED" and (.state != "DISMISSED"))) |
length')
echo "Latest review state for $member: $APPROVED"
CORE_APPROVALS=$((CORE_APPROVALS + APPROVED))
echo "Running total: $CORE_APPROVALS"
done <<< "${{ steps.core_members.outputs.membership }}"
echo "CORE_APPROVALS=$CORE_APPROVALS" >> $GITHUB_OUTPUT
echo "CORE_APPROVALS=$CORE_APPROVALS"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Find Comment"
if: steps.artifact_files_changed.outputs.artifact_changes == 'true' && steps.check_approvals.outputs.CORE_APPROVALS < env.required_approvals
uses: peter-evans/find-comment@v2
id: find-comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: "### Additional Artifact Review Required"
- name: "Create Comment"
if: steps.artifact_files_changed.outputs.artifact_changes == 'true' && steps.find-comment.outputs.comment-id == '' && steps.check_approvals.outputs.CORE_APPROVALS < env.required_approvals
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
### Additional Artifact Review Required
Changes to artifact directory files requires at least ${{ env.required_approvals }} approvals from core team members.
- name: "Notify if not enough approvals"
if: steps.artifact_files_changed.outputs.artifact_changes == 'true'
run: |
if [[ "${{ steps.check_approvals.outputs.CORE_APPROVALS }}" -ge "${{ env.required_approvals }}" ]]; then
title="Extra requirements met"
message="Changes to artifact directory files requires at least ${{ env.required_approvals }} approvals from core team members. Current number of core team approvals: ${{ steps.check_approvals.outputs.CORE_APPROVALS }} "
echo "::notice title=$title::$message"
echo "REVIEW_STATUS=success" >> $GITHUB_OUTPUT
else
title="PR Approval Requirements Not Met"
message="Changes to artifact directory files requires at least ${{ env.required_approvals }} approvals from core team members. Current number of core team approvals: ${{ steps.check_approvals.outputs.CORE_APPROVALS }} "
echo "::notice title=$title::$message"
echo "REVIEW_STATUS=neutral" >> $GITHUB_OUTPUT
fi
id: review_check
- name: "Set check status"
id: status_check
run: |
if [[ "${{ steps.artifact_files_changed.outputs.artifact_changes }}" == 'false' ]]; then
# no extra review required
echo "current_status=success" >> $GITHUB_OUTPUT
elif [[ "${{ steps.review_check.outputs.REVIEW_STATUS }}" == "success" ]]; then
# we have all the required reviews
echo "current_status=success" >> $GITHUB_OUTPUT
else
# neutral exit - neither success nor failure
# we can't fail here because we use multiple triggers for this workflow and they won't reset the check
# workaround is to use a neutral exit to skip the check run until it's actually successful
echo "current_status=neutral" >> $GITHUB_OUTPUT
fi
- name: "Post Event"
run: |
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
/repos/${{ github.repository }}/check-runs \
-f name='Artifact Review Check' \
-f head_sha=${{ github.event.pull_request_target.head.sha || github.event.pull_request.head.sha }} \
-f status='completed' \
-f conclusion='${{ steps.status_check.outputs.current_status }}' \
-f force=true \
-f details_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Some files were not shown because too many files have changed in this diff Show More