Skip to content

Commit

Permalink
fix: missing caller for ray to init images
Browse files Browse the repository at this point in the history
Signed-off-by: Wen Zhou <wenzhou@redhat.com>
  • Loading branch information
zdtsw committed Oct 31, 2024
1 parent a1f0e62 commit 5eeddd1
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"flag"
"os"

"github.com/hashicorp/go-multierror"
addonv1alpha1 "github.com/openshift/addon-operator/apis/addons/v1alpha1"
ocappsv1 "github.com/openshift/api/apps/v1" //nolint:importas //reason: conflicts with appsv1 "k8s.io/api/apps/v1"
buildv1 "github.com/openshift/api/build/v1"
Expand Down Expand Up @@ -111,8 +112,16 @@ func init() { //nolint:gochecknoinits
utilruntime.Must(securityv1.Install(scheme))
}

func initComponents(_ context.Context, p cluster.Platform) error {
return dashboardctrl.Init(p)
func initComponents(_ context.Context, p cluster.Platform) *multierror.Error {
var multiErr *multierror.Error

if err := dashboardctrl.Init(p); err != nil {
multiErr = multierror.Append(multiErr, err)
}
if err := rayctrl.Init(p); err != nil {
multiErr = multierror.Append(multiErr, err)
}
return multiErr
}

func main() { //nolint:funlen,maintidx
Expand Down Expand Up @@ -172,7 +181,7 @@ func main() { //nolint:funlen,maintidx
release := cluster.GetRelease()
platform := release.Name

if err := initComponents(ctx, platform); err != nil {
if err := initComponents(ctx, platform).ErrorOrNil(); err != nil {
setupLog.Error(err, "unable to init components")
os.Exit(1)
}
Expand Down

0 comments on commit 5eeddd1

Please sign in to comment.