GoogleCloudPlatform / GoogleCloudPlatform/PerfKitBenchmarker

./pkb --helpxml fails

Open
#766 0 comments 0 reactions 0 assignees View on GitHub
enhancement P1
Dominant language
Python
Stars
2k
Forks
562
Avg merge
4h 55m
Merged PRs (30d)
69

Description

Aiming to create a nicely markdown formatted documentation for all `pkb` options, I thought a good idea would be to start from `--helpxml`, but it fails with error:

``` txt
Traceback (most recent call last):
File "./pkb.py", line 21, in
sys.exit(Main())
File "[edited]/perfkitbenchmarker/pkb.py", line 588, in Main
argv = FLAGS(argv) # parse flags
File "[edited]/perfkitbenchmarker/context.py", line 70, in f
return getattr(self._thread_flag_values, f_name)(*args, **kwargs)
File "[edited]/lib/python2.7/site-packages/gflags.py", line 1313, in __call__
flag.Parse(arg)
File "[edited]/lib/python2.7/site-packages/gflags.py", line 2412, in Parse
FLAGS.WriteHelpInXMLFormat(sys.stdout)
File "[edited]/lib/python2.7/site-packages/gflags.py", line 1743, in WriteHelpInXMLFormat
is_key=is_key, indent=indent)
File "[edited]/lib/python2.7/site-packages/gflags.py", line 1968, in WriteInfoInXMLFormat
default_serialized = self.serializer.Serialize(self.default)
File "[edited]/perfkitbenchmarker/flag_util.py", line 179, in Serialize
for val in il.groups])
AttributeError: 'list' object has no attribute 'groups'
```

I think the problem is caused by [the default value for fio_io_depths](https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/fio_benchmark.py#L108) which I think should be:

``` python
flag_util.DEFINE_integerlist('fio_io_depths', flag_util.IntegerList([1]),
...
```

Also, after this is fixed, other errors appear for list-type flags whose default value was specified as `None` instead of `[]`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.