Merged
Conversation
08540dd to
5230b1f
Compare
Contributor
|
There are a few things needed to make this consistent across the CLI tool:
|
Contributor
Author
Updated the test output on errors for each place to make it more meaningful e.g.
Updated to use spaces.
Updated the playgrounds error handling. |
Contributor
|
This is affecting the style of most of the CLI, so I pushed a commit to standardize it. You can try it with this config: local sub = std.extVar('sub');
{
tests: [
{
name: 'ex',
transforms: [ // comment block for error.
sub.tf.test.message({ value: 'brex.com' }),
// sub.tf.net.domain.subdomain(), // uncomment for runtime error.
// sub.tf.net.domain.subdomain({ object: {source_key: 'test'}}), // uncomment for vet error.
],
condition: sub.cnd.str.eq({ value: '' }), // comment for error.
},
],
transforms: [ // comment block for vet error.
// sub.tf.net.domain.subdomain(), // uncomment for runtime error.
// sub.tf.net.domain.subdomain({ object: {source_key: 'test'}}), // uncomment for vet error.
sub.tf.send.stdout(), // no-op.
],
} |
Contributor
Author
Pushed changes look fine to me. |
jshlbrd
approved these changes
Nov 4, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
This changes the CLIs "test" subcommand (
substation test) to log runtime transform errors to standard error. ThisMotivation and Context
When performing test file driven configuration development it's not clear if a specific tests
[config error]is from misconfigured Jsonnet declarations, invalid Substation options or runtime errors. You can remove the first two options by diagnosing withsubstation vetbut then you still don't know what the runtime transform error is if that's the case.How Has This Been Tested?
Verified that multiple tests across files can be run, and are more clear when there was an opaque
[config error].Types of changes
Checklist: