-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add experiment requirements #450
Conversation
52f1d86
to
1b528d0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few things to improve but otherwise the changes in this PR look great! In addition to the comments I left it would be nice if the latest agent capabilities were recorded in the agents
table and displayed in the agents page of the UI.
If we want to persist agent capabilities to the database, maybe the agent should post its capabilities at start-up when doing |
Yeah sure, you can post them on |
1b528d0
to
afd1987
Compare
2bf618f
to
fd7e526
Compare
Okay, I add a normalized With the exception of including agent capabilities in their HTML status page, all of your previous concerns should be resolved. I changed Also, I'm not quite sure how to handle requirements for |
fd7e526
to
620d848
Compare
These capabilities will then be checked against the requirements of queued experiments to determine which experiment is returned by `/next-experiment`.
620d848
to
7f74c85
Compare
e1effb4
to
e0d56f7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the current code looks good! Once the capabilities are added to the HTML page I think we're ready to merge this!
Not that much :D
Having the CLI ignoring requirements is fine, as requirements don't really make sense in a CLI environment. |
@pietroalbini Capabilities are now rendered to the status page. I based |
242fe99
to
7777fea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Other than the minor nit this is ready to be merged.
Thanks ❤️ @bors r+ |
📌 Commit d54cd7f has been approved by |
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
☀️ Test successful - checks-travis, status-appveyor |
…troalbini Render experiment requirements in UI Extends #450 to display experiment requirements in the web UI for both the queue (`/`) and the page for each experiment (`/ex/ex-name`).
Resolves #430.
This adds a
requirement
field toExperiment
, 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. fromcraterbot
) have thelinux
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 thelinux
requirement and once with thewindows
requirement. Perhaps later we could add some sugar for this?r? @pietroalbini