dbt-labs/dbt-core · error

parse test METADATA

Error message

parse test METADATA

What it means

Test-helper assertion in metadata_from: parsing the METADATA file of a discovered wheel must succeed so its form fields can be asserted. Fires only if the fixture wheel's METADATA is malformed or the metadata parser regresses.

Solutions

  1. Regenerate the test wheel fixture with a valid METADATA file
  2. Check the metadata parser for regressions with the fixture input
  3. Treat failure as a test-infrastructure issue, not a runtime error
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/dbt-ci/src/publish.rs:803 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/2faa565cf6a0a196. Report an issue: GitHub.

Appendix: source

Thrown at crates/dbt-ci/src/publish.rs:803

                "dbt_sa_cli-2.0.0a1-py3-none-manylinux_2_17_x86_64.whl",
                "dbt_sa_cli-2.0.0a2-py3-none-macosx_11_0_arm64.whl",
                "dbt-2.0.0a1-py3-none-macosx_11_0_arm64.whl",
                "dbt_sa_cli-2.0.0a1.txt",
            ],
        );
        let found = discover_wheels(tmp.path(), "dbt-sa-cli", None).unwrap();
        assert_eq!(
            file_names(&found),
            vec![
                "dbt_sa_cli-2.0.0a1-py3-none-macosx_11_0_arm64.whl",
                "dbt_sa_cli-2.0.0a1-py3-none-manylinux_2_17_x86_64.whl",
                "dbt_sa_cli-2.0.0a2-py3-none-macosx_11_0_arm64.whl",
            ]
        );
    }

    fn metadata_from(src: &str) -> Metadata {
        Metadata::parse(src.as_bytes()).expect("parse test METADATA")
    }

    fn field_values<'a>(fields: &'a [(&'static str, String)], name: &str) -> Vec<&'a str> {
        fields
            .iter()
            .filter(|(n, _)| *n == name)
            .map(|(_, v)| v.as_str())
            .collect()
    }

    const SAMPLE_METADATA: &str = "\
Metadata-Version: 2.4
Name: dbt-mongodb
Version: 0.0.1.dev1
Summary: Reserved namespace for a future dbt Labs project.
Project-URL: Homepage, https://github.com/dbt-labs
Project-URL: Repository, https://github.com/dbt-labs/repo
Author-email: dbt Labs <info@dbtlabs.com>

View on GitHub (pinned to 0267ce9170)