diff --git a/cmd/monaco/deploy/deploy.go b/cmd/monaco/deploy/deploy.go index 9611159b6..3378b11bd 100644 --- a/cmd/monaco/deploy/deploy.go +++ b/cmd/monaco/deploy/deploy.go @@ -253,7 +253,8 @@ func validateAuthenticationWithProjectConfigs(projects []project.Project, loaded for envName, env := range p.Configs { for _, conf := range env { switch conf[0].Type.(type) { - case config.ClassicApiType: + case config.ClassicApiType, + config.SettingsType: if loadedManifest.Environments[envName].Auth.Token == nil && conf[0].Skip == false { return fmt.Errorf("API: %s requires token", conf[0].Type) } @@ -264,20 +265,6 @@ func validateAuthenticationWithProjectConfigs(projects []project.Project, loaded } } } - /*p.ForEveryConfigDo(func(c config.Config) { - switch c.Type.(type) { - case config.ClassicApiType: - if loadedManifest.Environments[c.Environment].Auth.Token == nil && c.Skip == false { - err = fmt.Errorf("API: %s requires token", c.Type) - return - } - default: - if loadedManifest.Environments[c.Environment].Auth.OAuth == nil && c.Skip == false { - err = fmt.Errorf("API: %v requires oAuth", c.Type) - return - } - } - })*/ } return nil } diff --git a/pkg/delete/delete.go b/pkg/delete/delete.go index b6c4398bc..1e37be9a4 100644 --- a/pkg/delete/delete.go +++ b/pkg/delete/delete.go @@ -64,7 +64,7 @@ func Configs(ctx context.Context, clients ClientSet, _ api.APIs, automationResou automationTypeOrder := []config.AutomationResource{config.Workflow, config.SchedulingRule, config.BusinessCalendar} for _, key := range automationTypeOrder { entries := copiedDeleteEntries[string(key)] - if clients.Automation == nil { + if clients.Automation == (*coreAutomation.Client)(nil) { log.WithCtxFields(ctx).WithFields(field.Type(key)).Warn("Skipped deletion of %d Automation configuration(s) of type %q as API client was unavailable.", len(entries), key) delete(copiedDeleteEntries, string(key)) continue