grafana / k6x

Run k6 with extensions
GNU Affero General Public License v3.0
13 stars 3 forks source link

Output extensions not detected in CLI #31

Open realviktornedelko opened 9 months ago

realviktornedelko commented 9 months ago

Brief summary

When providing -o output-prometheus-pushgateway flag same output as with out-of-the-box k6 is received.

k6 version

v0.49.0

xk6-dashboard version

N/A

OS

macOS 14.2.1 (23C71)

Docker version and image (if applicable)

szkiba/k6x

Steps to reproduce the problem

@ type of preconditions were tested:

  1. Gitlab CI with image: szkiba/k6x
  2. Local install of go install github.com/szkiba/k6x@latest and even go install github.com/szkiba/k6x@latest --with github.com/martymarron/xk6-output-prometheus-pushgateway@latest

Run a script with -o output-prometheus-pushgateway flag. E.g: k6x run dist/discovery/temp-test.js -o output-prometheus-pushgateway or k6x run -o output-prometheus-pushgateway dist/discovery/temp-test.js

P.S. If I run ./k6 run dist/discovery/temp-test.js -o output-prometheus-pushgateway after generating a binary locally using the bundle builder: xk6 build v0.49.0 --with github.com/martymarron/xk6-output-prometheus-pushgateway it works as expected.

Expected behaviour

Output extension is detected from command line and necessary package is involved

Actual behaviour

time="2024-02-07T09:44:24Z" level=error msg="invalid output type 'output-prometheus-pushgateway', available types are: cloud, csv, experimental-prometheus-rw, influxdb, json, statsd, web-dashboard"