Skip to content
Open
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
8 changes: 8 additions & 0 deletions core/dbt/events/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1517,6 +1517,14 @@ def message(self) -> str:
return f"Found duplicate package in packages.yml, removing: {self.removed_package}"


class DepsLockfileRegenerating(WarnLevel):
def code(self):
return "M034"

def message(self) -> str:
return f"Package lockfile is out of sync with packages.yml. Regenerating lockfile at: {self.lock_filepath}"


class DepsScrubbedPackageName(WarnLevel):
def code(self):
return "M035"
Expand Down
2 changes: 2 additions & 0 deletions core/dbt/task/deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
DepsFoundDuplicatePackage,
DepsInstallInfo,
DepsListSubdirectory,
DepsLockfileRegenerating,
DepsLockUpdating,
DepsNoPackagesFound,
DepsNotifyUpdatesAvailable,
Expand Down Expand Up @@ -220,6 +221,7 @@ def run(self) -> None:
current_hash = _create_sha1_hash(self.project.packages.packages)
previous_hash = load_yml_dict(lock_file_path).get(PACKAGE_LOCK_HASH_KEY, None)
if previous_hash != current_hash:
fire_event(DepsLockfileRegenerating(lock_filepath=lock_file_path))
self.lock()

# Early return when 'dbt deps --lock'
Expand Down
Loading