[CT-3460] [unit testing] Update unique id for data tests #9220
Labels
Impact: CA
unit tests
Issues related to built-in dbt unit testing functionality
user docs
[docs.getdbt.com] Needs better documentation
Housekeeping
Short description
New state
With the addition of
unit_tests
,tests
now include bothunit_tests
anddata_tests
.Update the unique_id for data_tests to use a resource_type of data_test. The new format would be
data_test.package.name
Current State
Historically,
tests
were exclusivelydata_tests
so there was no need to distinguish them.unique id for unit_tests:
unit_test.package.name
unique id for data_tests:
test.package.name
configs for data_tests are also defined as
data_tests
so it's confusing for the unique id to continue to usetest
.Acceptance criteria
data_test.package.name
data_test
dbt ls resource-type data_test
Impact to Other Teams
Collaborate with CA team to determine best path.
Cloud Artifact would be affected since this would create a backwards incompatible change to the manifest
Will backports be required?
no
Context
This would make the manifest not backwards compatible. It would affect retry and defer when users upgrade. Manifest would possibly need to be rebuilt when upgrades happen.
Ensure tests for defer and state modified, don't run out of characters for test names (postgres)
Backwards compatibility
It's important that if we decide to rename these unique_ids that compatibility issues are handled. We have discussed separating out the various 'nodes' dictionary resources into separate dictionaries, and one possibility might be to rename test unique ids when we do that.
In addition, we are working on creating a cleaner separation between dbt Core and the artifacts definition, including ways to handle compatibility between different versions of artifacts. When that work is in place, it could be used to mitigate the compatibility issues by enabling conversions or by setting feature flags or using whatever mechanisms are developed.
The text was updated successfully, but these errors were encountered: