Skip to content

Commit 003645f

Browse files
authored
Merge pull request #37 from valdar/alignment
Default deploy action to SortByApplyOrder and remove silent StopError swallowing
2 parents 09f82d9 + c7aeb66 commit 003645f

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

framework/controller/actions/deploy/action_deploy.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,9 @@ func WithSortFn(fn SortFn) ActionOpts {
164164
}
165165
}
166166

167-
// WithApplyOrder is a convenience option that sorts resources into
168-
// dependency order (CRDs first, webhooks last) before deploying.
167+
// WithApplyOrder explicitly sets SortByApplyOrder as the sort function.
168+
// This is now the default for NewAction, so callers only need this if
169+
// the default was previously overridden by WithSortFn(nil).
169170
func WithApplyOrder() ActionOpts {
170171
return WithSortFn(resources.SortByApplyOrder)
171172
}
@@ -617,6 +618,7 @@ func NewAction(opts ...ActionOpts) actions.Fn {
617618
partOfLabelDefault: DefaultPartOfLabelValue,
618619
annotationPrefix: DefaultAnnotationPrefix,
619620
managedByAnnotation: DefaultManagedByAnnotation,
621+
sortFn: resources.SortByApplyOrder,
620622
applyCustomizers: map[schema.GroupVersionKind]CustomizerFn{
621623
gvk.Deployment: CustomizerFnApplyDeployments,
622624
gvk.ClusterRole: CustomizerFnApplyClusterRoles,

framework/controller/reconciler/reconciler.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -524,11 +524,6 @@ func (r *Reconciler) apply(ctx context.Context, res api.PlatformObject) (time.Du
524524
}
525525

526526
if provisionErr != nil {
527-
se := odherrors.StopError{}
528-
if errors.As(provisionErr, &se) {
529-
return 0, nil
530-
}
531-
532527
r.Recorder.Eventf(
533528
res,
534529
nil,

0 commit comments

Comments
 (0)