From 484b2033ea7335de0da69f1c653d58440ac1564b Mon Sep 17 00:00:00 2001 From: Paolo Quadri Date: Tue, 18 Jun 2024 14:39:15 +0200 Subject: [PATCH 1/6] fix: add flags --- schemas/dbt_project.json | 14 ++++++++++++++ schemas/latest/dbt_project-latest.json | 14 ++++++++++++++ tests/latest/valid/dbt_project.yml | 3 +++ 3 files changed, 31 insertions(+) diff --git a/schemas/dbt_project.json b/schemas/dbt_project.json index d626c21..624112d 100644 --- a/schemas/dbt_project.json +++ b/schemas/dbt_project.json @@ -42,6 +42,20 @@ "docs-paths": { "$ref": "#/$defs/array_of_strings" }, + "flags": { + "type": "object", + "properties": { + "require_explicit_package_overrides_for_builtin_materializations": { + "type": "boolean" + }, + "require_resource_names_without_spaces": { + "type": "boolean" + }, + "source_freshness_run_project_hooks": { + "type": "string" + } + } + }, "log-path": { "type": "string" }, diff --git a/schemas/latest/dbt_project-latest.json b/schemas/latest/dbt_project-latest.json index 2cb4ed9..e68e49f 100644 --- a/schemas/latest/dbt_project-latest.json +++ b/schemas/latest/dbt_project-latest.json @@ -59,6 +59,20 @@ "docs-paths": { "$ref": "#/$defs/array_of_strings" }, + "flags": { + "type": "object", + "properties": { + "require_explicit_package_overrides_for_builtin_materializations": { + "type": "boolean" + }, + "require_resource_names_without_spaces": { + "type": "boolean" + }, + "source_freshness_run_project_hooks": { + "type": "string" + } + } + }, "log-path": { "type": "string" }, diff --git a/tests/latest/valid/dbt_project.yml b/tests/latest/valid/dbt_project.yml index 8f95c49..84f03e4 100644 --- a/tests/latest/valid/dbt_project.yml +++ b/tests/latest/valid/dbt_project.yml @@ -8,6 +8,9 @@ name: 'test' # This setting configures which "profile" dbt uses for this project. profile: 'test' +flags: + require_explicit_package_overrides_for_builtin_materializations: True + # These configurations specify where dbt should look for different types of files. # The `model-paths` config, for example, states that models in this project can be # found in the "models/" directory. You probably won't need to change these! From d6863985a8f1cb90661517b34e5e12a00f5b1ae9 Mon Sep 17 00:00:00 2001 From: Paolo Quadri Date: Thu, 20 Jun 2024 17:18:52 +0200 Subject: [PATCH 2/6] feat: add other flags --- schemas/dbt_project.json | 22 +++++++++++++++++++++- schemas/latest/dbt_project-latest.json | 22 +++++++++++++++++++++- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/schemas/dbt_project.json b/schemas/dbt_project.json index 624112d..618c395 100644 --- a/schemas/dbt_project.json +++ b/schemas/dbt_project.json @@ -53,7 +53,27 @@ }, "source_freshness_run_project_hooks": { "type": "string" - } + }, + "cache_selected_only": {"type": "boolean"}, + "debug": {"type": "boolean"}, + "fail_fast": {"type": "boolean"}, + "indirect_selection": {"type": "boolean"}, + "log_format": {"type": "boolean"}, + "log_format_file": {"type": "boolean"}, + "log_level": {"type": "boolean"}, + "log_level_file": {"type": "boolean"}, + "partial_parse": {"type": "boolean"}, + "populate_cache": {"type": "boolean"}, + "printer_width": {"type": "boolean"}, + "send_anonymous_usage_stats": {"type": "boolean"}, + "static_parser": {"type": "boolean"}, + "use_colors": {"type": "boolean"}, + "use_colors_file": {"type": "boolean"}, + "use_experimental_parser": {"type": "boolean"}, + "version_check": {"type": "boolean"}, + "warn_error": {"type": "boolean"}, + "warn_error_options": {"type": "boolean"}, + "write_json": {"type": "boolean"} } }, "log-path": { diff --git a/schemas/latest/dbt_project-latest.json b/schemas/latest/dbt_project-latest.json index e68e49f..f6a52dc 100644 --- a/schemas/latest/dbt_project-latest.json +++ b/schemas/latest/dbt_project-latest.json @@ -70,7 +70,27 @@ }, "source_freshness_run_project_hooks": { "type": "string" - } + }, + "cache_selected_only": {"type": "boolean"}, + "debug": {"type": "boolean"}, + "fail_fast": {"type": "boolean"}, + "indirect_selection": {"type": "boolean"}, + "log_format": {"type": "boolean"}, + "log_format_file": {"type": "boolean"}, + "log_level": {"type": "boolean"}, + "log_level_file": {"type": "boolean"}, + "partial_parse": {"type": "boolean"}, + "populate_cache": {"type": "boolean"}, + "printer_width": {"type": "boolean"}, + "send_anonymous_usage_stats": {"type": "boolean"}, + "static_parser": {"type": "boolean"}, + "use_colors": {"type": "boolean"}, + "use_colors_file": {"type": "boolean"}, + "use_experimental_parser": {"type": "boolean"}, + "version_check": {"type": "boolean"}, + "warn_error": {"type": "boolean"}, + "warn_error_options": {"type": "boolean"}, + "write_json": {"type": "boolean"} } }, "log-path": { From 82623c0193feb085ab92cf676c7b32f58e3aec52 Mon Sep 17 00:00:00 2001 From: Paolo Quadri Date: Thu, 20 Jun 2024 17:22:08 +0200 Subject: [PATCH 3/6] fix: types --- schemas/dbt_project.json | 14 +++++++------- schemas/latest/dbt_project-latest.json | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/schemas/dbt_project.json b/schemas/dbt_project.json index 618c395..bfa5467 100644 --- a/schemas/dbt_project.json +++ b/schemas/dbt_project.json @@ -57,14 +57,14 @@ "cache_selected_only": {"type": "boolean"}, "debug": {"type": "boolean"}, "fail_fast": {"type": "boolean"}, - "indirect_selection": {"type": "boolean"}, - "log_format": {"type": "boolean"}, - "log_format_file": {"type": "boolean"}, - "log_level": {"type": "boolean"}, - "log_level_file": {"type": "boolean"}, + "indirect_selection": {"type": "string"}, + "log_format": {"type": "string"}, + "log_format_file": {"type": "string"}, + "log_level": {"type": "string"}, + "log_level_file": {"type": "string"}, "partial_parse": {"type": "boolean"}, "populate_cache": {"type": "boolean"}, - "printer_width": {"type": "boolean"}, + "printer_width": {"type": "integer"}, "send_anonymous_usage_stats": {"type": "boolean"}, "static_parser": {"type": "boolean"}, "use_colors": {"type": "boolean"}, @@ -72,7 +72,7 @@ "use_experimental_parser": {"type": "boolean"}, "version_check": {"type": "boolean"}, "warn_error": {"type": "boolean"}, - "warn_error_options": {"type": "boolean"}, + "warn_error_options": {"type": "object"}, "write_json": {"type": "boolean"} } }, diff --git a/schemas/latest/dbt_project-latest.json b/schemas/latest/dbt_project-latest.json index f6a52dc..451e105 100644 --- a/schemas/latest/dbt_project-latest.json +++ b/schemas/latest/dbt_project-latest.json @@ -74,14 +74,14 @@ "cache_selected_only": {"type": "boolean"}, "debug": {"type": "boolean"}, "fail_fast": {"type": "boolean"}, - "indirect_selection": {"type": "boolean"}, - "log_format": {"type": "boolean"}, - "log_format_file": {"type": "boolean"}, - "log_level": {"type": "boolean"}, - "log_level_file": {"type": "boolean"}, + "indirect_selection": {"type": "string"}, + "log_format": {"type": "string"}, + "log_format_file": {"type": "string"}, + "log_level": {"type": "string"}, + "log_level_file": {"type": "string"}, "partial_parse": {"type": "boolean"}, "populate_cache": {"type": "boolean"}, - "printer_width": {"type": "boolean"}, + "printer_width": {"type": "integer"}, "send_anonymous_usage_stats": {"type": "boolean"}, "static_parser": {"type": "boolean"}, "use_colors": {"type": "boolean"}, @@ -89,7 +89,7 @@ "use_experimental_parser": {"type": "boolean"}, "version_check": {"type": "boolean"}, "warn_error": {"type": "boolean"}, - "warn_error_options": {"type": "boolean"}, + "warn_error_options": {"type": "object"}, "write_json": {"type": "boolean"} } }, From 6ef70cd142f814655654da3f08897caafae2ace6 Mon Sep 17 00:00:00 2001 From: Joel Labes Date: Thu, 11 Jul 2024 13:15:28 +1200 Subject: [PATCH 4/6] sort properties --- schemas/latest/dbt_project-latest.json | 82 +++++++++++++++++++------- 1 file changed, 61 insertions(+), 21 deletions(-) diff --git a/schemas/latest/dbt_project-latest.json b/schemas/latest/dbt_project-latest.json index 451e105..a07882e 100644 --- a/schemas/latest/dbt_project-latest.json +++ b/schemas/latest/dbt_project-latest.json @@ -62,35 +62,75 @@ "flags": { "type": "object", "properties": { + "cache_selected_only": { + "type": "boolean" + }, + "debug": { + "type": "boolean" + }, + "fail_fast": { + "type": "boolean" + }, + "indirect_selection": { + "type": "string" + }, + "log_format": { + "type": "string" + }, + "log_format_file": { + "type": "string" + }, + "log_level": { + "type": "string" + }, + "log_level_file": { + "type": "string" + }, + "partial_parse": { + "type": "boolean" + }, + "populate_cache": { + "type": "boolean" + }, + "printer_width": { + "type": "integer" + }, "require_explicit_package_overrides_for_builtin_materializations": { "type": "boolean" }, "require_resource_names_without_spaces": { "type": "boolean" }, + "send_anonymous_usage_stats": { + "type": "boolean" + }, "source_freshness_run_project_hooks": { "type": "string" }, - "cache_selected_only": {"type": "boolean"}, - "debug": {"type": "boolean"}, - "fail_fast": {"type": "boolean"}, - "indirect_selection": {"type": "string"}, - "log_format": {"type": "string"}, - "log_format_file": {"type": "string"}, - "log_level": {"type": "string"}, - "log_level_file": {"type": "string"}, - "partial_parse": {"type": "boolean"}, - "populate_cache": {"type": "boolean"}, - "printer_width": {"type": "integer"}, - "send_anonymous_usage_stats": {"type": "boolean"}, - "static_parser": {"type": "boolean"}, - "use_colors": {"type": "boolean"}, - "use_colors_file": {"type": "boolean"}, - "use_experimental_parser": {"type": "boolean"}, - "version_check": {"type": "boolean"}, - "warn_error": {"type": "boolean"}, - "warn_error_options": {"type": "object"}, - "write_json": {"type": "boolean"} + "static_parser": { + "type": "boolean" + }, + "use_colors": { + "type": "boolean" + }, + "use_colors_file": { + "type": "boolean" + }, + "use_experimental_parser": { + "type": "boolean" + }, + "version_check": { + "type": "boolean" + }, + "warn_error": { + "type": "boolean" + }, + "warn_error_options": { + "type": "object" + }, + "write_json": { + "type": "boolean" + } } }, "log-path": { @@ -1069,4 +1109,4 @@ "type": "string" } } -} +} \ No newline at end of file From cb2b95e002221bc33e53ea21c75add3941b2ced6 Mon Sep 17 00:00:00 2001 From: Joel Labes Date: Thu, 11 Jul 2024 13:16:13 +1200 Subject: [PATCH 5/6] remove flags block from legacy dbt_project.json --- schemas/dbt_project.json | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/schemas/dbt_project.json b/schemas/dbt_project.json index bfa5467..d626c21 100644 --- a/schemas/dbt_project.json +++ b/schemas/dbt_project.json @@ -42,40 +42,6 @@ "docs-paths": { "$ref": "#/$defs/array_of_strings" }, - "flags": { - "type": "object", - "properties": { - "require_explicit_package_overrides_for_builtin_materializations": { - "type": "boolean" - }, - "require_resource_names_without_spaces": { - "type": "boolean" - }, - "source_freshness_run_project_hooks": { - "type": "string" - }, - "cache_selected_only": {"type": "boolean"}, - "debug": {"type": "boolean"}, - "fail_fast": {"type": "boolean"}, - "indirect_selection": {"type": "string"}, - "log_format": {"type": "string"}, - "log_format_file": {"type": "string"}, - "log_level": {"type": "string"}, - "log_level_file": {"type": "string"}, - "partial_parse": {"type": "boolean"}, - "populate_cache": {"type": "boolean"}, - "printer_width": {"type": "integer"}, - "send_anonymous_usage_stats": {"type": "boolean"}, - "static_parser": {"type": "boolean"}, - "use_colors": {"type": "boolean"}, - "use_colors_file": {"type": "boolean"}, - "use_experimental_parser": {"type": "boolean"}, - "version_check": {"type": "boolean"}, - "warn_error": {"type": "boolean"}, - "warn_error_options": {"type": "object"}, - "write_json": {"type": "boolean"} - } - }, "log-path": { "type": "string" }, From a85e53865243ed882a0411f19b4d0d9c89d3b29c Mon Sep 17 00:00:00 2001 From: Joel Labes Date: Thu, 11 Jul 2024 13:19:39 +1200 Subject: [PATCH 6/6] Update schemas/latest/dbt_project-latest.json --- schemas/latest/dbt_project-latest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas/latest/dbt_project-latest.json b/schemas/latest/dbt_project-latest.json index a07882e..db6bdf0 100644 --- a/schemas/latest/dbt_project-latest.json +++ b/schemas/latest/dbt_project-latest.json @@ -105,7 +105,7 @@ "type": "boolean" }, "source_freshness_run_project_hooks": { - "type": "string" + "type": "boolean" }, "static_parser": { "type": "boolean"