Skip to content

Add support for integer versions in unit test versions.include/exclude#1658

Open
grahamwetzler wants to merge 3 commits intodbt-labs:mainfrom
grahamwetzler:versions.include-integer-parsing
Open

Add support for integer versions in unit test versions.include/exclude#1658
grahamwetzler wants to merge 3 commits intodbt-labs:mainfrom
grahamwetzler:versions.include-integer-parsing

Conversation

@grahamwetzler
Copy link
Copy Markdown

@grahamwetzler grahamwetzler commented May 1, 2026

IncludeExclude used StringOrArrayOfStrings which has no Number variant, causing deserialization failures when YAML integers (e.g. - 2) appeared in unit_test versions.include or versions.exclude lists.

This was raised in #1613 but was not fixed.

Adds VersionIdentifier (number-or-string) and VersionOrVersionList types scoped to IncludeExclude, leaving StringOrArrayOfStrings unchanged.

Reproduction

When parsing a manifest passed in with --state or dbt platform deferral, dbt Fusion raises an error: data did not match any variant of untagged enum StringOrArrayOfStrings. Note that this only seems to happen with a dbt-core generated manifest – I couldn't reproduce using a dbt Fusion generated manifest.

Unit test:

  unit_tests:
    - name: my_test
      model: my_model
      versions:
        include:
          - 2   # integer and normal version number
$ dbt compile # dbt core
$ mv target/manifest . # move manifest to safe place
$ dbtf build -s my_model --state .

@grahamwetzler grahamwetzler requested a review from a team as a code owner May 1, 2026 21:59
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 1, 2026

Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA.

In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR.

CLA has not been signed by users: @grahamwetzler

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

This repository enforces signed commits. Please sign your commits by following the docs here.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

@grahamwetzler grahamwetzler force-pushed the versions.include-integer-parsing branch from 862b91f to 6e9145a Compare May 1, 2026 22:05
@cla-bot cla-bot Bot added the cla:yes label May 1, 2026
@grahamwetzler grahamwetzler force-pushed the versions.include-integer-parsing branch from 57bfc5e to b81ecea Compare May 1, 2026 22:27
grahamwetzler and others added 2 commits May 1, 2026 17:28
…exclude

IncludeExclude used StringOrArrayOfStrings which has no Number variant,
causing deserialization failures when YAML integers (e.g. `- 2`) appeared
in unit_test versions.include or versions.exclude lists.

Adds VersionIdentifier (number-or-string) and VersionOrVersionList types
scoped to IncludeExclude, leaving StringOrArrayOfStrings unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Graham Wetzler <graham@wetzler.dev>
Signed-off-by: Graham Wetzler <graham@wetzler.dev>
@grahamwetzler grahamwetzler force-pushed the versions.include-integer-parsing branch from b81ecea to 756556f Compare May 1, 2026 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant