dbt-labs / dbt-core

dbt enables data analysts and engineers to transform their data using the same practices that software engineers use to build applications.
https://getdbt.com
Apache License 2.0
9.83k stars 1.62k forks source link

[Bug] Generate compare changes is showing a "Nothing to do" when only a seed file is changed!! #10823

Open gunnava opened 3 weeks ago

gunnava commented 3 weeks ago

Is this a new bug in dbt-core?

Current Behavior

The "Generate compare changes" step (debug logs for the run step attached) is throwing an error for a PR where only a seed is changed and with the warning config as below:

flags:
  warn_error_options:
    error: 
      - NoNodesForSelectionCriteria
      - NothingToDo
15:03:21 Encountered an error:
Compilation Error
Nothing to do. Try checking your model configs and model specification args

Expected Behavior

The expectation is that the Generate compare changes should show the files changed if any and not throw the warning "Nothing to do"

Steps To Reproduce

  1. Create a PR where only a seed file data is changed.
  2. trigger a CI run/ a run that would defer to another run and the only change is the above seed file entries.
  3. The Generate compare changes does not show the files changed(seed file in this case) and throws the warning "Nothing to do" image (3)

Relevant log output

No response

Environment

- OS:
- Python:
- dbt:

Which database adapter are you using with dbt?

No response

Additional Context

Slack thread: https://dbt-labs.slack.com/archives/C02SRNY2EQ4/p1726685698514849

dbeatty10 commented 2 weeks ago

Thanks for reporting this @gunnava!

How large is the seed file? If it is larger than 1 MiB, then it won't show up during state comparison.

I wasn't able to reproduce this will a very simple seed file less than 1 MiB. See below for details.

My project files and commands

I tried the files and commands below, and things worked as expected.

Start with these files:

dbt_project.yml

flags:
  warn_error_options:
    error: 
      - NoNodesForSelectionCriteria
      - NothingToDo

seeds/my_seed.csv

id
1

Run this command:

dbt build --target-path artifacts

Then change the seed file to this:

seeds/my_seed.csv

id
2

And run this command:

dbt build --select state:modified+ --state artifacts

It all worked as expected for me.