sitespeedio / sitespeedio/sitespeed.io
Specify multiple plugin names separated by comma doesn't work
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 5k
- Forks
- 624
- Avg merge
- 4h 8m
- Merged PRs (30d)
- 2
Description
Have you read the documentation?
- Yes, I've read the how to make a reproducable bug guide
- Yes, I've read the how to debug my script guide
URL
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.
- separated by comma or 2. repeat the flag
If pass like this, separated by comman -plugins.add=@sitespeed.io/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 \
--plugins.add=@sitespeed.io/plugin-influxdb \
--plugins.add=@sitespeed.io/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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the plugin-loading path in lib/sitespeed.js and the command entry point in bin/sitespeed.js, then reproduce the two docker commands using the comma-separated and repeated --plugins.add forms. Confirm the fix by verifying that the comma-separated invocation loads both plugins without the reported missing-option error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, javascript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100