diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index eba6617a1..9b048ed96 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -75,8 +75,6 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v2 - with: - submodules: true - name: Cache Go Dependencies uses: actions/cache@v2 diff --git a/pkg/controller/core.oam.dev/v1alpha2/applicationconfiguration/apply.go b/pkg/controller/core.oam.dev/v1alpha2/applicationconfiguration/apply.go index 854541c4e..697a60659 100644 --- a/pkg/controller/core.oam.dev/v1alpha2/applicationconfiguration/apply.go +++ b/pkg/controller/core.oam.dev/v1alpha2/applicationconfiguration/apply.go @@ -83,6 +83,9 @@ type workloads struct { } func (a *workloads) Apply(ctx context.Context, status []v1alpha2.WorkloadStatus, w []Workload, ao ...apply.ApplyOption) error { + if len(w) == 0 { + return errors.New("The number of workloads in appConfig is 0 ") + } // they are all in the same namespace var namespace = w[0].Workload.GetNamespace() for _, wl := range w {