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

fix --no-compile flag for docs generate #2093

Merged
merged 2 commits into from
Feb 6, 2020

Conversation

beckjake
Copy link
Contributor

@beckjake beckjake commented Feb 4, 2020

Fixes #2090

I also added a test that --no-compile runs successfully and generates a catalog, to avoid regressing on this again.

@cla-bot cla-bot bot added the cla:yes label Feb 4, 2020
@beckjake beckjake force-pushed the fix/generate-no-compile branch 2 times, most recently from 137e42d to 483b874 Compare February 4, 2020 19:26
Copy link
Contributor

@drewbanin drewbanin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! One super minor request, then approved:

In:

https:/fishtown-analytics/dbt/blob/b691a73dba6bd5fe44174917cb62b2ad76ec4679/core/dbt/task/generate.py#L246-L251

It looks like results can be None if docs generation fails, resulting in an unhandled error:

(env) 21:51:18 ~/fishtown/clients/debug $ dbt docs generate
Running with dbt=0.15.2-a1
Found 1 model, 1 test, 1 snapshot, 2 analyses, 129 macros, 0 operations, 1 seed file, 0 sources

21:53:38 | Concurrency: 8 threads (target='dev')
21:53:38 |
21:53:38 | Done.
21:53:38 | Building catalog
ERROR: Database Error
  could not connect to server: Connection refused
        Is the server running on host "localhost" (::1) and accepting
        TCP/IP connections on port 5433?
  could not connect to server: Connection refused
        Is the server running on host "localhost" (127.0.0.1) and accepting
        TCP/IP connections on port 5433?

Encountered an error:
'NoneType' object has no attribute '_compile_results'

Can we adjust this logic to handle the case where results is None?

Copy link
Contributor

@drewbanin drewbanin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ship it!

@beckjake beckjake merged commit 140cfd7 into dev/barbara-gittings Feb 6, 2020
@beckjake beckjake deleted the fix/generate-no-compile branch February 6, 2020 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression: The --no-compile flag to dbt docs generate is no longer supported
2 participants