Adds an ID field to all transform settings and updates error messages to use auto-generated IDs
Motivation and Context
Identifying the location of errors in large config files is a challenge due to the high reuse of transform functions and existing error message format (transform: foo: err goes here), but this is easier when there is a way to uniquely identify each transform.
This PR makes these types of error message possible (where foo is the transform function):
transform foo: err goes here (this happens if the transform is not configurable or if the ID field value is missing)
transform my-unique-foo: err goes here (this is an ID configured by the user)
transform 5f4ae672-6b9cc21d: err goes here (this is an ID auto-generated by the app)
Users who do nothing will start to see auto-gen IDs in places where they used to see transform function names. In the future a pseudo-random default ID would be preferred, but Jsonnet doesn't have any functions to support that.
How Has This Been Tested?
Tested locally (this can be seen by building any existing configs).
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
Description
ID
field to all transform settings and updates error messages to use auto-generated IDsMotivation and Context
Identifying the location of errors in large config files is a challenge due to the high reuse of transform functions and existing error message format (
transform: foo: err goes here
), but this is easier when there is a way to uniquely identify each transform.This PR makes these types of error message possible (where
foo
is the transform function):transform foo: err goes here
(this happens if the transform is not configurable or if the ID field value is missing)transform my-unique-foo: err goes here
(this is an ID configured by the user)transform 5f4ae672-6b9cc21d: err goes here
(this is an ID auto-generated by the app)Users who do nothing will start to see auto-gen IDs in places where they used to see transform function names. In the future a pseudo-random default ID would be preferred, but Jsonnet doesn't have any functions to support that.
How Has This Been Tested?
Tested locally (this can be seen by building any existing configs).
Types of changes
Checklist: