dbt-labs / dbt-labs/dbt

[BUG] Fusion and dbt-core don't generate the same `sha1_hash` in `package-lock.yaml`

Open
#13,915 4 comments 1 reaction 1 assignee Claimed by @chayac View on GitHub
area:engine engine:v2 proj:conformance status:has-repro type:bug
Dominant language
Rust
Stars
13.8k
Forks
2.6k
Avg merge
21h 31m
Merged PRs (30d)
56

Description

**Describe the bug**
Reported on Slack: https://getdbt.slack.com/archives/C088YCAB6GH/p1760709923694599

With the same packages.yml, the resulting lock file has a different hash in Fusion and dbt Core

dbt-core
```
dbt clean
dbt deps
packages:
- name: dbt_utils
package: dbt-labs/dbt_utils
version: 1.3.0
sha1_hash: 226ae69cdfbc9367e2aa2c472b01f99dbce11de0
```

dbt-fusion
```
dbtf clean
dbtf deps
packages:
- package: dbt-labs/dbt_utils
name: dbt_utils
version: 1.3.0
sha1_hash: 8067dd74fb58d3d05a437ab1975d5eeeaf3d8bea
```

Looking at [the Fusion implenentation](https://github.com/dbt-labs/dbt-fusion/blob/de3c769f7e587e47ed178f8727ed6b4b5991d10d/crates/dbt-deps/src/utils.rs#L26-L36) and [the dbt Core implementation](https://github.com/dbt-labs/dbt-core/blob/d5071fa13502be273596a0b7c8b13d14b6c68655/core/dbt/task/deps.py#L42-L56), one difference at least is that Fusion is not ordering packages keys before generating the SHA.

Feel free to close this issue if we won't fix this, but it might be good to at least have a way to track the conversation

**What version of dbt Fusion is this bug in? (find out by running `dbt --version`)**

**Is this a discrepancy between the dbt Fusion Engine and dbt Core? Check one.**
- [x] YES
- [ ] NO

**To Reproduce**
- Create a project with some package (e.g. `dbt_utills`)
- Generate the lock file with core with `dbt deps`, check the `sha1_hash` value
- Delete the lockfile and generate a new lock file with Fusion with `dbtf deps`

The SHA values are different

**Expected behavior**
The values should be the same or, if it doesn't really matter, we should mention why this is the case

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.