Skip to content

Configuration files require the main experiment file to have the keys from the configurations. #203

Description

@WixoLeo

Fantastic day!

There is a little issue with the configurations.

For example I have this experiment.json

{
  "version": "1.0.0",
  "title": "test",
  "description": "test",
  "configuration": {
    "myarg": "exp.json",
    "another_arg": "" // Must be included to work
  },
  "tags": [
    "network",
    "lala"
  ],
  "steady-state-hypothesis": {
    "title": "Check something",
    "probes": [
      {
        "name": "My probe",
        "description": "My best probe",
        "tolerance": {
          "type": "regex",
          "pattern": "exp.json",
          "target": "stdout"
        },
        "type": "probe",
        "provider": {
          "type": "process",
          "path": "echo",
          "arguments": "${myarg}"
        }
      },
      {
        "name": "My probe",
        "description": "My best probe",
        "tolerance": {
          "type": "regex",
          "pattern": "another.json",
          "target": "stdout"
        },
        "type": "probe",
        "provider": {
          "type": "process",
          "path": "echo",
          "arguments": "${another_arg}"
        }
      }
    ]
  },
  "method": [],
  "rollbacks": []
}

And var-file:

{
  "configuration": {
    "another_arg": "another.json"
  }
}

Launching via chaos run exp.json --var-file config.json
So the experiment works right now, but when you have a big configuration, it's quite annoying have to place empty values to the config keys. Why not to just exclude them? So that if I provide "another_arg" from config.json, I don't have to place an empty one in the experiment.json.

Our suggestion: If none of the configurations contain such attribute, only then raise an error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions