From 12bf97c28a6b9e1b8009a65850acccf04a87a374 Mon Sep 17 00:00:00 2001 From: Emily Rockman Date: Tue, 14 Dec 2021 06:54:21 -0600 Subject: [PATCH 1/2] updated event to user package name --- core/dbt/events/types.py | 6 +++--- core/dbt/task/deps.py | 2 +- test/unit/test_events.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/dbt/events/types.py b/core/dbt/events/types.py index 6765b807ff8..ab05e1c8e5e 100644 --- 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 index 8cbab91e398..c5e6a4fe02c 100644 --- 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': diff --git a/test/unit/test_events.py b/test/unit/test_events.py index 57b04711fbf..58af8079e91 100644 --- 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=''), From c3c83a90f214a2e0cad03bf6487ef89f794b6b50 Mon Sep 17 00:00:00 2001 From: Emily Rockman Date: Tue, 14 Dec 2021 06:57:29 -0600 Subject: [PATCH 2/2] add changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eaec334336f..84a0e66e206 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,8 @@ ### Fixes - Fix wrong url in the dbt docs overview homepage ([#4442](https://github.com/dbt-labs/dbt-core/pull/4442)) -- Fix redefined status param of SQLQueryStatus to typecheck the string which passes on `._message` value of `AdapterResponse` or the `str` value sent by adapter plugin. ([#4463](https://github.com/dbt-labs/dbt-core/pull/4463#issuecomment-990174166)) +- Fix redefined status param of SQLQueryStatus to typecheck the string which passes on `._message` value of `AdapterResponse` or the `str` value sent by adapter plugin. ([#4463](https://github.com/dbt-labs/dbt-core/pull/4463#issuecomment-990174166)) +- Fix `DepsStartPackageInstall` event to use package name instead of version number. ([#4482](https://github.com/dbt-labs/dbt-core/pull/4482)) Contributors: - [remoyson](https://github.com/remoyson) ([#4442](https://github.com/dbt-labs/dbt-core/pull/4442))