Introducing a new way to review your PRs.

Read the announcement

dagster-io / dagster

An orchestration platform for the development, production, and observation of data assets.

View on GitHub

19 documents · Updated Nov 23, 2026

docs / quality-and-validation

Quality and validation

Dagster uses layered validation to show that a change works in isolation and at the boundaries around it. Package tests check focused behavior. Integration suites check real services and deployments. Examples check user paths. Automation joins these checks into a change-aware quality gate.

Validation model

The validation model moves from local behavior to system behavior. A change should pass the checks that prove its direct contract and then the checks that prove it still works with the services, projects, tools, and repository boundaries around it.

Validation layers

Each layer answers a different question. The layers complement one another rather than repeat the same test at different paths.

LayerMain questionTypical scope
Package testsDoes one package honor its public behavior?Definitions, execution, storage, configuration, logging, and automation behavior
Integration suitesDoes the package work with a real service or deployment system?Containers, Kubernetes, daemons, brokers, databases, cloud services, and release compatibility
Example projectsCan a user follow a supported project path from setup to run?ETL, deployment, integrations, and data workflows
Automation checksCan the project be built, documented, packaged, synchronized, and released safely?Types, schemas, generated interfaces, docs, package environments, images, and CI step selection

A passing package test is not a complete validation result. A package can work in isolation and still fail when it loads user code in a subprocess, talks to a database, uses an older release, or runs inside a project environment. The higher layers cover these boundaries.

References: pyproject.toml• L5-49 .buildkite/…/dagster_oss_main.py• L11-25 .buildkite/…/dagster.py• L33-67

Validation flow

The CI pipeline gathers repository checks, package and example checks, integration suites, deployment checks, and documentation checks into one Buildkite run. Change-aware rules reduce work on feature branches. Main and explicit no-skip runs retain broad coverage.

This diagram shows how a source change moves through the main validation layers.

flowchart LR
    C[Source change] --> S[Change-aware Buildkite plan]
    S --> P[Package tests]
    S --> E[Example and docs tests]
    S --> I[Integration suites]
    S --> A[Automation checks]
    P --> G[Validation result]
    E --> G
    I --> G
    A --> G

Buildkite creates steps from package metadata and test configuration. It can split slow work, select a Python version, add service setup, and attach prerequisites such as test-project images. Each area can therefore use the environment that proves its contract.

References: .buildkite/…/dagster.py• L33-67 .buildkite/…/tox.py• L26-80 .buildkite/…/packages.py• L41-76

Package validation

Package validation checks the behavior owned by one Python package or project. Package test commands run in declared environments, while shared test support keeps timing, fixtures, and failure reporting consistent.

Test environments

The package test contract is a repeatable environment built from the package's dependencies and test groups. tox uses uv to create that environment and passes selected CI settings into the test process. Root pytest rules make marker mistakes visible and provide a fallback timeout for a hung test.

Shared support in python_modules/…/test_utils.py gives tests controlled instances, workspaces, clocks, subprocess waits, and concurrency waits. These helpers make asynchronous checks observe a real state instead of guessing with a fixed sleep.

References: python_modules/…/tox.ini• L1-72 python_modules/…/test_utils.py• L221-379 python_modules/…/test_utils.py• L561-605

Core behavior

Core package tests protect the contracts that users meet when they define and run jobs and assets. They check graph and asset selection, configuration resolution, resource and hook behavior, event and log records, storage access, execution results, and daemon-driven automation.

The tests also check behavior across normal and failure paths. Examples include successful and failed steps, skipped subsets, resource cleanup, sensor resource injection, event forward compatibility, and recovery after a daemon stops during run submission. The suite therefore checks both the result of an operation and the state it leaves for the next operation.

References: python_modules/…/test_asset_job.py• L63-90 python_modules/…/test_job_execution.py• L145-209 python_modules/…/test_hook_def.py• L21-149 python_modules/…/test_general_pythonic_resources.py• L201-232 python_modules/…/test_event_logging.py• L42-141 python_modules/…/test_local_instance.py• L28-67

Contract snapshots

Snapshot tests protect serialized views of jobs, nodes, configuration, and Dagster types. They prove that these views can be rebuilt after serialization and that older payloads still load. Stable snapshots matter because downstream services use them to understand definitions without importing the original process.

Configuration tests also check the boundary between declared defaults and run-time values. Component tests check that inherited fields and scaffold parameters remain usable when a project is resolved or generated.

References: python_modules/…/test_config_schema_snapshot.py• L18-89 python_modules/…/test_dagster_type_namespace_snapshot.py• L6-26 python_modules/…/test_job_snap.py• L111-141 python_modules/…/test_job_snap.py• L621-655 python_modules/…/test_node_def_snap.py• L159-237 python_modules/…/test_system_config.py• L31-95 python_modules/…/test_field_utilites.py• L9-64 python_modules/…/test_component_scaffolding.py• L56-150

Dependency variants

Some tests validate the same behavior against more than one supported dependency or installation path. Core tests include compatibility and migration checks. Example and integration projects use uv.lock files to record repeatable dependency resolutions and their supported Python ranges.

Example manifests also state the Python range and the package set that the example must support. The assets smoke test targets Python 3.11 through 3.13 and uses editable repository packages with a test dependency group. The ETL and multi-workspace Databricks documentation projects target Python 3.11 through 3.14 and declare the integrations needed for their user workflows. These declarations make project validation check the intended environment rather than an accidental local resolution.

The Scala and Spark Pipes example applies the same rule across languages. Its Gradle build fixes the Java and Spark toolchain, constrains key transitive libraries, substitutes an unpatched LZ4 module, and locks the resolved JVM graph. The lock records the build and runtime classpaths that the example must reproduce.

A passing default test does not replace a passing old-dependency, released-package, or locked-environment test when the change affects that boundary.

References: python_modules/…/pyproject.toml• L78-109 python_modules/…/test_back_compat.py• L79-117 examples/…/pyproject.toml• L5-52 examples/…/pyproject.toml• L1-29 examples/…/pyproject.toml• L1-34 examples/…/uv.lock• L1-8 examples/…/uv.lock• L125-168 integration_tests/…/uv.lock• L1-8 integration_tests/…/uv.lock• L163-181 examples/…/build.gradle• L13-78 examples/…/gradle.lockfile• L1-4

Integration validation

Integration validation checks behavior across process, service, and deployment boundaries. These suites start the systems that a package depends on, run Dagster against them, and inspect the result as a user or operator would see it.

Integration suites

The main suites cover different system risks. Kubernetes tests exercise cluster deployment and monitoring. Daemon tests exercise scheduling and run coordination. Celery-on-Kubernetes tests exercise broker-backed execution. Backward-compatibility tests run current server code with user code from tested releases. Azure live tests exercise a real cloud account when the relevant package changes.

The suites share a common Buildkite path, but each suite keeps its own factors and environment needs. Daemon validation separates parallel-safe tests from serial tests because some service stacks use fixed ports and container names. Celery validation selects broker-specific test groups for RabbitMQ and Redis. This lets the pipeline use the right queue, resources, credentials, and service setup for the boundary under test.

For the detailed suite map and example project view, see Integration tests and examples.

References: .buildkite/…/integration.py• L60-73 .buildkite/…/integration.py• L134-199 integration_tests/…/tox.ini• L23-34 integration_tests/…/tox.ini• L24-32 integration_tests/…/tox.ini• L23-36

Service and deployment boundaries

Service-backed tests treat a database, broker, container engine, or cluster as part of the behavior being checked. The test job starts the needed service and gives the test process a reachable address. The suite can then detect startup, networking, credentials, lifecycle, and result-reporting failures that package-only tests cannot see.

Shared user-code images are part of this boundary. Suites that run user code in Docker or Kubernetes declare the image as a prerequisite. Buildkite builds that prerequisite before the dependent suite runs. The backcompat builder also chooses source or release images for the server and user code so the test can reproduce mixed-version deployments.

References: .buildkite/…/integration.py• L244-275 .buildkite/…/test_project.py• L33-90 .buildkite/…/dagster.py• L70-105 integration_tests/…/tox.ini• L6-34 integration_tests/…/build.sh• L8-18

Compatibility boundaries

Compatibility checks protect users who upgrade one part of a Dagster system while keeping another part on an older release. The backcompat suite pairs a current webserver with user-code definitions from the latest release and the earliest tested release. It checks health, job execution, subsets, and repository contents through the GraphQL boundary.

The suite resolves the current latest non-prerelease package version when it tests the latest release. It also cleans up its local service and uploads container logs in CI. Its image builder runs the earliest tested user-code release on Python 3.10 when that release predates current Python support. This gives an upgrade failure a user-facing signal and a usable diagnostic record.

Live service checks add different evidence. They validate a connection to an external provider rather than only a local mock. The pipeline runs them only when the provider package changes and the required credentials are available.

References: integration_tests/…/test_backcompat.py• L25-105 integration_tests/…/test_backcompat.py• L166-253 integration_tests/…/test_backcompat.py• L256-400 integration_tests/…/build.sh• L20-26 integration_tests/…/uv.lock• L1-8 .buildkite/…/integration.py• L31-40 .buildkite/…/integration.py• L169-199

Example validation

Example validation treats a project as a user-facing contract. An example must show a useful Dagster workflow and remain runnable as dependencies, project setup, and package installation change.

Example projects

The examples area demonstrates projects across ETL, deployment, integrations, and data quality. Buildkite discovers example projects with test configuration and runs them as package-like validation. Each project declares its dependencies and supported Python range. Many projects also keep a uv.lock file for repeatable resolution and can add settings for extra services, supported dependency versions, or source-versus-PyPI installation paths.

Deployment examples add a stronger check. Their source-build paths build images from repository code and support both the repository and monorepo layouts. This catches failures in packaging and deployment setup that an import test cannot see.

The OpenAI example adds an external-service workflow to this layer. It partitions source documentation, builds searchable indexes, and uses a configured model to answer questions from those indexes. This checks that a project can connect Dagster assets, partitioned data, an external provider, and its declared environment.

References: examples/README.md• L1-7 .buildkite/…/packages.py• L41-55 .buildkite/…/packages.py• L267-414 examples/…/Dockerfile_dagster• L1-20 examples/…/pyproject.toml• L5-34 examples/…/build.sh• L3-63 examples/…/build.sh• L3-61 examples/…/pyproject.toml• L1-39 examples/…/uv.lock• L1-8 examples/…/pyproject.toml• L5-27 examples/…/assets.py• L23-119 examples/…/utils.py• L22-35

Documentation examples

Documentation snippets are executable examples. Their checks load snippet files, run selected integration flows, and compare user-facing output with checked-in snapshots. This protects the path from a code change to the instructions a user follows.

Snapshot checks run commands in isolated temporary environments and normalize unstable output before comparison. Each snapshot directory has one owning test. Regeneration clears the owned output first and detects files that the test no longer creates.

Documentation projects can add a second build surface. For example, the ETL tutorial dashboard uses its front-end build as a validation command, so the docs workflow can catch a broken dashboard as well as a broken Python snippet. The docs-snippet project keeps a Python version cap because its supported integration set has conflicting dependency requirements on newer Python versions. Its Scala and Spark Pipes snippet also builds a JVM artifact inside a Spark image and records the resolved Gradle dependencies. The build locks the toolchain and selected transitive libraries so the example checks a stable cross-language runtime boundary as well as Python code.

References: examples/…/README.md• L25-79 examples/…/README.md• L1-58 examples/…/utils.py• L164-249 examples/…/utils.py• L286-519 examples/…/pyproject.toml• L5-15 examples/…/package.json• L4-55 examples/…/Dockerfile• L1-23 examples/…/build.gradle• L23-78 examples/…/gradle.lockfile• L1-4

User workflows

The quickstart example validates a complete user path: create an ETL project, load its definitions, materialize data, inspect results, and schedule a later run. Its value is broad because it checks installation and project use rather than only library imports.

The example layer can therefore catch changes that preserve an API in isolation but break project discovery, dependency resolution, asset loading, or the first local run. External-service examples extend that signal to provider setup and the way a project joins Dagster assets to provider calls.

References: examples/…/README.md• L1-5 examples/…/README.md• L52-108 examples/…/README.md• L156-180 examples/…/pyproject.toml• L1-39 examples/…/assets.py• L38-119

Automation tooling

Automation tooling turns validation rules into repeatable checks and release signals. It covers code quality, type safety, docs, schemas, generated clients, package manifests, container images, repository synchronization, and the CI plan itself.

Repository checks

Repository-wide checks run outside any one package because they protect shared contracts. Ruff checks Python style. Prettier checks selected YAML and Markdown files. ty checks types across the repository. Other steps apply the MySQL schema, validate the Helm chart, and check GraphQL client compatibility.

These checks are not substitutes for runtime tests. They prevent invalid source shape, stale generated or declared interfaces, invalid deployment schemas, and changes that adjacent tools cannot consume.

References: .buildkite/…/dagster.py• L33-40 .buildkite/…/dagster.py• L108-179 .buildkite/…/helm.py• L19-75 Makefile• L30-50

Documentation and generated interfaces

The docs pipeline builds the docs site, runs docs tests and lint checks, formats docs, builds API docs, and validates Python docstrings. The docs utility can inspect public symbols, exports, RST symbols, and docstrings for one symbol, one package, changed files, or the full set.

Generated interface checks add another boundary. The GraphQL client check verifies that current client queries have snapshots for future server backcompat testing. Image tooling checks image commands, tags, platforms, build inputs, and cleanup for both local builds and multi-platform publishing.

References: .buildkite/…/docs.py• L30-111 python_modules/…/DAGSTER_DOCS_CLI.md• L11-20 python_modules/…/DAGSTER_DOCS_CLI.md• L51-122 python_modules/…/README.md• L1-37 python_modules/…/README.md• L52-93

Repository synchronization

Repository synchronization checks protect the boundary between the internal repository and its public mirrors. The sync audit compares commit coverage and changed-file sets in both directions. It reports missing commits and unexpected file mismatches so a completed transfer is not treated as proof of correctness.

The sync runner also distinguishes recoverable destination movement from hard failures such as permissions or branch rules. Partial source clones can be completed before the audit resumes.

References: python_modules/…/monorepo_sync.py• L38-58 python_modules/…/monorepo_sync.py• L244-375 python_modules/…/monorepo_sync.py• L669-714 python_modules/…/monorepo_sync.py• L730-801 python_modules/…/monorepo_sync.py• L883-1005

Change-aware execution

Change-aware execution keeps feedback fast without losing the contract that matters. Each step can inspect changed paths and decide whether to run. Force-run rules cover shared foundations such as Helm, dagster-dbt, Dagster Plus resources, and published package changes.

This rule is safe only when dependency edges are current. If a package or shared fixture affects another suite, its Buildkite step must express that relationship so a change does not silently skip the needed validation.

References: .buildkite/…/dagster.py• L188-221 .buildkite/…/packages.py• L469-480 .buildkite/…/packages.py• L1147-1167 .buildkite/…/integration.py• L169-199

Change checklist

When these files or sections are changed, remember to consider these:

  • A package test factor must stay aligned between its tox.ini, package metadata, supported Python versions, and Buildkite split or dependency rule.
  • An example or integration uv.lock file must stay aligned with its project manifest, test command, supported Python range, and image or service prerequisites.
  • A project manifest must keep its Python range, dependency group, source-package choice, and project registry settings aligned with the workflow that CI runs.
  • A generated dependency file such as a dbt requirements.txt must stay aligned with its input requirements and the runtime used by the tutorial.
  • A docs-snippet or deployment example Python cap must stay aligned with the dependency combinations that the example or snippet test loads.
  • A cross-language docs example must keep its container runtime, Java and Scala toolchain, build constraints, dependency lock, and produced artifact on compatible versions.
  • Backcompat fixture versions and expected repository contents must continue to cover both the earliest tested release and the latest non-prerelease release.
  • Changes to test synchronization helpers must preserve bounded waits, useful captured output, and cleanup responsibility for the caller.
  • Changes to serialized jobs, nodes, configuration, or Dagster types must preserve old payload loading and stable output when no new field is present.
  • Changes to component resolution or scaffolding must preserve inherited fields, field overrides, required parameter errors, and generated project files.
  • Changes to resources, hooks, sensors, or daemon evaluation must preserve resource setup and cleanup, tick state, cursor progress, run selection, and recovery after interruption.
  • Changes to asset backfills must keep partition ranges, grouping by backfill policy, dependency order, and final status counts consistent.
  • Changes to event logging or storage must preserve event meaning, run status, metadata, migration reads, and shared behavior across supported storage backends.
  • Changes to daemon test grouping must preserve the serial boundary for fixed-port service stacks and the separate broker marks used by Celery-on-Kubernetes tests.
  • Changes to change-aware CI rules must include every shared dependency that can make a skipped step stale.

Important failure modes

TriggerConsequenceGuard
A project lock file and its manifest resolve different runtimesA suite can fail before it tests the service boundary or can validate a different environment than CI expectsUpdate the lock and manifest together and keep the declared Python range supported
A generated dbt requirements file does not match its input fileA tutorial can install a different tool set from the one its project declaresRegenerate the output from the input with the runtime used by the tutorial
A docs or deployment example keeps a Python range that its dependency set cannot resolveThe example fails during environment setup instead of checking the user pathKeep the manifest, lock, and dependency constraints aligned
A cross-language snippet has an unlocked or incompatible JVM dependencyThe container can fail during artifact build or at Spark runtimeKeep the Gradle lock, version constraints, Java and Spark toolchain, and built artifact aligned
The backcompat version map drops an earliest or latest user-code caseAn upgrade boundary can break without a test signalKeep current server code paired with both tested release ends and the matching definitions files
An asynchronous test waits with a blind sleep or loses its cleanup pathA slow runner produces a flaky result or leaves a process, container, or pool blockedPoll for the observable state, bound the wait, and clean up in a finally path
A daemon test with fixed ports runs in parallel with another stackTests collide on container names or ports and fail without testing daemon behaviorKeep the stack in the serial test pass
A Celery-on-Kubernetes test uses the wrong broker markThe intended broker path is skipped or the suite starts the wrong service setKeep broker marks, tox commands, and service setup aligned
A new serialized field is emitted for every old job or snapshotSnapshot IDs change for unrelated jobs and older payloads may not loadOmit absent or non-serializable values and test round trips with legacy payloads
Inherited component fields or an override resolver is ignoredA valid component cannot resolve its input or uses the wrong field typeTest inherited fields and overridden dataclass and Pydantic fields
A hook or sensor resource contract is incompleteDefinition loading fails or evaluation receives the wrong resourceValidate resource requirements, callable parameters, and context-based and argument-based use
A daemon stops after reserving runs but before writing its cursorThe next tick can lose or duplicate runsTest each interruption point and require the next tick to resume or safely replace the partial tick
Automation joins an asset check from another code location to an asset runThe run cannot be submitted for the selected locationFilter ride-along checks by location and validate the resulting run selections
A backfill groups assets with incompatible policies or partition mappingsRuns execute the wrong assets or report incorrect partition countsCheck run requests, partition ranges, dependency order, and completed status counts
A storage migration changes schema or index state without old-data checksExisting runs, events, or asset records become unreadable or incompleteTest pre-migration reads, upgrade behavior, data migration, and supported downgrade paths

Key files

FileWhy to read it
pyproject.tomlDefines shared pytest behavior, markers, timeout, and repository-wide Ruff scope.
python_modules/…/tox.iniShows how package behavior and compatibility variants become test environments.
python_modules/…/test_utils.pyProvides the shared instance, workspace, clock, subprocess, and state-wait tools used by tests.
python_modules/…/test_asset_job.pyShows validation of asset graphs, selections, materialization, and reconstructable jobs.
python_modules/…/test_job_snap.pyShows serialized job compatibility and stable snapshot behavior.
python_modules/…/test_general_pythonic_resources.pyShows resource configuration, run-time values, cleanup, nesting, and context behavior.
python_modules/…/test_e2e.pyShows end-to-end automation evaluation across code locations, assets, checks, partitions, and backfills.
python_modules/…/test_failure_recovery.pyShows recovery when a daemon stops during evaluation or run submission.
python_modules/…/test_back_compat.pyShows storage, serialization, and migration checks against older data.
python_modules/…/event_log_storage.pyProvides shared event-log behavior checks for supported storage backends.
integration_tests/…/test_backcompat.pyShows the current-server and released-user-code compatibility boundary.
integration_tests/…/build.shShows how source and release images and old Python runtimes are selected for backcompat validation.
integration_tests/…/uv.lockRecords the repeatable dependency environment and supported Python range for the backcompat suite.
integration_tests/…/tox.iniShows broker-specific test groups and the locked environment used by Celery-on-Kubernetes validation.
integration_tests/…/test_monitoring.pyShows daemon health, run monitoring, container resume, and attempt-limit behavior across service boundaries.
integration_tests/…/tox.iniShows the split between parallel-safe and serial daemon tests.
integration_tests/…/pyproject.tomlShows the services and integrations included in the Kubernetes test environment.
integration_tests/…/uv.lockRecords the Python 3.11–3.14 environment used by Kubernetes test infrastructure.
.buildkite/…/dagster.pyConnects repository, package, example, integration, and deployment checks into CI.
.buildkite/…/packages.pyDefines package and example discovery and validation contracts.
.buildkite/…/integration.pyDefines service-backed, Kubernetes, daemon, Celery, live-cloud, and backcompat boundaries.
.buildkite/…/test_project.pyShows how shared user-code images become prerequisites for integration suites.
examples/…/pyproject.tomlShows a smoke-test project's supported Python range, editable repository packages, and test dependency group.
examples/…/pyproject.tomlShows the environment and project registration contract for an ETL documentation project.
examples/…/pyproject.tomlShows the environment and integration dependencies for a multi-workspace Databricks project.
examples/…/pyproject.tomlDefines the docs-snippet dependency groups, editable repository sources, and Python compatibility cap.
examples/…/utils.pyDefines isolated command execution and snapshot comparison rules.
examples/docs_snippets/docs_snippets/integrations/external_pipelines/dagster_pipes/scalaspark/DockerfileShows the Spark container boundary for a cross-language documentation example.
examples/…/build.gradleShows the Scala artifact, toolchain, and dependency constraints used by that example.
examples/docs_snippets/docs_snippets/integrations/external_pipelines/dagster_pipes/scalaspark/gradle.lockfileRecords the resolved JVM dependencies used by the Scala and Spark example.
examples/…/pyproject.tomlShows the supported environment for a representative user workflow.
examples/…/uv.lockRecords the repeatable dependency environment for that workflow.
examples/…/uv.lockRecords the fixed Python 3.11 environment for the Airlift federation tutorial.
examples/…/assets.pyShows a provider-backed, partitioned asset workflow used as an external-service example.
examples/deploy_docker/Dockerfile_dagsterShows the runtime image boundary for the Docker deployment example.
python_modules/…/monorepo_sync.pyDefines repository mirror completeness, mismatch, retry, and failure checks.
python_modules/…/README.mdExplains query snapshots that protect GraphQL backcompat coverage.