03 / Work · Mining
The release failed in test, where it was supposed to
A production accounting model gained quarterly figures. A test on a board that reads the same tables caught the change before production did.
01 / Context
A miner runs production accounting on dbt and Snowflake. A weekly performance board reads the same tables as the accounting models.
02 / Problem
An accounting model was gaining quarterly figures beside its monthly ones. A change like that is correct where it is made and can still break every reader downstream that assumed monthly.
03 / Architecture
Tests sit on the readers of a model as well as on the model that changed. The board declares the time grains it expects to see, so a new grain upstream fails the board’s own run.
Every release takes the same path: deployed to test, validated there, and only then raised as a production change, copied from the last one that went through clean.
Before
After
04 / Implementation
When the accounting release reached the test environment, the board’s run failed its grain test. The new grains were correct, so the fix was to widen the board’s list on the sources it reads and ship both changes in one release.
05 / Outcome
Nothing reached production. The reader and the model shipped together.
06 / Technical details
- Stack
- dbt on Snowflake, with separate test and production environments
- Tests
- Accepted-grain tests on downstream readers
- Stays behind
- The release steps written down, and tests on the readers of a model