chaostoolkit-incubator / chaostoolkit-reliably Goto Github PK
View Code? Open in Web Editor NEWReliably extension for the Chaos Toolkit
License: Apache License 2.0
Reliably extension for the Chaos Toolkit
License: Apache License 2.0
When testing out the extension, I found that the last control (after_experiment_control
) fails due to Reliably failing because of:
time="2021-10-07T14:19:33+01:00" level=error msg="datastore: datastore: string property too long to index for a Property with Name \"ctk_event_output\" for a Property with Name \"Labels\"" correlation-id=XO5SPyTsqjAWnL16ZAJxYyg
Google Datastore has a property size limit of 1500 bytes, which something like the following is well over:
{"chaoslib-version": "1.22.1", "platform": "macOS-11.5.1-x86_64-i386-64bit", "node": "Ciarans-Reliably-Mac.local", "experiment": {"title": "A Healthy Service", "description": "Sends Reliably `Good` Indicators to mimic a healthy service", "method": [{"type": "action", "name": "send_good_indicator", "provider": {"type": "python", "module": "reliability_utils", "func": "send_good_indicator", "arguments": {}}}], "secrets": {"reliably": {"token": {"type": "env", "key": "RELIABLY_TOKEN"}, "org": {"type": "env", "key": "RELIABLY_ORG"}, "host": {"type": "env", "key": "RELIABLY_HOST"}}, "other-stuff": {"hey": "hi"}}, "controls": [{"name": "chaosreliably", "provider": {"type": "python", "module": "chaosreliably.controls.experiment", "arguments": {"commit_hash": "59f9f577e2d90719098f4d23d26329ce41f2d0bd", "source": "https://github.com/chaostoolkit-incubator/chaostoolkit-reliably/exp.json", "user": "Ciaran Evans", "experiment_related_to_labels": [{"name": "99.9% of our requests are in the 2xx class", "service": "exploring-reliability-guide-service"}]}}}], "dry": null}, "start": "2021-10-07T13:19:33.243258", "status": "completed", "deviated": false, "steady_states": {"before": null, "after": null, "during": []}, "run": [{"activity": {"type": "action", "name": "send_good_indicator", "provider": {"type": "python", "module": "reliability_utils", "func": "send_good_indicator", "arguments": {}}}, "output": null, "status": "succeeded", "start": "2021-10-07T13:19:33.622436", "end": "2021-10-07T13:19:33.703516", "duration": 0.08108}], "rollbacks": [], "end": "2021-10-07T13:19:33.929326", "duration": 0.7126741409301758}
We should probably have a think about what we want to store from this state (and any others actually, that are significantly bigger than this). This experiment was incredibly simple too, so these will only get bigger.
This solution would basically piggy back off what currently happens when you run an experiment, we could not dump all states, instead just including the filename/path on disk to the journal once the experiment is run?
Similar to the above, we could just provide the big 3 players (AWS/Azure/GCP) support for uploading to a file store and referencing that in the label of the entity.
As each Method run, SSH run etc already outputs their outputs via events, the after_experiment_control
is just outputting the same data, with a few extra pieces of metadata (platform, chaoslib version etc.), we could just only select the data not already captured higher up the events chain...
When an experiment with a top level entry of:
"secrets": {
"reliably": {
"host": "a-host"
}
}
And action entry of:
"provider": {
"type": "python",
"module": "chaosreliably.slo.probes",
"func": "get_last_N_slos",
"arguments": {
"quantity": 1
},
"secrets": ["reliably"]
},
Is provided, the get_auth_info
function mistakenly tries to do:
reliably_secrets = secrets.get("reliably", {})
This always results in reliably_secrets={}
because secrets={"host": "a-host"}
.
The block here https://github.com/chaostoolkit-incubator/chaostoolkit-reliably/blob/master/chaosreliably/__init__.py#L81-L83 should instead be:
secrets = secrets or {}
reliably_token = secrets.get("token")
reliably_host = secrets.get("host")
Currently the docstrings have the module listed as:
"module": "chaosreliably.controls",
This should be:
"module": "chaosreliably.controls.experiment",
As the controls aren't found otherwise.
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.