Repository: dbt-labs/dbt-core

Issue:
[CORE-17] [Bug] dbt deps doesn't show which packages are installing in the logs
### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

When I run `dbt deps` using version 1.0.0, I don't see which packages are installing corresponding to their version.

![image](https://user-images.githubusercontent.com/19176976/145304010-2172fe9a-e604-446d-9595-5a7ed8212c6d.png)


### Expected Behavior

I should see something like the below.

![image](https://user-images.githubusercontent.com/19176976/145304067-04780e7e-de4b-4269-b7e8-2521e01d0a51.png)


### Steps To Reproduce

1. Setup a dbt project in cloud or local pc using `v1.0.0`
2. Run `dbt deps`
3. View output without packages corresponding to versions

### Relevant log output

```shell
See screenshots above
```


### Environment

```markdown
- OS: ???
- Python: ???
- dbt: 1.0.0(latest)

dbt Cloud in use
```


### What database are you using dbt with?

snowflake

### Additional Context

_No response_


Discussion:
This was caused by the new structured logging implementation missing the package name in the terminal output: [here](https://github.com/dbt-labs/dbt-core/blob/main/core/dbt/task/deps.py#L66)


It should be a simple fix at line 66: `fire_event(DepsStartPackageInstall(package=package))`

```python
for package in final_deps:
    package_name = package.name
    source_type = package.source_type()
    version = package.get_version()
    fire_event(DepsStartPackageInstall(package=package))
    package.install(self.config, renderer)
    fire_event(DepsInstallInfo(version_name=package.nice_version_name()))
    if source_type == 'hub':
        version_latest = package.get_version_latest()
```
![image](https://user-images.githubusercontent.com/19176976/145309697-587da7c3-e23f-4cbe-9b42-e78b628dd4f5.png)

@sungchun12 Nice catch! Thanks for raising.

@nathaniel-may Let's definitely add this as a high-priority TODO in our cleanup. I'd like to include this in a v1.0.1 release.

Resolving patch:
diff --git a/core/dbt/events/types.py b/core/dbt/events/types.py
--- a/core/dbt/events/types.py
+++ b/core/dbt/events/types.py
@@ -1414,11 +1414,11 @@ def message(self) -> str:
 
 @dataclass
 class DepsStartPackageInstall(InfoLevel, Cli, File):
-    package: str
+    package_name: str
     code: str = "M014"
 
     def message(self) -> str:
-        return f"Installing {self.package}"
+        return f"Installing {self.package_name}"
 
 
 @dataclass
@@ -2589,7 +2589,7 @@ def message(self) -> str:
     FinishedCleanPaths()
     OpenCommand(open_cmd='', profiles_dir='')
     DepsNoPackagesFound()
-    DepsStartPackageInstall(package='')
+    DepsStartPackageInstall(package_name='')
     DepsInstallInfo(version_name='')
     DepsUpdateAvailable(version_latest='')
     DepsListSubdirectory(subdirectory='')
diff --git a/core/dbt/task/deps.py b/core/dbt/task/deps.py
--- a/core/dbt/task/deps.py
+++ b/core/dbt/task/deps.py
@@ -63,7 +63,7 @@ def run(self):
                 source_type = package.source_type()
                 version = package.get_version()
 
-                fire_event(DepsStartPackageInstall(package=package.nice_version_name()))
+                fire_event(DepsStartPackageInstall(package_name=package_name))
                 package.install(self.config, renderer)
                 fire_event(DepsInstallInfo(version_name=package.nice_version_name()))
                 if source_type == 'hub':


Test patch:
diff --git a/test/unit/test_events.py b/test/unit/test_events.py
--- a/test/unit/test_events.py
+++ b/test/unit/test_events.py
@@ -294,7 +294,7 @@ def MockNode():
     FinishedCleanPaths(),
     OpenCommand(open_cmd='', profiles_dir=''),
     DepsNoPackagesFound(),
-    DepsStartPackageInstall(package=''),
+    DepsStartPackageInstall(package_name=''),
     DepsInstallInfo(version_name=''),
     DepsUpdateAvailable(version_latest=''),
     DepsListSubdirectory(subdirectory=''),