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-500] Investigate differences in manifest.json output for 'compile' and 'run' commands #5079

Closed
gshank opened this issue Apr 15, 2022 · 5 comments
Labels
artifacts stale Issues that have gone stale state Stateful selection (state:modified, defer)

Comments

@gshank
Copy link
Contributor

gshank commented Apr 15, 2022

When rewriting the docs generate tests I saw some surprising differences between the manifest.json output between the 'compile' (also docs generate) and 'run' commands.

In the manifest.json after a run command the models didn't have any of the compiled attributes (like "compiled", "compiled_sql", "extra_ctes", "extra_cetes_injected", and "compiled_path". I found that a bit surprising because a run command does compile the models.

I was also surprised that the lists of depends_on.macros are different. For example, the "model" model had no macros listed for "compile" or "docs generate" commands, but had ['macro.dbt.run_hooks', 'macro.dbt.drop_relation_if_exists', 'macro.dbt.statement', 'macro.dbt.persist_docs'] listed for "run". I assume that this is because "run" captures all macros used anywhere when it actually really jinja renders it. But I'm wondering if there are any implications for creating dags with macros or selecting using macros.

Determine the reasons for these differences in output, and make the output more consistent if it makes sense.

@github-actions github-actions bot changed the title Investigate differences in manifest.json output for 'compile' and 'run' commands [CT-500] Investigate differences in manifest.json output for 'compile' and 'run' commands Apr 15, 2022
@jtcohen6 jtcohen6 added artifacts state Stateful selection (state:modified, defer) labels Apr 18, 2022
@rodik
Copy link

rodik commented May 9, 2022

I can confirm this behavior is causing docs issues in our solution. The manifest.json file generated during deployment has "compiled_sql" attributes only for tests, not for models. Our deployment runs commands in this order:

dbt run
dbt test
dbt docs generate --no-compile

I guess removing the flag from docs generate will solve the issue.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2022

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 remove the stale label or comment on the issue, or it will be closed in 7 days.

@github-actions github-actions bot added the stale Issues that have gone stale label Nov 6, 2022
@github-actions
Copy link
Contributor

Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest; add a comment to notify the maintainers.

@nguyenann13
Copy link

We are also running into this same issue.

@jtcohen6
Copy link
Contributor

jtcohen6 commented Jun 1, 2023

@nguyenann13 What's the actual issue you're running into? Inconsistent information in the docs, or with state:modified, or something else?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
artifacts stale Issues that have gone stale state Stateful selection (state:modified, defer)
Projects
None yet
Development

No branches or pull requests

4 participants