dbt-labs/dbt-docs

[CT-3331] Exposures aren't displaying any properties (dbt > 1.6.0)

jeremyyeo opened this issue · 3 comments

Describe the bug

Sometime between patch versions 1.6.0 and 1.6.1 - exposures in dbt-docs lost the ability to display any properties except description.

Steps To Reproduce

Project setup:

# dbt_project.yml
name: my_dbt_project
profile: all
config-version: 2
version: "1.0.0"

models:
  my_dbt_project:
    +materialized: table
# models/exp.yml
version: 2

exposures:
  - name: weekly_jaffle_metrics
    label: Jaffles by the Week
    type: dashboard
    maturity: high
    url: https://bi.tool/dashboards/1
    description: >
      Did someone say "exponential growth"?

    depends_on:
      - ref('foo')

    owner:
      name: Mr Foo
      email: foo@acme.com
-- models/foo.sql
select 1 as id

Use 2 different python virtual environments for these.

  1. Install dbt 1.6.0, build and serve docs and inspect outcome:
$ pip install dbt-postgres==1.6.0
$ dbt docs generate && dbt docs serve
image
  1. Install the next patch version dbt 1.6.1 and do the same.
$ pip install dbt-postgres==1.6.1
$ dbt docs generate && dbt docs serve
image
  1. Any other patch version higher than 1.6.1 (e.g. 1.6.6) also has this issue.

Expected behavior

Exposures should show the same information in >=1.6.1 as they did =1.6.0.

Screenshots and log output

See above.

The output of dbt --version:

Exposure shows additional properties:

Core:
  - installed: 1.6.0
  - latest:    1.7.0 - Update available!

  Your version of dbt-core is out of date!
  You can find instructions for upgrading here:
  https://docs.getdbt.com/docs/installation

Plugins:
  - postgres: 1.6.0 - Update available!

  At least one plugin is out of date or incompatible with dbt-core.
  You can find instructions for upgrading here:
  https://docs.getdbt.com/docs/installation

Exposure not showing any properties:

Core:
  - installed: 1.6.1
  - latest:    1.7.0 - Update available!

  Your version of dbt-core is out of date!
  You can find instructions for upgrading here:
  https://docs.getdbt.com/docs/installation

Plugins:
  - postgres: 1.6.1 - Update available!

  At least one plugin is out of date or incompatible with dbt-core.
  You can find instructions for upgrading here:
  https://docs.getdbt.com/docs/installation

Additional context

Afaict, the contents in manifest.json for both version re: the exposure node has not changed:

1.6.0

  "metadata": {
    "dbt_schema_version": "https://schemas.getdbt.com/dbt/manifest/v10.json",
    "dbt_version": "1.6.0",
    "generated_at": "2023-11-07T01:01:27.107040Z",
    "invocation_id": "b0703eb6-e4da-4b1b-a74f-3f5c4446f75e",
    "env": {},
    "project_name": "my_dbt_project",
    "project_id": "8e00f1da647a9fd0396f0423a0fe1eda",
    "user_id": "c7db1ffc-e489-43ff-a090-198c5ec53fea",
    "send_anonymous_usage_stats": true,
    "adapter_type": "postgres"
  },
...
  "exposures": {
    "exposure.my_dbt_project.weekly_jaffle_metrics": {
      "name": "weekly_jaffle_metrics",
      "resource_type": "exposure",
      "package_name": "my_dbt_project",
      "path": "exp.yml",
      "original_file_path": "models/exp.yml",
      "unique_id": "exposure.my_dbt_project.weekly_jaffle_metrics",
      "fqn": ["my_dbt_project", "weekly_jaffle_metrics"],
      "type": "dashboard",
      "owner": { "email": "foo@acme.com", "name": "Mr Foo" },
      "description": "Did someone say \"exponential growth\"?\n",
      "label": "Jaffles by the Week",
      "maturity": "high",
      "meta": {},
      "tags": [],
      "config": { "enabled": true },
      "unrendered_config": {},
      "url": "https://bi.tool/dashboards/1",
      "depends_on": { "macros": [], "nodes": ["model.my_dbt_project.foo"] },
      "refs": [{ "name": "foo", "package": null, "version": null }],
      "sources": [],
      "metrics": [],
      "created_at": 1699318888.0205598
    }
  },

1.6.1

  "metadata": {
    "dbt_schema_version": "https://schemas.getdbt.com/dbt/manifest/v10.json",
    "dbt_version": "1.6.1",
    "generated_at": "2023-11-07T00:56:38.637651Z",
    "invocation_id": "59f7da3f-497e-4ffa-9c5e-687acc0fa3ec",
    "env": {},
    "project_name": "my_dbt_project",
    "project_id": "8e00f1da647a9fd0396f0423a0fe1eda",
    "user_id": "c7db1ffc-e489-43ff-a090-198c5ec53fea",
    "send_anonymous_usage_stats": true,
    "adapter_type": "postgres"
  },
...
  "exposures": {
    "exposure.my_dbt_project.weekly_jaffle_metrics": {
      "name": "weekly_jaffle_metrics",
      "resource_type": "exposure",
      "package_name": "my_dbt_project",
      "path": "exp.yml",
      "original_file_path": "models/exp.yml",
      "unique_id": "exposure.my_dbt_project.weekly_jaffle_metrics",
      "fqn": ["my_dbt_project", "weekly_jaffle_metrics"],
      "type": "dashboard",
      "owner": { "email": "foo@acme.com", "name": "Mr Foo" },
      "description": "Did someone say \"exponential growth\"?\n",
      "label": "Jaffles by the Week",
      "maturity": "high",
      "meta": {},
      "tags": [],
      "config": { "enabled": true },
      "unrendered_config": {},
      "url": "https://bi.tool/dashboards/1",
      "depends_on": { "macros": [], "nodes": ["model.my_dbt_project.foo"] },
      "refs": [{ "name": "foo", "package": null, "version": null }],
      "sources": [],
      "metrics": [],
      "created_at": 1699318599.481571
    }
  },

So it may be the html/js in this repo - maybe #465? Not sure yet.

There is #470 as well but not sure if it's about the same thing.

Thanks for reporting this @jeremyyeo.

Using the example you provided, I saw the same thing as you. But I didn't dive in far enough to identify the root cause(s).

Thank you for examining manifest.json and basically ruling it out as a suspect and honing in on it likely being something within the dbt-docs repo.

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days.

Currently on dbt v1.8 and having the same issue still.