Repository navigation
feat(plan): bind dbt projects and refuse what apply would refuse - #1188
Merged
Merged
Conversation
After a Databricks dbt job run that succeeded, or whose dbt task passed before a later task failed, fluid apply dropped the error from reading the dbt task's output and reported the contract rules from empty logs: "dbt stopped before running them". It now says the output could not be read, with the error, and that the run page lists each rule, as the failed-task path already did. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
The per-rule report read any "N of M <STATUS> <word>" line as a test, so "ERROR creating sql table model main.orders" or "SKIP relation main.downstream" gave a status to a test named "creating" or "main". A result now counts only when the name is followed by dbt's padding (dots or the bracketed status), as dbt prints it for a test; a model, seed, snapshot, skipped relation or source freshness line carries more words and is not read. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
…rules A local dbt project that was too big, or held a file the upload could not take, was told to use a Git source even when the build runs contract rules as dbt tests, which a Git checkout cannot take: the advice led to the next refusal. With rules, the fix now says to upload fewer files, or to use a Git source and remove the rules from the tables the build writes; a build without rules keeps the Git source. A project that fits the upload only without its rules' tests is told so, and a project over the limit alone is refused once instead of twice. A selection that leaves out the model whose rules run as tests was told to set properties.select or properties.model, which left the schema's required properties.model unset. The fix now says to add the model to properties.select or drop it, and to set properties.model first when it is missing. Each fix, applied alone, clears its refusal. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
planned_objects said that fluid diff and --provider databricks see what fluid apply creates. fluid plan on a 0.7 contract lists the contract's provider actions and never reads it; fluid diff does, through DatabricksProvider.plan. The docstring now names only fluid diff. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
A table a dbt build writes on Databricks is rebuilt by dbt's table materialization from the model's SELECT, which carries no NOT NULL, and the module leaves its columns to dbt. A required column of such a table failed verify's constraints check with no reason and no fix. The finding now says why, names the dbt model (properties.model of a build that writes only this table, else the table's name, as the job's tests find it), and prints the model properties that keep the constraint: an enforced dbt contract listing every column with its data type, not_null on the required ones. The JSON report carries them as dimensions.constraints.hint and dbt_model_yaml, and the hint is the first action. The grade is unchanged; a table only fluid apply creates gets no hint. The text report prints each action as plain text, since an action can now quote a model name from the contract. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
…act file A plan made from a bundle bound the dbt code the bundle packs, but a plan made straight from a contract file bound nothing: a model edited between fluid plan and fluid apply plan.json ran unreviewed. fluid plan of a contract file now records the files dbt reads in each dbt build's project (dbtProjects, under planDigest), read as fluid bundle reads them. A project it cannot bind (none where the build runs it, a templated repository, a link, over the limits) is recorded as unbound with a warning and the plan is still written. A dbt build that runs as a Databricks job from a local repository is the exception: its project is read as the upload reads it, so a missing project, a link, an unreadable file or a project over the upload's limits fails the plan, as apply would there. fluid apply plan.json checks the checkout against the record before anything runs and refuses a changed, added or removed file, a missing project, an unbound one, and a plan with dbt builds made before plans bound them (apply_plan_digest_dbt_project_changed, _missing and _unbound), naming paths only. The dbt runner re-checks the directory just before dbt starts, and the Databricks job upload re-checks the bytes it reads (databricks-job-project-changed), for a bundle too. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
fluid plan of a contract whose platform applies through OpenTofu now builds
the module in memory with apply's own emit, offline, before it writes
plan.json. A refusal fails the plan (exit 1, unsupported_binding, with the
kind and fix apply gives) and no plan.json is written. A refusal that
depends on the environment apply runs in (an unset Databricks warehouse, an
operator allowlist, an unresolved {{ env.X }} value) is a warning that
names what apply needs. A Spark setting or broker no operator list can
allow, and a plan the provider's own validator rejects, fail the plan as
they fail apply. Any other error in the check is a warning and the plan
goes on. Streaming plans and --tofu skip the check.
A provider plugin may offer emit_refusals, which reports its refusals
without building the module. Databricks does, so the check reads no keys
and runs no statements, and an unset warehouse does not hide its Genie
space refusals. The check reads credentials from the environment only (no
keyring, no secret store), reads no GCP Application Default Credentials,
calls no AWS STS and keeps the native provider's log lines out of plan's
output.
Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
The workspace upload read every selected file (up to 64 MiB each) and only then compared it with its own 2 MiB limit, and kept reading after the project had passed the file and byte caps. It now takes each file's size without following links, refuses a file over the limit without opening it, and stops at the first file that would pass the file or byte cap with one project-size refusal and no partial project. A file that cannot be examined gets the same project-unreadable refusal a read error gets. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
…king it When the alert did not exist, fluid test created the folder first and read its permissions after, so a folder that a group of every workspace user can edit (inherited from a parent) was left behind when the run was refused. It now finds the nearest folder that exists and, when that folder's permissions plainly let every workspace user edit it, refuses before making the folder. The refusal names the folder asked for and the parent whose permissions it would inherit. A parent whose permissions this identity cannot read does not stop the run: an identity that may create a folder need not manage its parent, and the check after the folder is made reads the new folder's own permissions before any alert is created. An existing folder is checked as before. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
The unsafe results-alert folder guidance also said to take edit rights away from the users groups. For /Workspace/Shared, which is refused by its path, that cannot work. The permission-based refusal already carries that advice in its own fix text, so the shared guidance now only points at a folder the CI identity alone can edit. The generated error reference follows. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
…the semicolon A refused credential's text ends with a period, so the row read "...URL.; DATABRICKS_WAREHOUSE_ID ...". Each part now loses a trailing period before the parts are joined with a semicolon. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
… the job rule first Messages about a dbt_project.yml path entry, an output directory or a build's repository printed the value with str(), which echoes a large nested list or mapping. A value that is not text is now named by its type (a list, a mapping, an integer). binds_dbt_project read a build's pattern and properties types before asking whether it is a Databricks job build. A job build with a local repository is now decided by the job rule first, whatever those types are. Valid contracts behave as before. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
…r an operator profile When a project dotenv file's DATABRICKS_HOST is ignored because the environment sets DATABRICKS_CONFIG_PROFILE, the warning only said to export the endpoint. It now also says the profile can be unset for this run so the project file's own host and credential are used, and names every other Databricks credential the environment holds, since unsetting the profile alone leaves those. Other refusals read as before. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
…failure The preflight failure line repeated any server error_code shaped like a word, which let a lower-case token-shaped value through. A refusal kind now keeps a lower-case dash-joined shape, and an API error code must be upper-case words joined by underscores (PERMISSION_DENIED); anything else names the exception class alone. fluid diff prints the same text when it cannot read a Databricks table, so it follows. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
…usals fluid plan reports the first refusal the AWS emitter raises, and warns instead of failing when only an operator's variable clears it. The emitter raised the unset FLUID_SPARK_GLUE_JARS_URL refusal while it built the Spark blocks, before it read the exposes or a later build, so a contract that also had a refusal of its own got a warning at plan and that refusal only at apply. The Spark blocks now keep the refusal and emit raises it last (emit_data too), after every refusal the contract decides. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
📄 Documentation ReminderThis PR appears to be missing a documentation reference. Our docs live in a separate repo. Please update the PR description with one of:
See the Contributing Guide for details. |
…oject path On Python 3.13 and later the loop is met while the repository path is looked up, so the recorded reason reads "repository './loop' is not a usable path (OSError)" where earlier versions record that the project could not be read. The plan is still written and the build unbound either way, so the test accepts both reasons. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
fas89
enabled auto-merge (squash)
December 4, 2026 11:24
fas89
disabled auto-merge
December 4, 2026 11:26
The module already imports re at its top, so the import inside _check_apply_emitter repeated it. The function now uses the module's name, as the rest of the file does. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
CHANGELOG.md merged without a conflict: the entry main adds for the profile history release follows this branch's entries in the Changed section, and neither side's text changed. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Five Databricks and dbt changes, one commit or two each, in this order: the dbt job's per-rule report, the dbt job refusals' fixes, a
fluid verifyhint for dbt-built tables,fluid planbinding each dbt build's project, andfluid planrefusing what apply's OpenTofu emitter refuses. A sixth section lists a set of small CLI fixes around Databricks. Each was built and checked on its own first; this PR carries them together on current main. It includes the change from #1169 (closed), unchanged.1. The dbt job's per-rule report says what it knows (fix)
After
fluid apply --mode amend-and-buildruns a Databricks dbt job, forge reports each contract rule from the dbt task's output. Two things in that report were wrong:runs/get-output) failed after a run that succeeded, or after the dbt task passed and a later task failed, the error was dropped and the rules were reported from empty logs as "dbt stopped before running them". The report now says the output could not be read, with the (scrubbed, bounded) error, and that the run page lists each rule, as the failed-task path already did. A build with no contract rules prints nothing new.N of M <STATUS> <word>line as a test result, soERROR creating sql table model main.ordersorSKIP relation main.downstreamgave a status to a test namedcreatingormain. A result now counts only when the test name is followed by dbt's padding (dots, or the bracketed status), as dbt prints a test line.Known limit: names with dots, hyphens or
::(singular tests, unit test versions) were never read and still are not; contract rule tests are namedfluid_dq_<id>, so the rules are unaffected.2. Two dbt job refusals name a fix that works (fix)
*-pathsentry outside the project), was told to use a Git source even when the build runs contract rules as dbt tests, which a Git checkout cannot take. With rules, the fix now says to upload fewer files, or to use a Git source and remove the contract rules from the tables the build writes. A build without rules keeps the Git source advice.properties.modelof a hybrid-reference build unset. Now: "Add 'm' to properties.select, or drop properties.select.", and "Set properties.model to 'm' ..." first when it is missing.A second commit corrects the
planned_objectsdocstring:fluid diffreads it,fluid planon a 0.7 contract does not.3.
fluid verifysays where a dbt-built Databricks table's NOT NULL belongs (fix)dbt's
tablematerialization rebuilds the table from the model's SELECT, which carries no NOT NULL, and the OpenTofu module leaves a dbt-written table's columns to dbt, so arequired: truecolumn of such a table failed the constraints check with no reason and no fix. The finding now says why, names the dbt model (the build'sproperties.modelwhen that build writes only this table, else the table's name, as the job's rule tests find it), and prints the model properties that keep the constraint: an enforced dbt model contract listing every column with itsdata_type,not_nullon the required ones. The JSON report carries them asdimensions.constraints.hintanddimensions.constraints.dbt_model_yaml, and the hint is the first entry ofseverity.actions. The grade is unchanged; keys are only added. The text report now prints each action as plain text, since an action can quote a model name from the contract.Known limits: with both
properties.selectandproperties.model, the hint namesproperties.model, as the rule tests do;data_typeis the contract's type as written, not checked against a live dbt-databricks run.4.
fluid planof a contract file binds each dbt build's project (feature)A plan made from a bundle bound the dbt code the bundle packs, but a plan made straight from a contract file bound nothing: a model edited between
fluid planandfluid apply plan.jsonran without anyone having planned it.dbtProjects, underplanDigest) are selected and read asfluid bundlereads them, in the bundle's record shape (a root digest and a sha256 per file).repository, a symbolic link, a file dbt reads in a hidden directory of a local build, a project over the size limits, a dbt build with noid, or two dbt builds sharing an id is recorded as{"unbound": why}with a warning, and the plan is still written. The exception is a dbt build that runs as a Databricks job from a localrepository:fluid planreads that project as apply's upload does, so a missing project, a symbolic link, an unreadable file or a project over the upload's limits fails the plan (exit 1,unsupported_binding), as apply would there. The reason names paths relative to the contract, so two plans of one contract made in two directories carry the samedbtProjectsrecord.fluid apply plan.jsonchecks the checkout before anything runs. A changed, added or removed file is refused (apply_plan_digest_dbt_project_changed), naming paths only, never contents; a missing project isapply_plan_digest_dbt_project_missing; an unbound build, or a plan an older fluid made for a contract with a dbt build, isapply_plan_digest_dbt_project_unbound("re-run fluid plan"). The gate runs in every apply mode, as the bundle's does.databricks-job-project-changed), for a bundle too. A Databricks job dbt build with a local repository is bound whatever its pattern, on both routes, and the upload refuses a project nothing bound while a binding is active.fluid apply plan.json --dry-runruns no dbt and uploads nothing, andfluid forgemakes the dbt project after the plan. A real apply, the bundle route and every other binding check are unchanged.--no-verify-plan-bindingskips the gate with the existing warning.dbt_project.ymlis read without blocking, so a FIFO in its place cannot hangfluid plan.Hosts that plan in a temporary directory: a host that plans each contract alone in an empty temporary directory now records its dbt builds as unbound; a dbt build that runs as a Databricks job from a local
repositoryfails the plan there (databricks-job-project-missing), as apply would. A host that applies contract files, never a storedplan.json, meets none of theapply_plan_digest_dbt_project_*refusals. Re-planning withinject_digests(force=True)and no bundle keeps the plan'sdbtProjects.Known limits: a plan applied from a checkout at another path than the one
fluid planran in is refused (dbt-project-missing); a templatedrepositoryis recorded unbound and refused at apply, asfluid bundlerefuses it; every apply mode refuses an unbound dbt project, a mode that runs no dbt included, as the bundle route does; a plan made by this fluid for a contract with a dbt build is refused by an older fluid'sfluid apply plan.json(binding-mode-mismatch), so a plan job and an apply job need the same fluid version.5.
fluid planrefuses what apply's OpenTofu emitter refuses (feature)fluid planof a contract thatfluid applywould refuse wrote a plan.json anyway; the refusal came only at apply, after review. Nowfluid planruns, before it writes plan.json, the refusals apply's OpenTofu emitter raises, for every provider that applies through OpenTofu.unsupported_binding, its kind and fix), and no plan.json.DATABRICKS_WAREHOUSE_ID, an operator allowlist that does not list what the contract names, an unsetFLUID_SPARK_GLUE_JARS_URL, or any refusal while a{{ env.* }}value is not set where the plan runs. The warning says what apply needs ("apply refuses unless ... is set"). plan.json keeps the placeholders as written.plan_spark_refused,planner_failed).tofu, no files. AWS uses a placeholder account (no STS), GCP looks up no Application Default Credentials, credentials come from the environment only (no keyring, no secret store), and the native provider's own log lines stay out of plan's output. A provider plugin may offeremit_refusals(contract), which reports its refusals without building the module: Databricks does, so the check reads no keys and runs no SQL.FLUID_SPARK_GLUE_JARS_URL(a Glue build that decodes Avro) was raised while the Spark blocks were built, before the exposes or a later build were read, so a contract that also had a refusal of its own got a warning at plan and that refusal only at apply. The unset prefix is now raised last, byemitandemit_data, after every refusal the contract decides; a contract with only the unset prefix is still a warning.emit_moduleis the one it always made; streaming plans andfluid plan --tofuskip the check; any other error in the check is a warning and the plan goes on. A--providerthat does not match the contract now fails the plan, as it fails apply.For tools that run
fluid plan: a pull-request job that plans each changed contract now shows a refused contract as a failed plan (exit 1, no plan.json). Nothing in plan.json changes shape.Known limits: one unset
{{ env.* }}value anywhere in the contract turns every refusal into a warning (apply still refuses); Databricks' refusals skip the sovereignty check thatemitruns, which plan's own sovereignty check covers.6. Smaller CLI fixes around Databricks (fix)
Each corrects a message or an order of checks; none changes what a valid contract does.
fluid test --results-alertchecks a folder's permissions before it makes the folder. When the alert did not exist, the folder was made first and its permissions read after, so a folder that a group of every workspace user can edit (inherited from a parent) was left behind when the run was refused. It now finds the nearest folder that exists, applies the same rule to it, and makes the folder only when that passes. The refusal names the folder asked for and the parent whose permissions it would inherit. An existing folder is checked as before./Workspace/Shared, which is refused by its path, taking edit rights away from the users groups cannot work; the guidance now points only at a folder the CI identity alone can edit. The permission-based refusal keeps its own advice, and the generated error reference follows.fluid doctor's Databricks row no longer prints a period before the semicolon: a refused credential's text ends with one.dbt_project.ymlvalue that is not text is named by its type. Messages about a path entry, an output directory or a build's repository printed the value, which echoes a large nested list or mapping; they now say a list, a mapping or an integer. A Databricks job build with a local repository is decided by the job rule before its pattern and properties types are read; valid contracts behave as before.DATABRICKS_HOSTis ignored because the environment setsDATABRICKS_CONFIG_PROFILE, the warning now also says the profile can be unset for this run, so the project file's own host and credential are used.PERMISSION_DENIED). A refusal kind keeps its lower-case dash-joined shape, and anything else names the exception class alone.fluid diffprints the same text when it cannot read a Databricks table, so it follows.On current main
fluid planwrites the cost-attribution block and then the dbt project record, both underplanDigest, before the digests are taken.planDigestthat moved only bydbtProjectswhen the plan without that key digests to the old one; every other difference still fails.Borrow
core/dbt/events/types.py(the message formats of test, model, seed, snapshot, skip, freshness and hook lines); dbt-commonformat_fancy_output_line(dot padding, then[STATUS]); the repo's failed-task path inbuild_runners/_databricks_job_run.pyanddatabricks_enforce.scrub, reused.databricks_dbt_tests._model,normalize_column_type,yaml.SafeDumper.undivergedchecks git state; dbt-core 1.12.7 (Apache-2.0)FileHashselects, never refuses; Pulumi 3.278.0 update plans record no program digest; in-toto attestation v1 has the same per-file shape. The repo's bundle tree root (forge/core/bundle.py::merkle_root) is reused; no new format.native_actions(offline=True),contract_source,resolve_env_templates_in_contract(unset="defer"), apply's ownemit_moduleandbuild_module. Process-wide switches (keyring 25.7.0's null backend, google-auth 2.63.1NO_GCE_CHECK, botocore 1.44.17AWS_EC2_METADATA_DISABLED) cannot scope to one check, hence context variables. OpenTofutofu validate, TFLint 0.66.0 (MPL-2.0, offline by default), AWS CDK 2.278.0 Aspects, Pulumi policy packs, Checkov 3.4.14 and Trivy 0.77.0 check configurations or plans, not the apply engine's own refusals; splitting those into hard and environment-dependent ones is this repo's own.read_project_file(no symbolic link, regular files only) is reused after anos.stat, the stat-then-fstat idiom the repo already uses for credential files; the running totals followread_project_files. Databricks CLI sync and state push, dbt-core and the Terraform archive provider set no per-file cap, so there was nothing to borrow. The folder check reusescheck_folderand the workspace folder helpers; the Workspace API's mkdirs creates parents and says nothing of the new folder's access list, objects in a folder inherit its permissions (https://docs.databricks.com/aws/en/security/auth/access-control/), a status read of a missing path answersRESOURCE_DOES_NOT_EXIST(https://docs.databricks.com/api/workspace/workspace/getstatus), and the SDK has no helper for the nearest existing parent or effective permissions.Validation on this head
fluid differror-code test.scripts/mypy_strict.py, both import contracts, license-header and source-fence tests: green on this head.fluid bundle --envprints its compile events twice since main's profile-privacy change), an AWS endpoint dotenv test that passes alone, and a dotenv test that needs dbt installed.pytest -n 3, under the heavy lock), on this branch before it was rebased onto main's newest commits (the touched suites above ran after the rebase and cover every file where those commits meet this branch): 56,618 passed, 5 failed, 1,104 skipped in 68 minutes. None of the five comes from this change: two duckdb sandbox tests also fail on main on that machine (temp-dir classification), one hypothesis health check ran too slowly under load and passes alone, one AWS endpoint dotenv test passes alone, and one dotenv test needs dbt installed.fluid bundle --envprintingcompile_startandcompile_donetwice) fail, and fail on main too; they come with the profile-privacy change that main gained since.ripwire --quality-delta: the three-dot diff applied to a fresh worktree of the base; the control, a one-line CHANGELOG edit, exits 0). Measured on this head: the branch exits 2 on 178 rows: a gating row stays in every class below, and none of them is dead code. Production rows (fluid_build/), one by one:_upload_files(complexity 7 to 16, verbosity 43 to 64): the loop holds the per-file size taken from the file entry, the file cap, the byte cap and the read-error path, each its own refusal with its own test; splitting it would spread one set of limits over two functions.check_folder(complexity 12 to 28, verbosity 67 to 90) andensure_alert(24 to 27): the early parent check is a mode of the same permission rule (a parent that is not a folder, cannot be read or is unclear passes; a plain all-users-edit finding refuses) and the call that picks it. The rule and the refusal text stay shared with the check of an existing folder on purpose._warn_unpaired_endpoints(complexity 17 to 20, verbosity 58 to 74): the advice for an ignored project host now names every Databricks credential the operator holds that unsetting the profile would leave, a set built from the refusals and a joined list.runoffluid plan(50 to 53): one call each for the dbt project record and the emitter check, placed after the earlier steps and before the digests.emit_module(parameters 4 to 6): gains theofflineoption that only plan's check passes; apply's call is unchanged.IacProviderPlugin,DatabricksIacPluginand_GUIDANCE(verbosity +12, +24, +35 lines): the documentation of the two new optional plugin capabilities and the guidance text of the new refusal fixes._GUIDANCE,_failure,compile_dbt_jobs(churn): lines edited by more than one commit of this branch, since each item was built and reviewed alone and is folded here.env_only_credentialsagainst_operator_supplied_uri,applied_bundle_scope,contract_as_written,destinations_as_written,speakinganduse_environment(10 duplication and clone rows): the repo's idiom for a scoped switch (set a context variable, yield, reset infinally). Each switch keeps its own variable and reader; one shared helper would hide that._Refused.__init__(tests/cli/test_doctor_preflight.py) with existing exception classes'__init__.Test rows (145 duplication and clone rows, 2 complexity and 3 verbosity rows), by class: 59 pair
_dbx_plain_contract, a small Databricks contract builder in tests/cli/test_plan_emitter_refusals.py, with the small contract builders of about 40 other test modules (dicts of one shape, not copies); 28 pair the small helpers_checkout,_write,_aws_contractand_contractof tests/cli/test_plan_dbt_project_binding.py, tests/forge/test_raw_plan_dbt_projects.py and tests/cli/test_plan_emitter_refusals.py with same-shaped private helpers of other modules; 19 pair the plan-binding tests with unrelated tests that arrange, call and assert a refusal; 26 are single pairs elsewhere; 7 are the dbt job report tests of tests/build_runners/test_databricks_job_run.py against each other; 6 pair the plan route's checks with the bundle route's tests in tests/cli/test_bundle_dbt_project_binding.py (gate_then_editand five tests: the plan route needs the same checks). No fixture is copied across more than two files, so a shared helper would not remove a row without touching unrelated test modules.fluidruns per item (each on its own base): the repro contracts for plan-time refusals exit 1 with no plan.json; a Databricks contract with no warehouse writes plan.json with one warning; AWS, GCP and Snowflake plans print nothing beyond the plan; a model edited afterfluid planis refused byfluid apply plan.jsonnaming the file (realtofustand-in run); each refusal fix applied alone clears its refusal (fluid validate --offline).fluid planruns for the AWS ordering change, with the environment cleared and only the operator lists set: a Glue Avro build whose contract also has a second expose naming an unknown catalog exits 1, writes no plan.json and names the unknown catalog; the same contract without that expose exits 0 and writes plan.json with one warning that apply needsFLUID_SPARK_GLUE_JARS_URL. The doctor details line and the preflight failure text were run through the real functions: no period before the semicolon,PERMISSION_DENIEDrepeated, a lower-case token-shaped error code not repeated.fluid planthe cost-attribution block is written first and then the dbt project record, both before the digests are taken, and the dbt item's own copy of a helper main also carries was dropped (the two were identical); (2) in the compatibility gate test both helper sets are kept, and the two helpers that read a plan (_plan_digest_moved_only_by_dbt_projects,_plan_digest_of) read it without the attribution keys. The branch was then rebased onto newer commits of main twice; the one overlap that needed a hand (the CHANGELOG, where main's dialect column types entry and this branch's dbt project entry sit side by side) kept both, and every commit's change came through unchanged.Reviews
Each item before this PR:
outputswriting several tables named one model for each), both fixed and re-checked.embedded-logicorflink_sqlpattern was uploaded but never bound; a FIFO nameddbt_project.ymlhung the plan), fixed, ship; final judge blocked once (CHANGELOG wording), fixed, ship.This PR as a whole:
planDigest, the apply gate runs before the environment check and the OpenTofu route, a deferred jar prefix is raised by bothemitandemit_data, and the early folder check refuses only on a plain edit grant.Docs
fluid plan(binds dbt projects; refuses what apply refuses; the environment warnings; an unset Glue jar prefix is reported after the contract's own refusals),fluid apply(the three dbt project refusals, the dry-run warning),fluid verifyon dbt-built Databricks tables (the hint and the two JSON keys), the Databricks page (the refusal fixes, the per-rule report wording, the upload's size checks),fluid test(the results-alert folder check order), the credentials page (the profile advice) and the provider plugin guide (emit_refusals,environment_refusals). It merges after this PR.