Skip to content

[CT-2278] Package specific overviews are not rendered in 1.4.0 onwards (unless provided at project level) #390

@rlh1994

Description

@rlh1994

Describe the bug

Package level overviews from packages imported into a project are not correctly being loaded and rendered in the generated docs sites, instead the default overview is being used. This used to be served on any imported packages. It still works if you copy them to your project level, but this is not standard behaviour.

Steps To Reproduce

  1. Create a dbt project
  2. Create and add the following to packages.yml
    packages:
      - package: snowplow/snowplow_web
        version: 0.13.2
  3. Run dbt deps then dbt docs generate then dbt docs serve
  4. Click on the Snowplow_web folder on the left, it will contain the default welcome message
  5. Copy the dbt_packages/snowplow_web/docs/markdown/snowplow_web_overview.md file to models/snowplow_web_overview.md and re-run dbt docs generate
  6. Refresh the served page (maybe not required), the snowplow web overview is now rendered
    1. (Optional) Delete the file you added and re-generate and refresh, overview is gone
    2. (Optional) Alternatively, you can delete the specific doc.<your_project_name>.__snowplow_web__ from the manifest and see the change, note that doc.snowplow_web.__snowplow_web__ also exists and should be being rendered.

Expected behavior

The markdown is rendered without needing to copy the file to the project level

Screenshots and log output

The output of dbt --version:

Core:
  - installed: 1.4.4
  - latest:    1.4.4 - Up to date!

Plugins:
  - databricks: 1.4.2 - Up to date!
  - bigquery:   1.4.1 - Up to date!
  - snowflake:  1.4.1 - Up to date!
  - redshift:   1.4.0 - Up to date!
  - postgres:   1.4.4 - Up to date!
  - spark:      1.4.1 - Up to date!

Additional context

Related to https://github.com/dbt-labs/dbt-docs/pull/367/files, my guess is it's related to the following line

selected_overview = project.docs[`${project_name}.__${project_name}__`] || selected_overview

which maybe needs to be changed to

selected_overview = project.docs[`doc.${project_name}.__${project_name}__`] || selected_overview

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions