cloudfoundry-incubator/eirini

View on GitHub
k8s/informers/task/reconciler.go

Summary

Maintainability
A
2 hrs
Test Coverage
A
95%

Method Reconciler.Reconcile has 10 return statements (exceeds 4 allowed).
Open

func (r Reconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error) {
    logger := r.logger.Session("task-completion-reconciler", lager.Data{"namespace": request.Namespace, "pod-name": request.Name})

    pod := &corev1.Pod{}
    if err := r.runtimeClient.Get(ctx, request.NamespacedName, pod); err != nil {
Severity: Major
Found in k8s/informers/task/reconciler.go - About 1 hr to fix

    Function NewReconciler has 8 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        logger lager.Logger,
        podClient client.Client,
        jobsClient JobsClient,
        podUpdater PodsClient,
        reporter Reporter,
    Severity: Major
    Found in k8s/informers/task/reconciler.go - About 1 hr to fix

      Method Reconciler.reportIfRequired has 6 return statements (exceeds 4 allowed).
      Open

      func (r *Reconciler) reportIfRequired(ctx context.Context, pod *corev1.Pod) error {
          if pod.Annotations[jobs.AnnotationCCAckedTaskCompletion] == jobs.TaskCompletedTrue {
              return nil
          }
      
      
      Severity: Major
      Found in k8s/informers/task/reconciler.go - About 40 mins to fix

        There are no issues that match your filters.

        Category
        Status