grafana / xk6

Build k6 with extensions
Apache License 2.0
201 stars 20 forks source link

git not found error when building k6 via xk6 docker image and including sql extension #103

Closed dennislefever closed 1 month ago

dennislefever commented 3 months ago

Get the following error when building using the xk6 docker image:

go: errors parsing go.mod:
go.mod:5: git init --bare in /go/pkg/mod/cache/vcs/7f51e6d9fcff52165040e226b11ec63a94d49f901bb4063780ffab7eaff6a1ce: exec: "git": executable file not found in $PATH

using the command

docker run --rm -it -e GOOS=darwin -u "$(id -u):$(id -g)" -v "${PWD}:/xk6" \
  grafana/xk6 build v0.51.0 \
  --with github.com/szkiba/xk6-sql@0.4.0

able to successfully build k6 without the sql extension using

docker run --rm -it -e GOOS=darwin -u "$(id -u):$(id -g)" -v "${PWD}:/xk6" \
  grafana/xk6 build v0.51.0

Docker version 26.0.0, build 2ae903e MacOS Sonoma Version 14.4.1 (23E224) - M1 chip

pablochacin commented 1 month ago

@dennislefever The problem seems to be produced because the extension github.com/szkiba/xk6-sql does not exist. The following command works:

docker run --rm -it -e GOOS=darwin -u "$(id -u):$(id -g)" -v "${PWD}:/xk6" \
  grafana/xk6 build v0.51.0 \
  --with github.com/grafana/xk6-sql@0.4.0
pablochacin commented 1 month ago

Transfered issue to grafana/xk6 as the problem is not specific of xk6-sql but to xk6

pablochacin commented 1 month ago

104 solves the issue with git not found