feat(transform): Add ID Settings Field #181
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: