diff --git a/internal/controller/context_controller.go b/internal/controller/context_controller.go index d932b4d..d8b27f0 100644 --- a/internal/controller/context_controller.go +++ b/internal/controller/context_controller.go @@ -81,7 +81,7 @@ func (r *ContextReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct space, err := r.SpaceRepository.Get(ctx, types.NamespacedName{Namespace: context.Namespace, Name: *context.Spec.SpaceName}) if err != nil { if k8sErrors.IsNotFound(err) { - logger.V(logging.Level4).Info("Unable to find space for context, will retry in 10 seconds") + logger.Info("Unable to find space for context, will retry in 10 seconds") return ctrl.Result{RequeueAfter: 10 * time.Second}, nil } logger.Error(err, "Error fetching space for context.") @@ -116,7 +116,7 @@ func (r *ContextReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct }) if err != nil { if k8sErrors.IsNotFound(err) { - logger.V(logging.Level4).Info("Unable to find stack for context, will retry in 10 seconds") + logger.Info("Unable to find stack for context, will retry in 10 seconds") return ctrl.Result{RequeueAfter: 10 * time.Second}, nil } logger.Error(err, "Error fetching stack for context.") diff --git a/internal/controller/context_controller_test.go b/internal/controller/context_controller_test.go index dbf305a..80c46da 100644 --- a/internal/controller/context_controller_test.go +++ b/internal/controller/context_controller_test.go @@ -302,7 +302,6 @@ func (s *ContextControllerTestSuite) TestContextCreation_OK_SpaceNotReady() { return logs.Len() == 1 }, integration.DefaultTimeout, integration.DefaultInterval) s.Assert().Equal("test-space", logs.All()[0].ContextMap()[logging.SpaceName]) - s.Assert().EqualValues(logging.Level4, -logs.All()[0].Level) s.Logs.TakeAll() space, err := s.CreateTestSpace() @@ -378,7 +377,6 @@ func (s *ContextControllerTestSuite) TestContextCreation_OK_AttachedStackNotRead return logs.Len() == 1 }, integration.DefaultTimeout, integration.DefaultInterval) s.Assert().Equal("test-stack", logs.All()[0].ContextMap()[logging.StackName]) - s.Assert().EqualValues(logging.Level4, -logs.All()[0].Level) s.Logs.TakeAll() stack, err := s.CreateTestStack() diff --git a/internal/controller/policy_controller.go b/internal/controller/policy_controller.go index 61d5998..abb4d20 100644 --- a/internal/controller/policy_controller.go +++ b/internal/controller/policy_controller.go @@ -79,7 +79,7 @@ func (r *PolicyReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctr space, err := r.SpaceRepository.Get(ctx, types.NamespacedName{Namespace: policy.Namespace, Name: *policy.Spec.SpaceName}) if err != nil { if k8sErrors.IsNotFound(err) { - logger.V(logging.Level4).Info("Unable to find space for policy, will retry in 10 seconds") + logger.Info("Unable to find space for policy, will retry in 10 seconds") return ctrl.Result{RequeueAfter: 10 * time.Second}, nil } logger.Error(err, "Error fetching space for policy.") @@ -109,7 +109,7 @@ func (r *PolicyReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctr stack, err := r.StackRepository.Get(ctx, types.NamespacedName{Namespace: policy.Namespace, Name: stackName}) if err != nil { if k8sErrors.IsNotFound(err) { - logger.V(logging.Level4).Info("Unable to find attached stack for policy, will retry in 10 seconds") + logger.Info("Unable to find attached stack for policy, will retry in 10 seconds") return ctrl.Result{RequeueAfter: 10 * time.Second}, nil } logger.Error(err, "Error fetching stack for policy.") diff --git a/internal/controller/policy_controller_test.go b/internal/controller/policy_controller_test.go index fca853a..6afd88b 100644 --- a/internal/controller/policy_controller_test.go +++ b/internal/controller/policy_controller_test.go @@ -162,7 +162,6 @@ func (s *PolicyControllerSuite) TestPolicyCreation_OK_AttachedStackNotReady() { return logs.Len() == 1 }, integration.DefaultTimeout, integration.DefaultInterval) s.Assert().Equal("test-stack", logs.All()[0].ContextMap()[logging.StackName]) - s.Assert().EqualValues(logging.Level4, -logs.All()[0].Level) stack, err := s.CreateTestStack() s.Require().NoError(err) @@ -210,7 +209,6 @@ func (s *PolicyControllerSuite) TestPolicyCreation_OK_SpaceNotReady() { return logs.Len() == 1 }, integration.DefaultTimeout, integration.DefaultInterval) s.Assert().Equal("test-space", logs.All()[0].ContextMap()[logging.SpaceName]) - s.Assert().EqualValues(logging.Level4, -logs.All()[0].Level) space, err := s.CreateTestSpace() s.Require().NoError(err) diff --git a/internal/controller/run_controller.go b/internal/controller/run_controller.go index 3a19b60..c42bdaf 100644 --- a/internal/controller/run_controller.go +++ b/internal/controller/run_controller.go @@ -78,7 +78,7 @@ func (r *RunReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.R stack, err := r.StackRepository.Get(ctx, types.NamespacedName{Namespace: run.Namespace, Name: run.Spec.StackName}) if err != nil { if k8sErrors.IsNotFound(err) { - logger.V(logging.Level4).Info("Unable to find stack for run") + logger.Info("Unable to find stack for run, will retry in 10 seconds") return ctrl.Result{RequeueAfter: 10 * time.Second}, nil } logger.Error(err, "Error fetching stack for run.") diff --git a/internal/controller/stack_controller.go b/internal/controller/stack_controller.go index d4995f3..4bb6fb2 100644 --- a/internal/controller/stack_controller.go +++ b/internal/controller/stack_controller.go @@ -78,7 +78,7 @@ func (r *StackReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl space, err := r.SpaceRepository.Get(ctx, types.NamespacedName{Namespace: stack.Namespace, Name: *stack.Spec.SpaceName}) if err != nil { if k8sErrors.IsNotFound(err) { - logger.V(logging.Level4).Info("Unable to find space for stack") + logger.Info("Unable to find space for stack, will retry in 10 seconds") return ctrl.Result{RequeueAfter: 10 * time.Second}, nil } logger.Error(err, "Error fetching space for stack") diff --git a/internal/controller/stack_controller_test.go b/internal/controller/stack_controller_test.go index 28658b8..d373daa 100644 --- a/internal/controller/stack_controller_test.go +++ b/internal/controller/stack_controller_test.go @@ -185,7 +185,7 @@ func (s *StackControllerSuite) TestStackCreation_OK_SpaceNotReady() { var logs *observer.ObservedLogs s.Require().Eventually(func() bool { - logs = s.Logs.FilterMessage("Unable to find space for stack") + logs = s.Logs.FilterMessage("Unable to find space for stack, will retry in 10 seconds") return logs.Len() == 1 }, integration.DefaultTimeout, integration.DefaultInterval)