From a159e759af1b99b0cc81bea21d06d12c89288ce5 Mon Sep 17 00:00:00 2001 From: Andrew Bayer Date: Wed, 13 Oct 2021 15:14:43 -0400 Subject: [PATCH] Update comment for `dag.GetSchedulable` The comment still described its return as a map, but in #2909, that was changed to a `sets.String`. When I happened to stumble across this while looking into something else, I thought "hey, this should probably be updated to be accurate!" Signed-off-by: Andrew Bayer --- pkg/reconciler/pipeline/dag/dag.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/reconciler/pipeline/dag/dag.go b/pkg/reconciler/pipeline/dag/dag.go index abd2d3d2297..0af21a59540 100644 --- a/pkg/reconciler/pipeline/dag/dag.go +++ b/pkg/reconciler/pipeline/dag/dag.go @@ -88,11 +88,11 @@ func Build(tasks Tasks, deps map[string][]string) (*Graph, error) { return d, nil } -// GetSchedulable returns a map of PipelineTask that can be scheduled (keyed -// by the name of the PipelineTask) given a list of successfully finished doneTasks. -// It returns tasks which have all dependencies marked as done, and thus can be scheduled. If the -// specified doneTasks are invalid (i.e. if it is indicated that a Task is -// done, but the previous Tasks are not done), an error is returned. +// GetSchedulable returns a set of PipelineTask names that can be scheduled, +// given a list of successfully finished doneTasks. It returns tasks which have +// all dependencies marked as done, and thus can be scheduled. If the specified +// doneTasks are invalid (i.e. if it is indicated that a Task is done, but the +// previous Tasks are not done), an error is returned. func GetSchedulable(g *Graph, doneTasks ...string) (sets.String, error) { roots := getRoots(g) tm := sets.NewString(doneTasks...)