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

updated DepsStartPackageInstall event to use package name #4482

Merged
merged 2 commits into from
Dec 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}"
emmyoop marked this conversation as resolved.
Show resolved Hide resolved


@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