Skip to content

Elementary version check does not work in flatten_test macro #991

@jdglaser

Description

@jdglaser

When the elementary on-run-end hook runs to upload test metadata it calls the flatten_test macro.

Currently, the flatten test macro is trying to do a check on dbt version to see if it can pull description directly from the test metadata node (see line 76).

    {% if dbt_version >= "1.9.0" and node_dict.get("description") %}
        {% set description = node_dict.get("description") %}
    {% elif meta.get("description") %} {% set description = meta.pop("description") %}
    {% elif default_description %} {% set description = default_description %}
    {% endif %}

This check will always return false since it is just comparing two strings not doing a proper version check. For e.g., we are on version 1.11.8. The statement below returns false:

    {% if "1.11.8" >= "1.9.0" and node_dict.get("description") %}

I can put in a pull request for this unless someone can handle it soon. This is actually a blocker for us right now.

I propose that the version check is actually removed entirely, since the check for node_dict.get("description") is already sufficient.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions