Skip to content

Commit

Permalink
Cherry-pick: Set right condition to true when git auth secret is not …
Browse files Browse the repository at this point in the history
…found (#1424)
  • Loading branch information
pPrecel authored Jan 30, 2025
1 parent 4052ded commit 7826bc7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion components/serverless/internal/controllers/serverless/fsm.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,17 @@ func stateFnGitCheckSources(ctx context.Context, r *reconciler, s *systemState)
}

if err := r.client.Get(ctx, key, &secret); err != nil {
return nil, errors.Wrap(err, "while getting secret")
r.log.Error(err, " while getting secret")
var errMsg string
r.result, errMsg = NextRequeue(err)
condition := serverlessv1alpha2.Condition{
Type: serverlessv1alpha2.ConditionConfigurationReady,
Status: corev1.ConditionFalse,
LastTransitionTime: metav1.Now(),
Reason: serverlessv1alpha2.ConditionReasonSourceUpdateFailed,
Message: errMsg,
}
return buildStatusUpdateStateFnWithCondition(condition), nil
}

auth = &git.AuthOptions{
Expand Down

0 comments on commit 7826bc7

Please sign in to comment.