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

dbt run summary reports incorrect SKIP= numbers #2095

Closed
1 of 5 tasks
brangisom opened this issue Feb 4, 2020 · 3 comments · Fixed by #2310
Closed
1 of 5 tasks

dbt run summary reports incorrect SKIP= numbers #2095

brangisom opened this issue Feb 4, 2020 · 3 comments · Fixed by #2310
Labels
bug Something isn't working cli good_first_issue Straightforward + self-contained changes, good for new contributors!

Comments

@brangisom
Copy link
Contributor

brangisom commented Feb 4, 2020

Describe the bug

A clear and concise description of what the bug is. What command did you run? What happened?
When I do dbt run --models some_model+, if some_model fails, and it's dependencies SKIP, the final summary reports Done. PASS=4 WARN=0 ERROR=1 SKIP=0 TOTAL=5

Steps To Reproduce

In as much detail as possible, please provide steps to reproduce the issue. Sample data that triggers the issue, example model code, etc is all very helpful here.

dbt run --models any_model+ with dependencies, ensuring that any_model fails. The dependent models will SKIP, but the output will not record the number of skipped models.

Expected behavior

A clear and concise description of what you expected to happen.

dbt run --models any_model+ should report the correct number of skipped models in the final summary.

Screenshots and log output

If applicable, add screenshots or log output to help explain your problem.


19:02:14 | Concurrency: 4 threads (target='dev')
19:02:14 | 
19:02:14 | 1 of 5 START incremental model product_dev_user_name.parent_model [RUN]
19:02:18 | 1 of 5 ERROR creating incremental model product_dev_user_name.parent_model [ERROR in 3.69s]
19:02:19 | 2 of 5 SKIP relation product_dev_user_name.dependent_model1 [SKIP]
19:02:20 | 3 of 5 SKIP relation product_dev_user_name.dependent_model2 [SKIP]
19:02:20 | 4 of 5 SKIP relation product_dev_user_name.dependent_model3 [SKIP]
19:02:20 | 5 of 5 SKIP relation product_dev_user_name.dependent_model4 [SKIP]
19:02:22 | 
19:02:22 | Running 1 on-run-end hook
19:02:22 | 1 of 1 START hook: invision.on-run-end.0............................. [RUN]
19:02:33 | 1 of 1 OK hook: invision.on-run-end.0................................ [GRANT in 10.43s]
19:02:33 | 
19:02:33 | 
19:02:33 | Finished running 2 incremental models, 3 table models, 1 hook in 64.98s.

Completed with 1 error and 0 warnings:

Database Error in model v7_app_events__with_idle_time (models/product/parent_model.sql)
  relation "product_dev_user_name.missing_ref_example" does not exist
  compiled SQL at target/run/invision/product/parent_model.sql

Done. PASS=4 WARN=0 ERROR=1 SKIP=0 TOTAL=5

System information

Which database are you using dbt with?

  • postgres
  • redshift
  • bigquery
  • snowflake
  • other (specify: ____________)

The output of dbt --version:

installed version: 0.15.1
   latest version: 0.15.2

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

The operating system you're using:
Whatever I get out of docker build via FROM python:3.7.4. If it becomes important I can figure it out.
The output of python --version:
Python 3.7.4

Additional context

Add any other context about the problem here.

@brangisom brangisom added bug Something isn't working triage labels Feb 4, 2020
@brangisom
Copy link
Contributor Author

Here we go. The RunModelResult contract dropped the skipped definition, so it always returns false from the def in PartialResult. I think.

49f7cf8#diff-62f129966f7974678ed791d2e6eddc2bL184-L186

@drewbanin drewbanin removed the triage label Feb 11, 2020
@drewbanin drewbanin added this to the Barbara Gittings milestone Feb 11, 2020
@drewbanin
Copy link
Contributor

Thanks for the report @brangisom - I'm prioritizing this one for our 0.16.0 Barbara Gittings release. Is this something you'd be interested in contributing a fix for?

I took a quick look here, and it the issue appears to be that we set the value skip on the RunModelResult object, but we report based on the skipped property, which is indeed always false!

I think the fix is to add a skipped property in the WritableModelResult class that returns the value of self.skip:

https://github.com/fishtown-analytics/dbt/blob/1d329e03645b8446899f71e7bd6bb92c0991a7dd/core/dbt/contracts/results.py#L68-L70

Set via

https://github.com/fishtown-analytics/dbt/blob/1d329e03645b8446899f71e7bd6bb92c0991a7dd/core/dbt/node_runners.py#L307-L317

@drewbanin drewbanin added good_first_issue Straightforward + self-contained changes, good for new contributors! cli labels Feb 11, 2020
@brangisom
Copy link
Contributor Author

Thanks for the report @brangisom - I'm prioritizing this one for our 0.16.0 Barbara Gittings release. Is this something you'd be interested in contributing a fix for?

Yeah, I think I can knock that out this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli good_first_issue Straightforward + self-contained changes, good for new contributors!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants