Skip to content
Permalink
Browse files

Auto merge of #486 - pietroalbini:fix-failure-loop, r=pietroalbini

experiments: fix failed experiment being returned

We had an issue a few days ago where an experiment failed to start (due to a wrong rustup toolchain name), and the server kept assigning it to agents even though it was marked as failed. That caused hundreds of comments being posted on the GitHub issue, before the experiment was aborted.

This PR fixes the issue by ensuring the experiment's status is "running" before giving it to agents.

r? @Zeegomo
  • Loading branch information...
bors committed Nov 4, 2019
2 parents 972d944 + 841559f commit 0904ddabcdd862a44bd7dc2e832882e69fd7e47b
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/experiments.rs
@@ -284,7 +284,8 @@ impl Experiment {
"SELECT * FROM experiments \
INNER JOIN experiment_crates ON experiment_crates.experiment \
= experiments.name WHERE experiment_crates.assigned_to = ?1 \
AND experiment_crates.status = ?2 AND experiment_crates.skipped = 0 LIMIT 1",
AND experiment_crates.status = ?2 AND experiments.status = ?2 \
AND experiment_crates.skipped = 0 LIMIT 1",
&[&assignee.to_string(), Status::Running.to_str()],
|r| ExperimentDBRecord::from_row(r),
)?;

0 comments on commit 0904dda

Please sign in to comment.
You can’t perform that action at this time.