Skip to content

Feat: Bring repo into v2 compliance - #580

Open
mtcarlone wants to merge 5 commits into
mainfrom
feat/v2-compliance
Open

mtcarlone wants to merge 5 commits into
mainfrom
feat/v2-compliance

Conversation

@mtcarlone

Copy link
Copy Markdown
Contributor

dbt Fusion (dbt 2.x) compatibility; raise dbt floor to 1.10

Summary

Makes the package parse and run cleanly on the dbt Fusion engine, and adds
Fusion to CI so it stays that way. To get there, the minimum supported dbt
version moves from 1.3 to 1.10. That is a breaking change, so this should
ship as 3.0.0.

On Fusion 2.0.6, before this PR:

  • integration_test_project didn't parse at all (deprecated config: block in
    profiles.yml is a hard error).
  • 11 generic tests in the package's own YAML triggered "will error post preview"
    deprecations (args at the top level instead of under arguments:).
  • Every dbt compile and dbt show (including VS Code extension previews)
    fired on-run-end and uploaded a phantom model..inline row plus an extra
    invocation.

The upload macros themselves needed no changes. One sampled row per source
table on Fusion has the same shape as on Core (timing, adapter_response,
rows_affected, thread_id, checksums, freshness, exposure owners).

Breaking change

require-dbt-version is now [">=1.10.0", "<3.0.0"].

Fusion requires generic-test arguments under arguments:. dbt Core only reads
that form from 1.10 without the require_generic_test_arguments_property flag,
and a package can't set that flag for its consumers. 1.3–1.8 were already out
of CI (Python 3.12 toolchain, no microbatch), and dbt-snowflake < 1.5 can't use
the inline key-pair auth the tests now require.

Consumers on dbt < 1.10 should pin dbt_artifacts to 2.11.1. The README says
so.

Changes, by commit

  1. test: drop deprecated config block from integration profiles.yml
    Moves send_anonymous_usage_stats / use_colors to tox setenv.
    Test harness only.
  2. fix: skip upload_results for compile and show
    Returns early when invocation_args_dict.which is compile or show.
    No-op on Core, where the hook never fires for those commands.
  3. feat!: require dbt >= 1.10 and nest generic test args under arguments
    • require-dbt-version floor → 1.10
    • 11 is_between / accepted_values tests nest their args under arguments:
    • tox envs and release-matrix pins below 1.10 removed; SQL Server pin
      1_9_0 → 1_10_0; disabled Spark env → dbt-spark 1.10
    • publish_docs_on_release.yml: dbt-snowflake 1.9 → 1.11 (1.9 would fail
      the new version check at release time)
    • pyproject.toml: adapter floors raised, dbt-core>=1.10,<2 added; the
      host venv was resolving dbt-core 1.8.9
  4. ci: run the dbt Fusion engine in Docker and test the package on it
    • scripts/fusion/: pinned Docker image (FUSION_VERSION=2.0.6), no host
      install. check.sh (parse, --warn-error, no secrets), test.sh snowflake
      (two-pass build, same as tox), dbtf.sh (ad-hoc commands). Writes to a
      separate ..._fusion_... schema.
    • New jobs: fusion-parse in Tiers 1, 2 and 3; integration-snowflake-fusion
      in Tiers 2 and 3. Each tier stays a superset of the one below.
    • README: Fusion support section. scripts/ci/README.md: Fusion scripts.

Fusion adapter coverage

Adapter Fusion 2.0.6 This PR
Snowflake Supported Integration-tested in CI
BigQuery, Databricks Supported Parse-verified only
Postgres, Trino Experimental Core only
SQL Server, Spark Not supported Core only

Testing

All runs on the final tree.

Engine Warehouse Result
Fusion 2.0.6 Snowflake 58/58, then 129/129; parse --warn-error clean
dbt Core 1.10.23 Snowflake PASS=58, then PASS=129, 0 errors
dbt Core 1.12.0 Snowflake PASS=58, then PASS=129, 0 errors
dbt Core 1.12.5 Postgres PASS=49, 0 errors

Also checked:

  • With the flag unset, dbt Core 1.10, 1.11 and 1.12 compile the arguments:
    tests with the real bounds and values (e.g. success_rate < 0 or success_rate > 1),
    so they aren't passing vacuously.
  • check.sh fails when one test is put back in the old top-level form.
  • After the hook fix, Fusion compile and show upload nothing, and run
    still uploads.

Trino and SQL Server weren't run locally on this branch; Tier 1 covers them.

Reviewer notes

  • CODEOWNERS review is required: .github/, scripts/, tox.ini,
    pyproject.toml, uv.lock, dbt_project.yml.
  • uv.lock is large (about +1,200 lines) because raising the adapter floors
    pulls dbt-core 1.12 and its dependency tree into the host venv.
  • Only fusion (parse) runs on this PR. The Fusion Snowflake build runs after
    merge (Tier 2) and on release candidates (Tier 3).
  • No version bump here. That happens on the release-candidate/3.0.0 branch.

Follow-ups (not in this PR)

  • Databricks on Fusion: the build fails with database is required for databricks relation. Fusion needs catalog: in the test profile. Databricks
    CI is stubbed, so this waits for its reactivation.
  • BigQuery on Fusion: add a build job. It needs the WIF auth step plus ADC
    credentials mounted into the container.
  • Explicit pins: Trino and SQL Server only pin 1_10_0. Newer minors are
    covered by the unpinned "latest" envs.
  • Hub badge: confirm the "Fusion compatible" badge on hub.getdbt.com after
    3.0.0 is tagged.
  • Known Fusion quirks (no action needed): Fusion reports
    dbt_version = 2.0.0 in invocations while the binary is 2.0.6, and its
    invocation_args keys differ from Core's. Both are stored as-is.

The top-level `config:` block in profiles.yml has been deprecated since
dbt 1.8, and the dbt Fusion engine rejects it outright ("Unexpected
'config' key in profiles.yml"), so nothing in integration_test_project
could even parse on Fusion.

Its two settings move to tox `setenv` as DBT_SEND_ANONYMOUS_USAGE_STATS
and DBT_USE_COLORS, which every dbt version reads.

Test-harness only: no change to the package.
dbt Core only fires on-run-end for commands that execute nodes. The dbt
Fusion engine also fires it for `dbt compile` and `dbt show`, including
the previews the dbt VS Code extension runs. On Fusion every one of those
uploaded a phantom `model..inline` row (empty package_name, materialization
'inline') plus an extra invocation, and spent ~6s on inserts.

upload_results now returns early when invocation_args_dict.which is
'compile' or 'show', so both engines record the same invocations. No-op on
Core, where the hook never runs for those commands.
The dbt Fusion engine deprecates generic-test arguments at the top level
of a test definition ("will error post preview"); they must sit under
`arguments:`. dbt Core only reads that form from 1.10 without the
root-project `require_generic_test_arguments_property` flag, which a
package cannot set for its consumers. Verified on 1.10, 1.11 and 1.12 with
the flag unset: compiled tests carry the real bounds and values.

So the support floor moves from 1.3 to 1.10:

- require-dbt-version: [">=1.10.0", "<3.0.0"]
- the 11 `is_between` / `accepted_values` tests in models/*.yml nest
  their args under `arguments:`
- tox envs and release-matrix pins below 1.10 removed; SQL Server pin
  moves 1_9_0 -> 1_10_0 (dbt-sqlserver now has 1.10-1.12 releases);
  disabled Spark env moves to dbt-spark 1.10
- docs publishing installs dbt-snowflake 1.11 instead of 1.9, which
  would now fail the version check
- pyproject.toml raises adapter floors and pins dbt-core >=1.10,<2 so
  the host venv no longer resolves dbt-core 1.8.9

1.3-1.8 were already unverifiable in CI (Python 3.12 toolchain, no
microbatch), and dbt-snowflake < 1.5 can't use the inline key-pair auth
the tests now require.

BREAKING CHANGE: dbt < 1.10 is no longer supported. Consumers on older
dbt should pin dbt_artifacts 2.11.1. Release as 3.0.0.
Fusion is a standalone binary, not a PyPI package, so it can't go
through uv/tox. scripts/fusion/ runs it in a pinned Docker image
(FUSION_VERSION=2.0.6) against integration_test_project, writing to a
separate `..._fusion_...` schema so it never collides with Core runs:

- check.sh: Fusion parse with --warn-error. Fusion's parse never
  connects to the warehouse, so it runs on dummy credentials and is safe
  for the no-secrets PR tier. Fails if a deprecated form is reintroduced.
- test.sh <warehouse>: the same two-pass build as the tox envs.
  Snowflake only; Postgres/Trino are experimental in Fusion and SQL
  Server/Spark are unsupported.
- dbtf.sh: run any Fusion command; sources the repo-root .env and
  forwards variables by name so the multi-line private key survives.

CI: `fusion-parse` in all three tiers, `integration-snowflake-fusion`
in Tier 2 and 3, keeping each tier a superset of the one below. The
tox.ini Fusion placeholder now points at scripts/fusion/.

README documents Fusion support: Snowflake integration-tested, BigQuery
and Databricks parse-only, and the compile/show hook difference that
upload_results now handles.

Verified locally: Fusion 2.0.6 on Snowflake 58/58 then 129/129.
With the dbt floor at 1.10, the unpinned integration_sqlserver env now
resolves dbt-sqlserver 1.12, which made pyodbc an optional extra. The
test profile uses the ODBC driver (pyodbc backend), so the Tier 1 job
failed before running anything:

  The legacy `pyodbc` backend was requested, but the optional
  dependency `pyodbc` is not installed.

Install dbt-sqlserver[pyodbc] in the tox env and in pyproject.toml (the
host venv also resolves 1.12). The pinned 1_10_0 env is unchanged; 1.10
still ships pyodbc as a hard dependency.
@mtcarlone mtcarlone added this to the 3.0.0 milestone Oct 7, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant