Please sign in to comment.
Auto merge of #450 - ecstatic-morse:capabilities, r=pietroalbini
Add experiment requirements Resolves #430. This adds a `requirement` field to `Experiment`, which specifies what requirements (if any) an agent must meet to run that experiment. Requirements are not structured, they are simply strings which are compared for equality. Agents advertise what requirements they meet via the request body when getting their configuration from the `/config` endpoint. Only experiments whose requirements are a subset of an agent's capabilities can be assigned to that agent. By default, experiments created via the CLI have no requirements--they can be run on any machine--and ones created via webhook (e.g. from `craterbot`) have the `linux`requirement--they must be run on a Linux machine. For now, an experiment can have zero or one requirements. In the future, we may want to allow experiments to have an arbitrary number of requirements, and only agents which match all of them will be selected to run that experiment. This would require an additional table however. For a crater run to be scheduled on both a Linux and Windows agent, you'll need to invoke `craterbot` twice, once with the `linux` requirement and once with the `windows` requirement. Perhaps later we could add some sugar for this? r? @pietroalbini
- Loading branch information...
Showing with 439 additions and 63 deletions.
- +25 −8 docs/agent-http-api.md
- +11 −0 docs/bot-usage.md
- +10 −2 src/actions/experiments/create.rs
- +15 −0 src/actions/experiments/edit.rs
- +4 −2 src/agent/api.rs
- +61 −4 src/agent/mod.rs
- +48 −1 src/cli.rs
- +26 −0 src/db/migrations.rs
- +18 −4 src/db/mod.rs
- +114 −27 src/experiments.rs
- +1 −0 src/report/mod.rs
- +61 −12 src/server/agents.rs
- +20 −2 src/server/routes/agent.rs
- +9 −0 src/server/routes/ui/agents.rs
- +2 −0 src/server/routes/webhooks/args.rs
- +5 −0 src/server/routes/webhooks/commands.rs
- +1 −1 src/server/try_builds.rs
- +8 −0 templates/ui/agents.html
Oops, something went wrong.