Repository: dbt-labs/dbt-core

Issue:
Regression: The --no-compile flag to `dbt docs generate` is no longer supported
### Describe the bug
I ran `dbt docs generate --no-compile` and received an error that the manifest was not present:
```
2020-02-04 02:04:58,798143 (MainThread): Traceback (most recent call last):
  File "/Users/drew/fishtown/dbt/core/dbt/main.py", line 81, in main
    results, succeeded = handle_and_check(args)
  File "/Users/drew/fishtown/dbt/core/dbt/main.py", line 159, in handle_and_check
    task, res = run_from_args(parsed)
  File "/Users/drew/fishtown/dbt/core/dbt/main.py", line 212, in run_from_args
    results = task.run()
  File "/Users/drew/fishtown/dbt/core/dbt/task/generate.py", line 208, in run
    'self.manifest was None in run!'
dbt.exceptions.InternalException: self.manifest was None in run!
```

I observed this behavior when running dbt on Snowflake, but unsure if that's pertinent.

### Expected behavior
The `--no-compile` flag should prevent dbt from compiling the project while still producing a catalog. If this is no longer possible, we should remove the flag.

**The output of `dbt --version`:**
I observed this with dbt v0.15.2 and `dev/barbara-gittings`


Discussion:

Resolving patch:
diff --git a/core/dbt/task/generate.py b/core/dbt/task/generate.py
--- a/core/dbt/task/generate.py
+++ b/core/dbt/task/generate.py
@@ -15,6 +15,7 @@
 from dbt.exceptions import InternalException
 from dbt.include.global_project import DOCS_INDEX_FILE_PATH
 from dbt.logger import GLOBAL_LOGGER as logger
+from dbt.perf_utils import get_full_manifest
 import dbt.ui.printer
 import dbt.utils
 import dbt.compilation
@@ -187,7 +188,7 @@ def _get_manifest(self) -> Manifest:
             )
         return self.manifest
 
-    def run(self):
+    def run(self) -> CatalogResults:
         compile_results = None
         if self.args.compile:
             compile_results = CompileTask.run(self)
@@ -196,8 +197,13 @@ def run(self):
                     'compile failed, cannot generate docs'
                 )
                 return CatalogResults(
-                    {}, datetime.utcnow(), compile_results, None
+                    nodes={},
+                    generated_at=datetime.utcnow(),
+                    errors=None,
+                    _compile_results=compile_results
                 )
+        else:
+            self.manifest = get_full_manifest(self.config)
 
         shutil.copyfile(
             DOCS_INDEX_FILE_PATH,
@@ -233,7 +239,8 @@ def run(self):
 
         path = os.path.join(self.config.target_path, CATALOG_FILENAME)
         results.write(path)
-        write_manifest(self.config, self.manifest)
+        if self.args.compile:
+            write_manifest(self.config, self.manifest)
 
         if exceptions:
             logger.error(
@@ -261,7 +268,9 @@ def get_catalog_results(
             errors=errors,
         )
 
-    def interpret_results(self, results):
+    def interpret_results(self, results: Optional[CatalogResults]) -> bool:
+        if results is None:
+            return False
         if results.errors:
             return False
         compile_results = results._compile_results


Test patch:
diff --git a/test/integration/029_docs_generate_tests/test_docs_generate.py b/test/integration/029_docs_generate_tests/test_docs_generate.py
--- a/test/integration/029_docs_generate_tests/test_docs_generate.py
+++ b/test/integration/029_docs_generate_tests/test_docs_generate.py
@@ -126,7 +126,7 @@ def project_config(self):
             }
         }
 
-    def run_and_generate(self, extra=None, seed_count=1, model_count=1, alternate_db=None):
+    def run_and_generate(self, extra=None, seed_count=1, model_count=1, alternate_db=None, args=None):
         if alternate_db is None:
             alternate_db = self.alternative_database
         project = {
@@ -150,7 +150,10 @@ def run_and_generate(self, extra=None, seed_count=1, model_count=1, alternate_db
         os.remove(normalize('target/manifest.json'))
         os.remove(normalize('target/run_results.json'))
         self.generate_start_time = datetime.utcnow()
-        self.run_dbt(['docs', 'generate', vars_arg])
+        base_args = ['docs', 'generate', vars_arg]
+        if args:
+            base_args.extend(args)
+        self.run_dbt(base_args)
 
     def _no_stats(self):
         return {
@@ -3393,6 +3396,12 @@ def verify_run_results(self, expected_run_results):
         run_result['results'].sort(key=lambda r: r['node']['unique_id'])
         self.assertEqual(run_result['results'], expected_run_results)
 
+    @use_profile('postgres')
+    def test__postgres__run_and_generate_no_compile(self):
+        self.run_and_generate(alternate_db=self.default_database, args=['--no-compile'])
+        self.verify_catalog(self.expected_postgres_catalog())
+        self.assertFalse(os.path.exists('./target/manifest.json'))
+
     @use_profile('postgres')
     def test__postgres__run_and_generate(self):
         self.run_and_generate(alternate_db=self.default_database)