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

Dependency problems with the yq command #50

Open
dverite opened this issue Oct 3, 2024 · 0 comments
Open

Dependency problems with the yq command #50

dverite opened this issue Oct 3, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@dverite
Copy link
Collaborator

dverite commented Oct 3, 2024

The bats test suite uses yq to manipulate yaml files (it's like jq but knowing the yaml format).

It's mentioned in CONTRIBUTING.md with brew install yq as the command.

It should be noted that there are different yq packages:

Ubuntu 23 or newer ship an yq package with an yq command that is a Python wrapper on top of jq. It can also be installed with pip3 install yq. With this flavor of yq, the bats test suite fails with a syntax error on the first yq invocation. The version reported by yq --version is: yq 3.4.3

There is another yq project written in Go (github page) which is what the bats test suite expects. For that one, yq --version reports:

yq (https://github.com/mikefarah/yq/) version v4.44.3

To install the "correct" yq on Linux Ubuntu:

The dependency on yq is mentioned in:

  • scripts/bats/test/libs/dependencies.bash : apk add yq
  • scripts/localdev/configuration/bats/Dockerfile: RUN apk add postgresql-client yq

Indeed Alpine Linux provides an yq package except that it exists in the v3.15 branch, but not in the more recent branches. These have two distinct yq-go and yq-python packages.

It probably implies that apk add yq will fail to work with more recent Alpine versions.

I suggest to get rid of the yq dependency if possible.

@dverite dverite added the bug Something isn't working label Oct 3, 2024
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
None yet
Development

No branches or pull requests

1 participant