chaostoolkit / chaostoolkit-reporting Goto Github PK
View Code? Open in Web Editor NEWReporting plugin for chaostoolkit journal results
License: Apache License 2.0
Reporting plugin for chaostoolkit journal results
License: Apache License 2.0
Snaptime is missing License and I can't procure chaostoolkit-reporting within my company. Is it possible to replace this package?
Since chaoslib 0.13.0, the reporting expects some new fields that didn't exist in the past. It should not die on that.
As per version 0.5.2...0.6.0 of the chaostoolkit-reporting repo, chaos-report.json
was renamed to journal.json
(as shown at: #9 but wasn't updated within the README.md where the commands stated:
chaos-report.json
report.htmlchaos-report.json
report.pdfhttps://github.com/chaostoolkit/chaostoolkit-reporting/blob/master/README.md
docker run --user id -u
-v pwd
:/tmp/result -it chaostoolkit/reporting -- report --export-format=html5 journal.json journal2.json report.html
[2018-12-06 16:26:25 WARNING]
There is a new version (1.0.0rc1) of the chaostoolkit available.
You may upgrade by typing:
$ pip install -U chaostoolkit
Please review changes at https://github.com/chaostoolkit/chaostoolkit/blob/master/CHANGELOG.md
Traceback (most recent call last):
File "/usr/local/bin/chaos", line 11, in
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 236, in generate_report
template = get_report_template(journal["chaoslib-version"])
File "/usr/local/lib/python3.6/site-packages/chaosreport/init.py", line 296, in get_report_template
**vinfo._asdict()))):
File "/usr/local/lib/python3.6/site-packages/semver.py", line 329, in match
cmp_res = compare(version, match_version)
File "/usr/local/lib/python3.6/site-packages/semver.py", line 282, in compare
v1, v2 = parse(ver1), parse(ver2)
File "/usr/local/lib/python3.6/site-packages/semver.py", line 65, in parse
raise ValueError('%s is not valid SemVer string' % version)
ValueError: 1.0.0rc1 is not valid SemVer string
After I install all the dependencies, and use a virtual environment, when trying to generate a report (chaos report
) I have the following problem:
Warning: entry point could not be loaded. Contact its author for help.
Traceback (most recent call last):
File "/Users/joaorosa/.venvs/chaostk/lib/python3.7/site-packages/click_plugins/core.py", line 37, in decorator
group.add_command(entry_point.load())
File "/Users/joaorosa/.venvs/chaostk/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2411, in load
return self.resolve()
File "/Users/joaorosa/.venvs/chaostk/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2417, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/Users/joaorosa/.venvs/chaostk/lib/python3.7/site-packages/chaosreport/__init__.py", line 16, in <module>
import cairosvg
File "/Users/joaorosa/.venvs/chaostk/lib/python3.7/site-packages/cairosvg/__init__.py", line 42, in <module>
from . import surface # noqa isort:skip
File "/Users/joaorosa/.venvs/chaostk/lib/python3.7/site-packages/cairosvg/surface.py", line 28, in <module>
from .defs import (
File "/Users/joaorosa/.venvs/chaostk/lib/python3.7/site-packages/cairosvg/defs.py", line 24, in <module>
from .bounding_box import calculate_bounding_box, is_non_empty_bounding_box
File "/Users/joaorosa/.venvs/chaostk/lib/python3.7/site-packages/cairosvg/bounding_box.py", line 26, in <module>
from .features import match_features
File "/Users/joaorosa/.venvs/chaostk/lib/python3.7/site-packages/cairosvg/features.py", line 25, in <module>
LOCALE = locale.getdefaultlocale()[0] or ''
File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/locale.py", line 568, in getdefaultlocale
return _parse_localename(localename)
File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/locale.py", line 495, in _parse_localename
raise ValueError('unknown locale: %s' % localename)
ValueError: unknown locale: UTF-8
What extra configuration is needed for the locale?
README.md file (https://github.com/chaostoolkit/chaostoolkit-reporting/blob/master/README.md) is not chronologically ordered.
Current Order:
chaostoolkit-reporting
docker
chaostoolkit-reporting
docker
Docker commands are also unclear as to what is a command and what is an output (https://github.com/chaostoolkit/chaostoolkit-reporting/blob/master/README.md#use-a-docker-container)
When trying to download a docker image at: https://github.com/chaostoolkit/chaostoolkit-reporting#download-a-docker-image it relies on docker being installed in a specific way which it doesn't explain
The current released package is missing the markdown template.
Can you confirm whether this works on Windows?
brew cask install ... method is now invalid
New format is: brew install ...
https://github.com/chaostoolkit/chaostoolkit-reporting/blob/master/osx-install.md
$ 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.
A part of chaostoolkit/chaostoolkit#31, the output file is now renamed from chaos-report.json
to journal.json
.
Update this package to mirror this change.
We are currently generate a Markdown report that feed into pandoc to generate any formats that pandoc knows about.
The downside is the heavy system dependencies this drags, mostly for PDF generation.
I wonder if we couldn't switch away from pandoc to native PDF/HTML generators, I'm assuming these are the two popular output formats.
Ideas of libs for PDF:
Hello,
Tested on Red Hat 7.7. For PDF reports.
After some times searching and debugging, I found that when installing that list of software, the reporting in pdf is working:
texlive-base
texlive-latex-fonts
texlive-latex-bin
texlive-latex
texlive-collection-fontsrecommended
pandoc
texlive-ec
texlive-pdftex-bin
texlive-pdftex-def
Maybe it would be a good idea to document it in the installation guide.:
https://docs.chaostoolkit.org/reference/usage/install/
All files within: https://github.com/chaostoolkit/chaostoolkit-reporting include a copy function for CLI Commands where the "$" is copied as well like it was previously in https://github.com/chaostoolkit/chaostoolkit-documentation
When using the report
command on mac os x, and having installed the following dependencies:
$ brew cask install mactex
$ brew install pandoc
$ brew install cairo
The report
plugin fails with the following message:
outputfile=outputfile, filters=filters)
File "/Users/russellmiles/.venvs/chaostk/lib/python3.6/site-packages/pypandoc/__init__.py", line 325, in _convert_input
'Pandoc died with exitcode "%s" during conversion: %s' % (p.returncode, stderr)
RuntimeError: Pandoc died with exitcode "2" during conversion: b'--smart/-S has been removed. Use +smart or -smart extension instead.\nFor example: pandoc -f markdown+smart -t markdown-smart.\nTry pandoc --help for more information.\n'
Using version of pandoc:
$ pandoc -v
pandoc 2.1.1
All contained within the README.md file at https://github.com/chaostoolkit/chaostoolkit-reporting/blob/master/README.md
The guide assumes you know how to install extensions from a requirements.txt file (https://github.com/chaostoolkit/chaostoolkit-reporting/blob/master/requirements.txt)
which contains dependencies
It also mentions that you will need to install pandoc
and a selection of other packages for pdf reports where this is already covered in another link on the document (https://github.com/chaostoolkit/chaostoolkit-reporting/blob/master/osx-install.md) which details the installation of both of these as well as cairo
When I generated the report I got the following error:
Warning: entry point could not be loaded. Contact its author for help.
Traceback (most recent call last):
File "/home/ubuntu/.venvs/chaostk/lib/python3.10/site-packages/click_plugins/core.py", line 37, in decorator
group.add_command(entry_point.load())
File "/usr/lib/python3.10/importlib/metadata/init.py", line 171, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 992, in _find_and_load_unlocked
File "", line 241, in _call_with_frames_removed
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/home/ubuntu/.venvs/chaostk/lib/python3.10/site-packages/chaosreport/init.py", line 15, in
import cairosvg
File "/home/ubuntu/.venvs/chaostk/lib/python3.10/site-packages/cairosvg/init.py", line 26, in
from . import surface # noqa isort:skip
File "/home/ubuntu/.venvs/chaostk/lib/python3.10/site-packages/cairosvg/surface.py", line 9, in
import cairocffi as cairo
File "/home/ubuntu/.venvs/chaostk/lib/python3.10/site-packages/cairocffi/init.py", line 47, in
cairo = dlopen(
File "/home/ubuntu/.venvs/chaostk/lib/python3.10/site-packages/cairocffi/init.py", line 44, in dlopen
raise OSError(error_message) # pragma: no cover
OSError: no library called "cairo-2" was found
no library called "cairo" was found
no library called "libcairo-2" was found
cannot load library 'libcairo.so.2': libcairo.so.2: cannot open shared object file: No such file or directory. Additionally, ctypes.util.find_library() did not manage to locate a library called 'libcairo.so.2'
cannot load library 'libcairo.2.dylib': libcairo.2.dylib: cannot open shared object file: No such file or directory. Additionally, ctypes.util.find_library() did not manage to locate a library called 'libcairo.2.dylib'
cannot load library 'libcairo-2.dll': libcairo-2.dll: cannot open shared object file: No such file or directory. Additionally, ctypes.util.find_library() did not manage to locate a library called 'libcairo-2.dll'
Issue
When I try to run chaos report
I got the following error:
Warning: entry point could not be loaded. Contact its author for help.
Traceback (most recent call last):
File "/Users/joaorosa/.venvs/chaostk/lib/python3.7/site-packages/click_plugins/core.py", line 37, in decorator
group.add_command(entry_point.load())
File "/Users/joaorosa/.venvs/chaostk/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2411, in load
return self.resolve()
File "/Users/joaorosa/.venvs/chaostk/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2417, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/Users/joaorosa/.venvs/chaostk/lib/python3.7/site-packages/chaosreport/__init__.py", line 16, in <module>
import cairosvg
File "/Users/joaorosa/.venvs/chaostk/lib/python3.7/site-packages/cairosvg/__init__.py", line 42, in <module>
from . import surface # noqa isort:skip
File "/Users/joaorosa/.venvs/chaostk/lib/python3.7/site-packages/cairosvg/surface.py", line 25, in <module>
import cairocffi as cairo
File "/Users/joaorosa/.venvs/chaostk/lib/python3.7/site-packages/cairocffi/__init__.py", line 50, in <module>
('libcairo.so', 'libcairo.2.dylib', 'libcairo-2.dll'))
File "/Users/joaorosa/.venvs/chaostk/lib/python3.7/site-packages/cairocffi/__init__.py", line 45, in dlopen
raise OSError(error_message) # pragma: no cover
OSError: no library called "cairo" was found
no library called "libcairo-2" was found
cannot load library 'libcairo.so': dlopen(libcairo.so, 2): image not found
cannot load library 'libcairo.2.dylib': dlopen(libcairo.2.dylib, 2): image not found
cannot load library 'libcairo-2.dll': dlopen(libcairo-2.dll, 2): image not found
Environment
1.3.0
When Python is installed using brew
on Mac, Matplotlib will complain about Python not being installed as a framework during the reporting installation.
(venv) ~/repos/chaostoolkit-documentation-code (master) $ chaos report --help
Usage: chaos report [OPTIONS]
Warning: entry point could not be loaded. Contact its author for help.
Traceback (most recent call last):
File "/Users/pauljones/repos/chaostoolkit-documentation-code/venv/lib/python3.6/site-packages/click_plugins/core.py", line 37, in decorator
group.add_command(entry_point.load())
File "/Users/pauljones/repos/chaostoolkit-documentation-code/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2318, in load
return self.resolve()
File "/Users/pauljones/repos/chaostoolkit-documentation-code/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2324, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/Users/pauljones/repos/chaostoolkit-documentation-code/venv/lib/python3.6/site-packages/chaosreport/__init__.py", line 20, in <module>
import matplotlib.pyplot as plt
File "/Users/pauljones/repos/chaostoolkit-documentation-code/venv/lib/python3.6/site-packages/matplotlib/pyplot.py", line 115, in <module>
_backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
File "/Users/pauljones/repos/chaostoolkit-documentation-code/venv/lib/python3.6/site-packages/matplotlib/backends/__init__.py", line 62, in pylab_setup
[backend_name], 0)
File "/Users/pauljones/repos/chaostoolkit-documentation-code/venv/lib/python3.6/site-packages/matplotlib/backends/backend_macosx.py", line 17, in <module>
from matplotlib.backends import _macosx
RuntimeError: Python is not installed as a framework. The Mac OS X backend will not be able to function correctly if Python is not installed as a framework. See the Python documentation for more information on installing Python as a framework on Mac OS X. Please either
reinstall Python as a framework, or try one of the other backends. If you are using (Ana)Conda please install python.app and replace the use of 'python' with 'pythonw'. See 'Working with Matplotlib on OSX' in the Matplotlib FAQ for more information.
Options:
--help Show this message and exit.
Installing all the right dependencies for the reporting plugin can be cumbersome. Provide a docker image for this instead.
I am trying to use below command on aws ec2 -x86_64 linux platform to generate pdf report but getting below error -
chaos report --export-format=pdf journal.json report.pdf
/home/ec2-user/.venvs/chaostk/lib64/python3.7/site-packages/dateparser/date_parser.py:35: PytzUsageWarning: The localize method is no longer necessary, as this time zone supports the fold attribute (PEP 495). For more details on migrating to a PEP 495-compliant implementation, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html
date_obj = stz.localize(date_obj)
Traceback (most recent call last):
File "/home/ec2-user/.venvs/chaostk/bin/chaos", line 8, in
sys.exit(cli())
File "/home/ec2-user/.venvs/chaostk/lib64/python3.7/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/home/ec2-user/.venvs/chaostk/lib64/python3.7/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/ec2-user/.venvs/chaostk/lib64/python3.7/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/ec2-user/.venvs/chaostk/lib64/python3.7/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/ec2-user/.venvs/chaostk/lib64/python3.7/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/ec2-user/.venvs/chaostk/lib64/python3.7/site-packages/chaosreport/cli.py", line 32, in report
save_report(header, reports, report_path, export_format)
File "/home/ec2-user/.venvs/chaostk/lib64/python3.7/site-packages/chaosreport/init.py", line 275, in save_report
extra_args=extra_args)
File "/home/ec2-user/.venvs/chaostk/lib64/python3.7/site-packages/pypandoc/init.py", line 153, in convert_file
cworkdir=cworkdir)
File "/home/ec2-user/.venvs/chaostk/lib64/python3.7/site-packages/pypandoc/init.py", line 405, in _convert_input
'Pandoc died with exitcode "%s" during conversion: %s' % (p.returncode, stderr)
RuntimeError: Pandoc died with exitcode "43" during conversion: Error producing PDF.
! LaTeX Error: File `iftex.sty' not found.
Type X to quit or to proceed,
or enter new name. (Default extension: sty)
Enter file name:
! Emergency stop.
<read *>
l.10 \ifPDFTeX
Hello team,
Earlier we used CENTOS7 and the reporting feature worked well but for RHEL8 instances we are getting error. All the dependencies were installed. Please help to resolve.
root@10-119-113-238:/apps/opt/addvol/dev/chaos # chaos report --export-format=html5 journal.json report.html
Traceback (most recent call last):
File "/usr/local/bin/chaos", line 8, in
sys.exit(cli())
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/chaosreport/cli.py", line 36, in report
reports.append(generate_report(journal, export_format))
File "/usr/local/lib/python3.9/site-packages/chaosreport/init.py", line 270, in generate_report
template = get_report_template(journal["chaoslib-version"])
File "/usr/local/lib/python3.9/site-packages/chaosreport/init.py", line 368, in get_report_template
"<={v}".format(v=semver.format_version(**vinfo._asdict())),
AttributeError: 'Version' object has no attribute '_asdict'
I see a crash while generating a report.
docker container run --volume $PWD:/tmp/result -it chaostoolkit/reporting -- report --export-format=pdf terminate-pod.json report-2.pdf
Any workaround for this?
Traceback (most recent call last):
File "/usr/local/bin/chaos", line 8, in
sys.exit(cli())
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/chaosreport/cli.py", line 37, in report
save_report(header, reports, report_path, export_format)
File "/usr/local/lib/python3.10/dist-packages/chaosreport/init.py", line 326, in save_report
pypandoc.convert_file(
File "/usr/local/lib/python3.10/dist-packages/pypandoc/init.py", line 168, in convert_file
return _convert_input(discovered_source_files, format, 'path', to, extra_args=extra_args,
File "/usr/local/lib/python3.10/dist-packages/pypandoc/init.py", line 426, in _convert_input
raise RuntimeError(
RuntimeError: Pandoc died with exitcode "43" during conversion: Error producing PDF.
! Undefined control sequence.
l.196 /supervisord.pid\n
In the report we should have some kind of metrics that indicates something like
the System (where we run experiment) is not scalable enough
or
Something like Current Architecture is not able to handle this situation and needs change.
or
Some other recommended Actions
Probe status is in the method flow, output is added into the appendix but there's no obvious reference/navigation between the two. I found this confusing.
It would be useful to create aggregated reports, that is, reports generated using many journal files from different experiments.
I think that running many experiments is a common usage pattern and that chaos run
and chaos report
should be able to work with wildcards somehow.
Option 1:
chaos run --journal-path journal.json my/experiments/*.json
chaos report --export-format=pdf journal.json journal.pdf
Option 2:
chaos run --journal-path journal-1.json my-experiment-1.json
chaos run --journal-path journal-2.json my-experiment-2.json
chaos report --export-format=pdf journal*.json journal.pdf
Describe the bug
Error in chaostoolkit-reporting mac installation steps listed here; installation instructions for basictex incorrect
Runtime versions
Python 3.8.8
CLI 1.9.0
Core library 1.19.0
To Reproduce
$ brew cask install basictex
Expected behavior
Installation of basictex
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.