INNER CODE UNIT · Go
err
evryfs/github-actions-runner-operator · controllers/githubactionrunner_controller.go:350
if err = r.GithubAPI.UnregisterRunner(ctx, cr.Spec.Organization, cr.Spec.Repository, token, *pair.runner.ID); err != nil {
return err
}
}
util.RemoveFinalizer(&pair.pod, finalizer)
if err := r.GetClient().Update(ctx, &pair.pod); err != nil {
return err
}
}
return nil
}
// handleFinalization will remove runner from github based on presence of finalizer
func (r *GithubActionRunnerReconciler) handleFinalization(ctx context.Context, cr *garov1alpha1.GithubActionRunner, list podRunnerPairList) error {
for _, item := range list.getPodsBeingDeletedOrEvictedOrCompleted() {
// TODO - cause of failure should be checked more closely, if it does not exist we can ignore it. If it is a comms error we should stick around