Chaostoolkit-lib

Latest version: v1.44.0

Safety actively analyzes 681866 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 14 of 19

0.21.0

Added

- add [codecov][] integration
- add a new `"deviated"` flag to the journal to signal when the experiment ran
fully but the steady state deviated after the experimental method was
executed
- add a new `RunFlowEvent.RunDeviated` declaration which can be used to
signal when the experiment deviated. This can be sent in addition to the
other events. This would allow subscribers to be notified when an experiment
failed because the system deviated, while not being notified for any other
failures that aborted the experiment run altogether [56][56]
- attempt to detect the encoding of the stdout/stderr streams of the process
activities. This is only the case when either the [chardet][] or [cchardet][]
packages are installed. When decoding does fail, raise an `ActivityFailed`
exception

[codecov]: https://codecov.io/gh/chaostoolkit/chaostoolkit-lib
[56]: https://github.com/chaostoolkit/chaostoolkit/issues/56
[chardet]: https://chardet.readthedocs.io/en/latest/
[cchardet]: https://github.com/PyYoshi/cChardet

Changed

- wording of the messages when the experiment deviated [56][56]

0.20.1

Changed

- Pass an `Accept: application/json, application/x+yaml` header when fetching
the experiment over HTTP

0.20.0

Changed

- renamed `FailedActivity` to a more active style: `ActivityFailed` [17][17]

[17]: https://github.com/chaostoolkit/chaostoolkit-lib/issues/17

Added

- support for the `extensions` block. A sequence of extension objects which are
free to contain any piece of data they need. Their only mandatory property
is a `name` [60][60]
- support for loading experiments from a remote endpoint using the HTTP protocol
is now supported [53][53]. Note that we do not perform any validation that
the endpoint is safe, it's up to the user to be careful here (for instance
by downloading the experiment using curl and reviewing it). We also do not
tolerate self-signed endpoints for now.
- added an `auths` entry to the settings file so that it can be used when
loading from a remote endpoint that requires credentials. For now, the
credentials should be manually added but this may be addressed when [65][65]
is tackled, below is an example of such an entry:

yaml
auths:
mydomain.com:
type: basic
value: XYZ
otherdomain.com:
type: bearer
value: UIY
localhost:8081:
type: digest
value: UIY


[53]: https://github.com/chaostoolkit/chaostoolkit/issues/53
[60]: https://github.com/chaostoolkit/chaostoolkit/issues/60
[65]: https://github.com/chaostoolkit/chaostoolkit/issues/65

0.19.0

0.17.0

Added

- Experiments can now be loaded from YAML as well [54][54]

[54]: https://github.com/chaostoolkit/chaostoolkit/issues/54

0.16.0

Changed

- HTTP provider can pass request body as JSON when
`"Content-Type: application/json"` is passed in the `headers` object of
the provider
- Process provider can also take its arguments as a string now so you can pass
the command line arguments as-is. This is needed because some commands do not
respect POSIX and this fails with Python subprocess
- Output a dict from process probes, with keys 'status', 'stdout' and 'stderr'.
This is a first step to better tolerance checks on process probes. [21][21]
- Tolerance is richer now as well. If you provide a dictionary, it won't be
considered only as a new probe to run. Instead, it will look for the `type`
key. It's a follow-up of [21][21]:

- if type is `"probe"`, then it is considered a new probe to run as usual,
and the status of the probe makes the status of the tolerance.
- if type is `"regex"`, then a `pattern` key must also be present with
a valid [Python regex][re]. If a `target` key is also present, it must
indicate where to find the content to search for in the tested value.
If the tested value comes from a process probe, the `target` key must be
either `"stdout"` or `"stderr"`. If it is a HTTP probe, the `target` key
must be `"body"`. In all other cases, the tested value is checked as-is.
- if type is `"jsonpath"`, then a `path` key must also be present with
a valid [JSON Path][jp]. If a `target` key is also present, it must
indicate where to find the content to search for in the tested value.
If the tested value comes from a process probe, the `target` key must be
either `"stdout"` or `"stderr"`. If it is a HTTP probe, the `target` key
must be `"body"`. In all other cases, the tested value is checked as-is.
Note that, when the tested value is a string (no matter where read from),
we try to parse it as a JSON payload first.
Finally, you can provide a ̀`count` key as well, there are exactly that
number of matches.


[21]: https://github.com/chaostoolkit/chaostoolkit/issues/21
[re]: https://docs.python.org/3/library/re.html#module-re
[jp]: https://github.com/h2non/jsonpath-ng

Page 14 of 19

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.