Git Product home page Git Product logo

chaostoolkit-reliably's People

Contributors

charliemoon37 avatar ciaranevans avatar lawouach avatar

Watchers

 avatar  avatar  avatar  avatar

chaostoolkit-reliably's Issues

Journal state is too large for a Reliably Label

Problem

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.

Possible solutions

Serialise the large outputs to disc

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?

Serialise the large outputs to cloud storage

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.

Just subset the data to things not already captured

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...

`get_auth_info` in `chaosreliably.__init__.py` tries to reference a non-existent key

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")

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.