Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add saved query resource type #10168

Merged
merged 2 commits into from
May 21, 2024
Merged

add saved query resource type #10168

merged 2 commits into from
May 21, 2024

Conversation

ChenyuLInx
Copy link
Contributor

resolves dbt-labs/dbt-docs#486

Problem

Resource Type did not exist on saved_query node

Solution

added the attribute

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX
  • This PR includes type annotations for new and modified functions

Copy link
Contributor

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

@ChenyuLInx ChenyuLInx added the artifact_minor_upgrade To bypass the CI check by confirming that the change is not breaking label May 17, 2024
Copy link

codecov bot commented May 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.95%. Comparing base (341803d) to head (2a828db).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10168      +/-   ##
==========================================
- Coverage   88.62%   85.95%   -2.68%     
==========================================
  Files         180      180              
  Lines       22422    22424       +2     
==========================================
- Hits        19872    19275     -597     
- Misses       2550     3149     +599     
Flag Coverage Δ
integration 85.95% <100.00%> (-0.10%) ⬇️
unit ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ChenyuLInx
Copy link
Contributor Author

This artifact check fail is expected, @emmyoop any idea how can we skip this?

@ChenyuLInx
Copy link
Contributor Author

Schema difference

diff --git a/dbt/manifest/v12.json b/dbt/manifest/v12.json
index 8b4f9bc..b571331 100644
--- a/dbt/manifest/v12.json
+++ b/dbt/manifest/v12.json
@@ -17914,26 +17914,7 @@
                       "type": "string"
                     },
                     "resource_type": {
-                      "enum": [
-                        "model",
-                        "analysis",
-                        "test",
-                        "snapshot",
-                        "operation",
-                        "seed",
-                        "rpc",
-                        "sql_operation",
-                        "doc",
-                        "source",
-                        "macro",
-                        "exposure",
-                        "metric",
-                        "group",
-                        "saved_query",
-                        "semantic_model",
-                        "unit_test",
-                        "fixture"
-                      ]
+                      "const": "saved_query"
                     },
                     "package_name": {
                       "type": "string"
@@ -19452,26 +19433,7 @@
             "type": "string"
           },
           "resource_type": {
-            "enum": [
-              "model",
-              "analysis",
-              "test",
-              "snapshot",
-              "operation",
-              "seed",
-              "rpc",
-              "sql_operation",
-              "doc",
-              "source",
-              "macro",
-              "exposure",
-              "metric",
-              "group",
-              "saved_query",
-              "semantic_model",
-              "unit_test",
-              "fixture"
-            ]
+            "const": "saved_query"
           },
           "package_name": {
             "type": "string"

@gshank
Copy link
Contributor

gshank commented May 20, 2024

We should have bumped to v13 of the schema after 1.8.0 went out.

@ChenyuLInx ChenyuLInx merged commit 6813007 into main May 21, 2024
65 of 68 checks passed
@ChenyuLInx ChenyuLInx deleted the cl/add_resource_type branch May 21, 2024 20:57
Copy link
Contributor

The backport to 1.8.latest failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-1.8.latest 1.8.latest
# Navigate to the new working tree
cd .worktrees/backport-1.8.latest
# Create a new branch
git switch --create backport-10168-to-1.8.latest
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 6813007e2856d40a705f9929aa19c764802b1285
# Push it to GitHub
git push --set-upstream origin backport-10168-to-1.8.latest
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-1.8.latest

Then, create a pull request where the base branch is 1.8.latest and the compare/head branch is backport-10168-to-1.8.latest.

ChenyuLInx added a commit that referenced this pull request May 22, 2024
* add saved query resource type

* nits

(cherry picked from commit 6813007)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
artifact_minor_upgrade To bypass the CI check by confirming that the change is not breaking backport 1.8.latest cla:yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CT-3530] Presence of saved_queries breaks lineage viz
2 participants