-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add jq generic mapper transformation #332
Conversation
use "jq" { | ||
jq_command = <<JQEOT | ||
{ | ||
my_api_key: "${env.TESTAPIKEY}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For our design, API keys wouldn't ever be expected to be handled here. Can we remove this from the example?
I think it might create a false expectation of how we expect things to be configured. :)
pkg/transform/mapper.go
Outdated
// JQMapperConfig represents the configuration for the JQ transformation | ||
type JQMapperConfig struct { | ||
JQCommand string `hcl:"jq_command"` | ||
RunTimeout int `hcl:"timeout_sec,optional"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 small nits on this:
- 1s is actually quite a long minimum possible timeout for this kind of feature. I'd expect it to be very fast - perhaps it should be in ms?
- Could we have the unit in the setting name? Just for QOL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, and good test coverage as usual.
Just a couple of comments/nits to look at - implementation looks good though, thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Ada LGTM!
61776c3
to
e594770
Compare
Jira ref: PDP-1222
This PR supersedes #329