Skip to content

Commit a62fee5

Browse files
committed
gitrepo: Do not stall when no included artifact
The GitRepository object with included artifact should not stall when the included artifact is not available since there's no way to signal a reconciliation when the included artifact becomes available. The reconciliation should fail and retry until the included artifact becomes available. Signed-off-by: Sunny <[email protected]>
1 parent 3cbb89d commit a62fee5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

controllers/gitrepository_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,12 +574,12 @@ func (r *GitRepositoryReconciler) reconcileInclude(ctx context.Context,
574574
Reason: "NotFound",
575575
}
576576
conditions.MarkTrue(obj, sourcev1.IncludeUnavailableCondition, e.Reason, e.Err.Error())
577-
return sreconcile.ResultEmpty, err
577+
return sreconcile.ResultEmpty, e
578578
}
579579

580580
// Confirm include has an artifact
581581
if dep.GetArtifact() == nil {
582-
e := &serror.Stalling{
582+
e := &serror.Event{
583583
Err: fmt.Errorf("no artifact available for include '%s'", incl.GitRepositoryRef.Name),
584584
Reason: "NoArtifact",
585585
}

0 commit comments

Comments
 (0)