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

chaos report crashes when using a ref in method #17

Open
zeisss opened this issue Nov 24, 2018 · 0 comments
Open

chaos report crashes when using a ref in method #17

zeisss opened this issue Nov 24, 2018 · 0 comments

Comments

@zeisss
Copy link

zeisss commented Nov 24, 2018

$ docker run     --user $(id -u)     -v $(pwd):/tmp/result     -it     chaostoolkit/reporting report journal.json  out.txt
Traceback (most recent call last):
  File "/usr/local/bin/chaos", line 11, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/chaosreport/cli.py", line 31, in report
    reports.append(generate_report(journal, export_format))
  File "/usr/local/lib/python3.6/site-packages/chaosreport/__init__.py", line 227, in generate_report
    filter(lambda a: a["type"] == "probe", experiment["method"])))
  File "/usr/local/lib/python3.6/site-packages/chaosreport/__init__.py", line 227, in <lambda>
    filter(lambda a: a["type"] == "probe", experiment["method"])))
KeyError: 'type'

Looking at experiment["method"] in my journal.json I notice that there is one element having no type:

<snip>
    "method": [
      {
        "ref": "get consul proxy state"
      },
<snip>

Removing the ref probe fixes the crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant