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

[CT-3429] [Bug] Selectors don't apply for sources and seeds in dbt docs generate #9161

Closed
2 tasks done
aranke opened this issue Nov 28, 2023 · 1 comment · Fixed by #9454
Closed
2 tasks done

[CT-3429] [Bug] Selectors don't apply for sources and seeds in dbt docs generate #9161

aranke opened this issue Nov 28, 2023 · 1 comment · Fixed by #9454
Assignees
Labels
backport 1.7.latest bug Something isn't working High Severity bug with significant impact that should be resolved in a reasonable timeframe Impact: CA

Comments

@aranke
Copy link
Member

aranke commented Nov 28, 2023

Is this a new bug in dbt-core?

  • I believe this is a new bug in dbt-core
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

Following up from #9159, if there are multiple seeds or sources in a dbt project and a selector is used, catalog.json should only contain the seeds or sources that match selection criteria (which is currently ignored).

Expected Behavior

The selection criteria above are respected.

Steps To Reproduce

  1. Add seeds my_first_seed and my_second_seed to project and run dbt seed
  2. Run dbt docs generate --select my_first_seed
  3. Inspect catalog.json to find that my_second_seed is in there even though it shouldn't be

Relevant log output

No response

Environment

- OS: MacOS (applies to all)
- Python: 3.11
- dbt: 1.7
- adapter: Postgres, but probably applies to all

Which database adapter are you using with dbt?

postgres

Additional Context

Acceptance Criteria:

  1. Fix TODOs here:
    class TestGenerateSelectSource(TestBaseGenerate):
    def test_select_source(self, project):
    run_dbt(["build"])
    catalog = run_dbt(["docs", "generate", "--select", "source:test.my_seed.sample_seed"])
    # 2 seeds
    # TODO: Filtering doesn't work for seeds
    assert len(catalog.nodes) == 2
    # 2 sources
    # TODO: Filtering doesn't work for sources
    assert len(catalog.sources) == 2
  2. Document other node types that selectors haven't been tested against
@aranke aranke added bug Something isn't working triage labels Nov 28, 2023
@github-actions github-actions bot changed the title [Bug] Selectors don't work for non-model objects in dbt docs generate [CT-3429] [Bug] Selectors don't work for non-model objects in dbt docs generate Nov 28, 2023
@aranke aranke removed the triage label Nov 28, 2023
@graciegoheen graciegoheen added High Severity bug with significant impact that should be resolved in a reasonable timeframe backport 1.7.latest labels Nov 28, 2023
@martynydbt martynydbt changed the title [CT-3429] [Bug] Selectors don't work for non-model objects in dbt docs generate [CT-3429] [Bug] Selectors don't apply for non-model objects in dbt docs generate Nov 29, 2023
@aranke
Copy link
Member Author

aranke commented Dec 4, 2023

Follow-up from technical refinement:

  1. Apply all selectors from other commands to docs generate

Follow-up from pointing:

  1. Refine scope to sources and seeds

@aranke aranke changed the title [CT-3429] [Bug] Selectors don't apply for non-model objects in dbt docs generate [CT-3429] [Bug] Selectors don't apply for sources and seeds in dbt docs generate Dec 4, 2023
@graciegoheen graciegoheen assigned emmyoop and unassigned emmyoop Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.7.latest bug Something isn't working High Severity bug with significant impact that should be resolved in a reasonable timeframe Impact: CA
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants