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

Fix package-lock file's bad indentation #9341

Merged
merged 3 commits into from
Mar 18, 2024
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
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20240106-003649.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: fix lock-file bad indentation
time: 2024-01-06T00:36:49.547533+09:00
custom:
Author: jx2lee
Issue: "9319"
2 changes: 1 addition & 1 deletion core/dbt/task/deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
)

with open(lock_filepath, "w") as lock_obj:
yaml.safe_dump(packages_installed, lock_obj)
yaml.dump(packages_installed, lock_obj, Dumper=dbtPackageDumper)

Check warning on line 204 in core/dbt/task/deps.py

View check run for this annotation

Codecov / codecov/patch

core/dbt/task/deps.py#L204

Added line #L204 was not covered by tests

fire_event(DepsLockUpdating(lock_filepath=lock_filepath))

Expand Down
16 changes: 8 additions & 8 deletions tests/functional/dependencies/test_dependency_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ def test_deps_lock(self, clean_start):
assert (
contents
== """packages:
- package: fivetran/fivetran_utils
version: 0.4.7
- package: dbt-labs/dbt_utils
version: 1.1.1
- package: fivetran/fivetran_utils
version: 0.4.7
- package: dbt-labs/dbt_utils
version: 1.1.1
sha1_hash: 71304bca2138cf8004070b3573a1e17183c0c1a8
"""
)
Expand All @@ -52,10 +52,10 @@ def test_deps_default(self, clean_start):
assert (
contents
== """packages:
- package: fivetran/fivetran_utils
version: 0.4.7
- package: dbt-labs/dbt_utils
version: 1.1.1
- package: fivetran/fivetran_utils
version: 0.4.7
- package: dbt-labs/dbt_utils
version: 1.1.1
sha1_hash: 71304bca2138cf8004070b3573a1e17183c0c1a8
"""
)
Expand Down
12 changes: 6 additions & 6 deletions tests/functional/dependencies/test_simple_dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,12 @@ def test_git_with_multiple_subdir(self, project):
run_dbt(["deps"])
assert os.path.exists("package-lock.yml")
expected = """packages:
- git: https://github.com/dbt-labs/dbt-multipe-packages.git
revision: 53782f3ede8fdf307ee1d8e418aa65733a4b72fa
subdirectory: dbt-utils-main
- git: https://github.com/dbt-labs/dbt-multipe-packages.git
revision: 53782f3ede8fdf307ee1d8e418aa65733a4b72fa
subdirectory: dbt-date-main
- git: https://github.com/dbt-labs/dbt-multipe-packages.git
revision: 53782f3ede8fdf307ee1d8e418aa65733a4b72fa
subdirectory: dbt-utils-main
- git: https://github.com/dbt-labs/dbt-multipe-packages.git
revision: 53782f3ede8fdf307ee1d8e418aa65733a4b72fa
subdirectory: dbt-date-main
sha1_hash: b9c8042f29446c55a33f9f211737f445a640c7a1
"""
with open("package-lock.yml") as fp:
Expand Down
Loading