Merge pull request #1865 from fluxcd/fix-stalled-errors
Fix GitRepository controller stalling when it shouldn't
This commit is contained in:
commit
bd6d090ef0
|
|
@ -591,7 +591,7 @@ func (r *GitRepositoryReconciler) reconcileSource(ctx context.Context, sp *patch
|
||||||
|
|
||||||
// Validate sparse checkout paths after successful checkout.
|
// Validate sparse checkout paths after successful checkout.
|
||||||
if err := r.validateSparseCheckoutPaths(ctx, obj, dir); err != nil {
|
if err := r.validateSparseCheckoutPaths(ctx, obj, dir); err != nil {
|
||||||
e := serror.NewStalling(
|
e := serror.NewGeneric(
|
||||||
fmt.Errorf("failed to sparse checkout directories : %w", err),
|
fmt.Errorf("failed to sparse checkout directories : %w", err),
|
||||||
sourcev1.GitOperationFailedReason,
|
sourcev1.GitOperationFailedReason,
|
||||||
)
|
)
|
||||||
|
|
@ -747,7 +747,7 @@ func (r *GitRepositoryReconciler) getAuthOpts(ctx context.Context, obj *sourcev1
|
||||||
default:
|
default:
|
||||||
// analyze secret, if it has github app data, perhaps provider should have been github.
|
// analyze secret, if it has github app data, perhaps provider should have been github.
|
||||||
if appID := authData[github.KeyAppID]; len(appID) != 0 {
|
if appID := authData[github.KeyAppID]; len(appID) != 0 {
|
||||||
e := serror.NewStalling(
|
e := serror.NewGeneric(
|
||||||
fmt.Errorf("secretRef '%s/%s' has github app data but provider is not set to github", obj.GetNamespace(), obj.Spec.SecretRef.Name),
|
fmt.Errorf("secretRef '%s/%s' has github app data but provider is not set to github", obj.GetNamespace(), obj.Spec.SecretRef.Name),
|
||||||
sourcev1.InvalidProviderConfigurationReason,
|
sourcev1.InvalidProviderConfigurationReason,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue