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

[Bug]: "make create-infrastructure" and "make shell" fail with yq version installed with current jq version (1.7.1) on Mac OS #1160

Open
heinrichse opened this issue Oct 29, 2024 · 2 comments · May be fixed by #1162
Labels
bug Something isn't working

Comments

@heinrichse
Copy link
Contributor

Installation method

Own AWS account

What happened?

eks-workshop-v2 % make create-infrastructure bash hack/create-infrastructure.sh '' Warning: Defaulting region to us-west-2 jq: error: load/1 is not defined at <top-level>, line 1: (.. | select(has("file"))) |= (load(.file)) jq: 1 compile error make: *** [create-infrastructure] Error 3

What did you expect to happen?

make create-infrastructure and make shell to work with updated jq version. (1.7.1) Instead, yq must be updated separately to version 4.44.3 to support these commands.

How can we reproduce it?

Run make create-infrastructure or make shell from Mac OS terminal with jq 1.7.1 installed.

Anything else we need to know?

No response

EKS version

Kubernetes 1.30.5

@heinrichse heinrichse added the bug Something isn't working label Oct 29, 2024
@niallthomson
Copy link
Contributor

This is resolved by ensuring that you have yq version 4.X installed. In many cases yq is being installed by package managers along with jq and pinned to an old version. Explicitly installing yq with your respective package manager seems to resolve the issue.

@pengc99
Copy link
Contributor

pengc99 commented Oct 31, 2024

@niallthomson, @heinrichse and I were able to reproduce this earlier this week and @niallthomson found the solution.

This is caused by an outdated version of yq that is automatically installed with jq. We tested this with installing jq 1.7.1, which will install an older version of yq that causes this error. To resolve this error, install a separately managed version of yq. Here is the repo for yq - https://github.com/mikefarah/yq

We were able to successfully build and deploy the workshop's infrastructure and test environment (make create-infrastructure and make shell) with jq v1.7.1 and yq v4.44.3 (latest available as of this comment)

It's also important to note that this problem will come up in any environment that has an outdated version of yq - which in my case is running WSL Debian and in @heinrichse's case running macOS.

pengc99 added a commit to pengc99/eks-workshop-v2 that referenced this issue Oct 31, 2024
Updated authoring_content.md to include the fix for issue aws-samples#1160
@pengc99 pengc99 linked a pull request Oct 31, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

3 participants