Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blacklistIPs JS configuration isn't parsed correctly, pt. 2 #2083

Closed
imiric opened this issue Jul 5, 2021 · 0 comments · Fixed by #2085
Closed

blacklistIPs JS configuration isn't parsed correctly, pt. 2 #2083

imiric opened this issue Jul 5, 2021 · 0 comments · Fixed by #2085
Assignees
Milestone

Comments

@imiric
Copy link
Contributor

imiric commented Jul 5, 2021

We recently noticed an error parsing the blacklistIPs option in the Cloud, see https://loadimpact.slack.com/archives/CM53T6UFJ/p1625472145025000.

The error is:

json: cannot unmarshal object into Go struct field Options.options.blacklistIPs of type *lib.IPNet

This is similar to #973, but it seems #1004 didn't fully address the issue and we might also need a MarshalText() implementation.

Environment

  • k6 version: v0.33.0
  • OS and version: k6 Cloud
  • Docker version and image, if applicable: N/A

Expected Behavior

The option shouldn't cause an Aborted by script error and should work in the Cloud as well.

Actual Behavior

The test run is Aborted by script.

Steps to Reproduce the Problem

Run a script like the following in the Cloud (via the web UI):

import { sleep } from 'k6';

export const options = {
  blacklistIPs: ['10.0.0.0/8'],
  vus: 1,
  duration: '30s',
}

export default function () {
  sleep(30);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants