Skip to content
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

Merged
merged 1 commit into from
Jun 20, 2024
Merged

Conversation

adatzer
Copy link
Contributor

@adatzer adatzer commented Jun 17, 2024

Jira ref: PDP-1222

This PR supersedes #329

use "jq" {
jq_command = <<JQEOT
{
my_api_key: "${env.TESTAPIKEY}",
Copy link
Collaborator

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. :)

// JQMapperConfig represents the configuration for the JQ transformation
type JQMapperConfig struct {
JQCommand string `hcl:"jq_command"`
RunTimeout int `hcl:"timeout_sec,optional"`
Copy link
Collaborator

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

Copy link
Collaborator

@colmsnowplow colmsnowplow left a 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!

Copy link
Collaborator

@colmsnowplow colmsnowplow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Ada LGTM!

@adatzer adatzer force-pushed the feat/jq_transformation_dev branch from 61776c3 to e594770 Compare June 20, 2024 11:37
@adatzer adatzer merged commit e594770 into develop Jun 20, 2024
1 check passed
@adatzer adatzer deleted the feat/jq_transformation_dev branch June 20, 2024 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants