Skip to content

Commit

Permalink
updated DepsStartPackageInstall event to use package name (#4482)
Browse files Browse the repository at this point in the history
* updated event to user package name

* add changelog
  • Loading branch information
emmyoop authored Dec 14, 2021
1 parent 76f7bf9 commit 51f2daf
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
6 changes: 3 additions & 3 deletions core/dbt/events/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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='')
Expand Down
2 changes: 1 addition & 1 deletion core/dbt/task/deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down
2 changes: 1 addition & 1 deletion test/unit/test_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -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=''),
Expand Down

0 comments on commit 51f2daf

Please sign in to comment.