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

Documented jq version = 1.6, actually used in the Shell-Operator image is 1.5 #206

Closed
Blokje5 opened this issue Oct 7, 2020 · 2 comments · Fixed by #205
Closed

Documented jq version = 1.6, actually used in the Shell-Operator image is 1.5 #206

Blokje5 opened this issue Oct 7, 2020 · 2 comments · Fixed by #205
Milestone

Comments

@Blokje5
Copy link

Blokje5 commented Oct 7, 2020

The documentation refers to 1.6 as the version used for jq: https://github.com/flant/shell-operator/blob/master/HOOKS.md#jqfilter. However, running jq --version shows that the latest image is still on 1.5.

> jq --version
jq-1.5-1-a5b5cbe

Preferably the Docker Image uses jq version 1.6.

@diafour
Copy link
Contributor

diafour commented Oct 7, 2020

Hello!

I think you are talking about ubuntu based image? Ubuntu 18.04 still has jq-1.5 in the repository. You can use alpine based image if you need jq-1.6.

Please, consider that jq-1.6 has poor performance. It is not significant for one-time scripts, but hooks can be executed frequently and shell-operator Pod will eat up a lot of cpu. We've faced this problem with addon-operator and found a later commit that fixes the performance issue. See flant/libjq-go#10 and issues in https://github.com/stedolan/jq repository.

It seems that documentation is outdated: shell-operator do not use jq 1.6, it uses a more recent commit, I'll fix it.

Also, can you elaborate more on what new features of jq-1.6 do you need in hooks?

@Blokje5
Copy link
Author

Blokje5 commented Oct 8, 2020

Thanks for the reply! Good to know about the performance problems in 1.6. The main reason I was using 1.6 is because of the walk function. But if I want that behaviour I can just add the walk function as a custom function.

@shurup shurup closed this as completed Jan 15, 2021
@diafour diafour added this to the 1.0.0-rc.1 milestone Mar 31, 2021
@diafour diafour linked a pull request Mar 31, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants