You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
sudo snap install yq is not adequate because binaries run within snap have their own private /tmp, and the bats test suite creates config files in the system-wide /tmp.
Compiling from source after git clone https://github.com/mikefarah/yq did not work me, failing with Go compilation error.
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.
The text was updated successfully, but these errors were encountered:
The bats test suite uses
yq
to manipulate yaml files (it's likejq
but knowing the yaml format).It's mentioned in
CONTRIBUTING.md
withbrew install yq
as the command.It should be noted that there are different
yq
packages:Ubuntu 23 or newer ship an
yq
package with anyq
command that is a Python wrapper on top ofjq
. It can also be installed withpip3 install yq
. With this flavor ofyq
, the bats test suite fails with a syntax error on the firstyq
invocation. The version reported byyq --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:To install the "correct"
yq
on Linux Ubuntu:sudo snap install yq
is not adequate because binaries run within snap have their own private/tmp
, and the bats test suite creates config files in the system-wide/tmp
.git clone https://github.com/mikefarah/yq
did not work me, failing with Go compilation error.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
andyq-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.The text was updated successfully, but these errors were encountered: