From 96be317b00ff04480a7395686b9e661690e7946a Mon Sep 17 00:00:00 2001 From: Dave Connors Date: Wed, 25 Oct 2023 09:36:30 -0500 Subject: [PATCH 1/4] add simple schemas for dbt_cloud.yml --- schemas/1.5/dbt_cloud-1.5.json | 14 ++++++++++++++ schemas/1.6/dbt_cloud-1.6.json | 14 ++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 schemas/1.5/dbt_cloud-1.5.json create mode 100644 schemas/1.6/dbt_cloud-1.6.json diff --git a/schemas/1.5/dbt_cloud-1.5.json b/schemas/1.5/dbt_cloud-1.5.json new file mode 100644 index 0000000..70921f0 --- /dev/null +++ b/schemas/1.5/dbt_cloud-1.5.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "project-id": { + "type": "string" + }, + "defer-env-id": { + "type": "string" + } + }, + "required": ["project-id"], + "additionalProperties": false +} diff --git a/schemas/1.6/dbt_cloud-1.6.json b/schemas/1.6/dbt_cloud-1.6.json new file mode 100644 index 0000000..70921f0 --- /dev/null +++ b/schemas/1.6/dbt_cloud-1.6.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "project-id": { + "type": "string" + }, + "defer-env-id": { + "type": "string" + } + }, + "required": ["project-id"], + "additionalProperties": false +} From c3751cb4a29be31bf756b9a30c6674d2c5b94fe6 Mon Sep 17 00:00:00 2001 From: Dave Connors Date: Wed, 25 Oct 2023 09:36:49 -0500 Subject: [PATCH 2/4] add tests for both versions --- tests/1.5/invalid/dbt_cloud.yml | 1 + tests/1.5/valid/dbt_cloud.yml | 1 + tests/1.6/invalid/dbt_cloud.yml | 1 + tests/1.6/valid/dbt_cloud.yml | 1 + 4 files changed, 4 insertions(+) create mode 100644 tests/1.5/invalid/dbt_cloud.yml create mode 100644 tests/1.5/valid/dbt_cloud.yml create mode 100644 tests/1.6/invalid/dbt_cloud.yml create mode 100644 tests/1.6/valid/dbt_cloud.yml diff --git a/tests/1.5/invalid/dbt_cloud.yml b/tests/1.5/invalid/dbt_cloud.yml new file mode 100644 index 0000000..f249f27 --- /dev/null +++ b/tests/1.5/invalid/dbt_cloud.yml @@ -0,0 +1 @@ +dave-loves-dbt: true \ No newline at end of file diff --git a/tests/1.5/valid/dbt_cloud.yml b/tests/1.5/valid/dbt_cloud.yml new file mode 100644 index 0000000..0742ac6 --- /dev/null +++ b/tests/1.5/valid/dbt_cloud.yml @@ -0,0 +1 @@ +project-id: '672' \ No newline at end of file diff --git a/tests/1.6/invalid/dbt_cloud.yml b/tests/1.6/invalid/dbt_cloud.yml new file mode 100644 index 0000000..80e214d --- /dev/null +++ b/tests/1.6/invalid/dbt_cloud.yml @@ -0,0 +1 @@ +dave-loves-dbt: true diff --git a/tests/1.6/valid/dbt_cloud.yml b/tests/1.6/valid/dbt_cloud.yml new file mode 100644 index 0000000..0742ac6 --- /dev/null +++ b/tests/1.6/valid/dbt_cloud.yml @@ -0,0 +1 @@ +project-id: '672' \ No newline at end of file From c2a851823535f0f75ccb0d8a141b91b63c5587e1 Mon Sep 17 00:00:00 2001 From: Dave Connors Date: Wed, 25 Oct 2023 09:37:11 -0500 Subject: [PATCH 3/4] update vscode validation mappings --- .vscode/settings.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.vscode/settings.json b/.vscode/settings.json index c99121e..95581f3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,6 +4,7 @@ "/tests/1.5/**/*.yml", "!profiles.yml", "!dbt_project.yml", + "!dbt_cloud.yml", "!packages.yml", "!selectors.yml", "!profile_template.yml", @@ -12,6 +13,9 @@ "./schemas/1.5/dbt_project-1.5.json": [ "/tests/1.5/**/dbt_project.yml" ], + "./schemas/1.5/dbt_cloud-1.5.json": [ + "/tests/1.5/**/dbt_cloud.yml" + ], "./schemas/1.5/selectors-1.5.json": [ "/tests/1.5/**/selectors.yml" ], @@ -23,6 +27,7 @@ "/tests/1.6/**/*.yml", "!profiles.yml", "!dbt_project.yml", + "!dbt_cloud.yml", "!packages.yml", "!selectors.yml", "!dependencies.yml", @@ -32,6 +37,9 @@ "./schemas/1.6/dbt_project-1.6.json": [ "/tests/1.6/**/dbt_project.yml" ], + "./schemas/1.6/dbt_cloud-1.6.json": [ + "/tests/1.6/**/dbt_cloud.yml" + ], "./schemas/1.6/selectors-1.6.json": [ "/tests/1.6/**/selectors.yml" ], From 9d82241b7ddc601164aa4d1bccfc12ace5abcdfb Mon Sep 17 00:00:00 2001 From: Dave Connors Date: Wed, 25 Oct 2023 09:37:26 -0500 Subject: [PATCH 4/4] add dbt_cloud to ci --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 558dacd..ed983aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: strategy: matrix: dbt-version: ["1.5", "1.6"] - dbt-file-name: ["dbt_project", "packages", "selectors", "dbt_yml_files", "dependencies"] + dbt-file-name: ["dbt_project", "packages", "selectors", "dbt_yml_files", "dependencies", "dbt_cloud"] exclude: - dbt-version: "1.5" dbt-file-name: "dependencies"