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

Resolve site crash due to relationships test with missing dependency #208

Merged
merged 1 commit into from
Jul 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## dbt 0.20.0 (Release TBD)
## dbt 0.20.1rc1 (Release TBD)

- Fix docs site crash if `relationships` test has one dependency instead of two ([docs#207](https://github.com/dbt-labs/dbt-docs/issues/207), ([docs#208](https://github.com/dbt-labs/dbt-docs/issues/208)))

## dbt 0.20.0 (July 12, 2021

- Update dbt logo and links ([docs#197](https://github.com/fishtown-analytics/dbt-docs/issues/197))

Expand Down
5 changes: 5 additions & 0 deletions ci-project/models/marts/core/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ models:
- relationships:
to: ref('dim_customers')
field: customer_id
# intentionally bad: this test will only have one entry in depends_on.nodes.
# make sure it doesn't brick the entire dbt-docs site: https://github.com/dbt-labs/dbt-docs/issues/207
- relationships:
to: "{{ target.schema}}.dim_customers"
field: customer_id

- name: order_date
description: Date (UTC) that the order was placed
Expand Down
2 changes: 1 addition & 1 deletion ci-project/packages.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

packages:
- package: fishtown-analytics/dbt_utils
version: 0.2.5
version: 0.7.0
2 changes: 1 addition & 1 deletion data/catalog.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/manifest.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/app/services/project_service.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ angular
var test_column = test.column_name || test.test_metadata.kwargs.column_name || test.test_metadata.kwargs.arg;
if (depends_on.length && test_column) {
if (test.test_metadata.name == 'relationships') {
var model = depends_on[1];
var model = depends_on[depends_on.length - 1];
} else {
var model = depends_on[0]
}
Expand Down