Skip to content

Specify multiple plugin names separated by comma doesn't work #4486

@Amerousful

Description

@Amerousful

Have you read the documentation?

URL

https://www.sitespeed.io/

What are you trying to accomplish

I had tried to pass multiple plugins and it failed.

Documentation:

--plugins.add     
Extra plugins that you want to run. Relative or absolute path to the plugin.
Specify multiple plugin names separated by comma, or repeat the --plugins.add option

There's mention two possible options how to pass multiply plugins.

  1. separated by comma or 2. repeat the flag

If pass like this, separated by comman [email protected]/plugin-influxdb,@sitespeed.io/plugin-lighthouse it fails

What browser did you use?

Chrome

How to reproduce

*Pre-condition: Run docker-compose with InfluxDB

If chose to repeat option and pass each plugin separatly - it works as expected

docker run --net host --rm --name sitespeed_test \
  -v "$(pwd):/sitespeed.io" \
  sitespeedio/sitespeed.io:37.3.0-plus1 \
  https://www.sitespeed.io/ \
  --n 1 \
  [email protected]/plugin-influxdb \
  [email protected]/plugin-lighthouse \
  --influxdb.host 127.0.0.1 \
  --influxdb.port 8087 \
  --influxdb.version 2 \
  --influxdb.organisation sitespeed \
  --influxdb.token sitespeed

But if pass as a string with separated plugins by comma:

docker run --net host --rm --name sitespeed_test \
  -v "$(pwd):/sitespeed.io" \
  sitespeedio/sitespeed.io:37.3.0-plus1 \
  https://www.sitespeed.io/ \
  --n 1 \
  --plugins.add="@sitespeed.io/plugin-influxdb,@sitespeed.io/plugin-lighthouse" \
  --influxdb.host 127.0.0.1 \
  --influxdb.port 8087 \
  --influxdb.version 2 \
  --influxdb.organisation sitespeed \
  --influxdb.token sitespeed

Log output

ERROR: Error: Required option(s) [ '"database"' ] need to be specified in namespace "influxdb"
    at throwIfMissing (file:///usr/local/lib/node_modules/@sitespeed.io/plugin-influxdb/lib/util.js:134:11)
    at InfluxDBPlugin.open (file:///usr/local/lib/node_modules/@sitespeed.io/plugin-influxdb/lib/index.js:21:5)
    at file:///usr/src/app/lib/sitespeed.js:50:47
    at Array.map (<anonymous>)
    at runOptionalFunction (file:///usr/src/app/lib/sitespeed.js:50:6)
    at run (file:///usr/src/app/lib/sitespeed.js:147:7)
    at async start (file:///usr/src/app/bin/sitespeed.js:147:22)
    at async file:///usr/src/app/bin/sitespeed.js:203:1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions