Summary should detect "completed" experiments
@@ -33,6 +33,7 @@ const (
ExperimentEmpty = "Never run" // TODO This is misleading, it could be that we already deleted the trials that ran
ExperimentIdle = "Idle"
ExperimentRunning = "Running"
+ ExperimentCompleted = "Completed"
TrialCreated TrialSummary = "Created"
TrialSetupCreated = "Setup Created"
@@ -81,7 +82,12 @@ func NewExperimentStatusSummary(experiment *v1alpha1.Experiment, trialList *v1al
// The order if this if/else block is very specific
if experiment.GetReplicas() == 0 {
+ if experiment.Annotations[v1alpha1.AnnotationExperimentURL] != "" && experiment.Annotations[v1alpha1.AnnotationNextTrialURL] == "" {
+ // If the "next trial URL" has been removed, we probably hit the end of the experiment
+ s.Status = ExperimentCompleted
+ } else {
s.Status = ExperimentPaused
+ }
} else if len(trialList.Items) == 0 {
s.Status = ExperimentEmpty
} else if s.ActiveCount == 0 {
