dbt-labs / dbt-labs/dbt

yml anchors not recognized in fusion preview 166 [BUG]

Open
#14,480 1 comment 0 reactions 1 assignee Claimed by @sadboy View on GitHub
area:engine engine:v2 status:needs-repro status:triage type:bug
Dominant language
Rust
Stars
13.8k
Forks
2.6k
Avg merge
21h 31m
Merged PRs (30d)
56

Description

**Describe the bug**
A clear and concise description of what the bug is.

**What version of dbt Fusion is this bug in? (find out by running `dbt --version`)**
dbt-fusion 2.0.0-preview.166
**Is this a discrepancy between the dbt Fusion Engine and dbt Core? Check one.**
- [x] YES
- [ ] NO

**To Reproduce**
Please submit one of the following
* A minimal YML snippet which reproduces the behavior
* A minimal dbt project which reproduces the behavior
* A description so detailed that the issue can be easily reproduced

dbt fusion unexpectedly stopped compiling correctly on the latest version.

```
dbtf --version
dbt-fusion 2.0.0-preview.166
```
When compiling, the profiles.yml fails to load:

```
dbtf compile
dbt-fusion 2.0.0-preview.166
Loading profiles.yml

================================================================================ Errors and Warnings ================================================================================
error: dbt1005: missing 'type' field in resolved profile output

================================================================================= Execution Summary =================================================================================
Finished 'compile' with 1 error [302ms]
```

**Expected behavior**
A clear and concise description of what you expected to happen.

This works properly in the previous version (164)

```
dbt-fusion 2.0.0-preview.164
Loading profiles.yml
Finished [ 0.13s] resolving packages from packages.yml (1 items)
Finished [ 0.00s] hook [redacted]-on_run_end-0
New version available 2.0.0-preview.166 (run `dbt system update`)

================================================================================ Errors and Warnings ================================================================================
warning: dbt1065: Package 'dbt_utils' requires dbt version [>=1.3.0, <2.0.0], but current version is 2.0.0-preview.164. This package may not be compatible with your dbt version.

================================================================================= Execution Summary =================================================================================
Finished 'compile' with 1 warning for target 'dev' [11.0s]
Processed: 1 hook | 1403 models | 2018 tests | 1 snapshot | 23 seeds | 8 analyses
Summary: 3454 total | 3454 success
```

Seems like yaml anchors not being recognized is the issue. Our profiles.yml has this for dev:

```
account: &account
type: snowflake
account: [redacted]
dev:
<<: *account
# Credentials
user: "{{ env_var('SNOWFLAKE_USERNAME') }}"
role: data_developer
private_key_path: ../dbt_auth.pem

# Runs Config
database: sandbox
schema: DBT_PLACEHOLDER_SCHEMA
threads: 16
warehouse: "{{ env_var('SNOWFLAKE_WAREHOUSE_XS') }}" # Default to xs warehouse
client_session_keep_alive: False

```

New version will compile correctly if type and account are moved into the the dev profile instead of using anchors.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Operating System and CPU Type (please complete the following information):**
* Mac/Windows/Linux?
* X86 or ARM?

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.