dbt-labs/dbt-core · error

object

Error message

object

What it means

Test-helper assertion in event_replay tests (relation_args): the serialized RelationObject JSON payload is expected to be a JSON object (a map) so extra keys can be merged into it. Fires only if serializable_impls.rs changes the recorded payload shape away from a JSON object.

Solutions

  1. Keep RelationObject serialization emitting a JSON object at the top level
  2. Update the test helper if the payload shape legitimately changes
  3. Treat failure as a signal that recorded payloads no longer match the test fixtures
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/dbt-adapter/src/time_machine/event_replay.rs:2597 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of dbt-labs/dbt-core@0267ce9170 (2026-09-07). Data as JSON: /api/errors/bedc2a3e6d030152. Report an issue: GitHub.

Appendix: source

Thrown at crates/dbt-adapter/src/time_machine/event_replay.rs:2597

    /// Serialized `RelationObject` in the shape `serializable_impls.rs` writes, so these tests
    /// exercise the real recorded payload rather than a hand-trimmed subset.
    fn relation_args(extra: serde_json::Value) -> serde_json::Value {
        let mut relation = serde_json::json!({
            "__type__": "RelationObject",
            "adapter_type": "snowflake",
            "database": "CERTIFIED_UAT",
            "schema": "common",
            "identifier": "dim_opportunity",
            "is_cte": false,
            "is_delta": false,
            "is_dynamic_table": false,
            "is_materialized_view": false,
            "is_streaming_table": false,
            "is_table": false,
            "is_view": false,
            "quote_policy": { "database": false, "identifier": false, "schema": false },
        });
        let map = relation.as_object_mut().expect("object");
        for (key, value) in extra.as_object().expect("object") {
            map.insert(key.clone(), value.clone());
        }
        serde_json::json!([relation])
    }

    /// A cross-project (Mesh) `ref` to a public node with no materialization records as
    /// `relation_type: None` and replays as `View`. The relation name is identical, so the
    /// recorded columns are a valid answer and the match must succeed.
    #[test]
    fn test_get_columns_in_relation_ignores_relation_type_flags() {
        let recorded = relation_args(serde_json::json!({}));
        // `is_interactive_table` is absent from recordings predating that materialization.
        let actual = relation_args(serde_json::json!({
            "is_view": true,
            "is_interactive_table": false,
        }));

View on GitHub (pinned to 0267ce9170)