diff --git a/internal/edp/errors.go b/internal/edp/errors.go index efc0954b4b..14c9a5e05a 100644 --- a/internal/edp/errors.go +++ b/internal/edp/errors.go @@ -51,7 +51,7 @@ func (e edpError) Code() int { return e.code } -func (e edpError) GetDependency() kebError.Component { +func (e edpError) GetComponent() kebError.Component { return kebError.EDPDependency } diff --git a/internal/error/errors.go b/internal/error/errors.go index 8612640429..89e70aa4c4 100644 --- a/internal/error/errors.go +++ b/internal/error/errors.go @@ -18,7 +18,7 @@ type Component string type ErrorReporter interface { error GetReason() Reason - GetDependency() Component + GetComponent() Component } // error reporter @@ -57,7 +57,7 @@ func (err LastError) GetReason() Reason { return err.Reason } -func (err LastError) GetDependency() Component { +func (err LastError) GetComponent() Component { return err.Component } @@ -80,12 +80,12 @@ func (err LastError) SetMessage(msg string) LastError { return err } -func (err LastError) StepName() string { +func (err LastError) GetStep() string { return err.Step } -func (err LastError) SetStepName(stepName string) LastError { - err.Step = stepName +func (err LastError) SetStep(step string) LastError { + err.Step = step return err } @@ -116,7 +116,7 @@ func ReasonForError(err error, step string) LastError { return LastError{ Message: err.Error(), Reason: status.GetReason(), - Component: status.GetDependency(), + Component: status.GetComponent(), Step: step, } } diff --git a/internal/error/errors_test.go b/internal/error/errors_test.go index f644f5913d..904af4a012 100644 --- a/internal/error/errors_test.go +++ b/internal/error/errors_test.go @@ -29,28 +29,32 @@ func TestLastError(t *testing.T) { expectTimeoutMsg := "something: operation has reached the time limit: 2h" // when - edpLastErr := kebError.ReasonForError(edpErr, "") - edpConfLastErr := kebError.ReasonForError(edpConfErr, "") - dbLastErr := kebError.ReasonForError(dbErr, "") - timeoutLastErr := kebError.ReasonForError(timeoutErr, "") + edpLastErr := kebError.ReasonForError(edpErr, "s1") + edpConfLastErr := kebError.ReasonForError(edpConfErr, "s2") + dbLastErr := kebError.ReasonForError(dbErr, "s3") + timeoutLastErr := kebError.ReasonForError(timeoutErr, "s4") // then assert.Equal(t, edp.ErrEDPBadRequest, edpLastErr.GetReason()) - assert.Equal(t, kebError.EDPDependency, edpLastErr.GetDependency()) + assert.Equal(t, kebError.EDPDependency, edpLastErr.GetComponent()) assert.Equal(t, expectEdpMsg, edpLastErr.Error()) + assert.Equal(t, "s1", edpLastErr.Step) assert.Equal(t, edp.ErrEDPConflict, edpConfLastErr.GetReason()) - assert.Equal(t, kebError.EDPDependency, edpConfLastErr.GetDependency()) + assert.Equal(t, kebError.EDPDependency, edpConfLastErr.GetComponent()) assert.Equal(t, expectEdpConfMsg, edpConfLastErr.Error()) assert.True(t, edp.IsConflictError(edpConfErr)) + assert.Equal(t, "s2", edpConfLastErr.Step) assert.Equal(t, dberr.ErrDBNotFound, dbLastErr.GetReason()) - assert.Equal(t, kebError.KebDbDependency, dbLastErr.GetDependency()) + assert.Equal(t, kebError.KebDbDependency, dbLastErr.GetComponent()) assert.Equal(t, expectDbErr, dbLastErr.Error()) + assert.Equal(t, "s3", dbLastErr.Step) assert.Equal(t, kebError.KEBTimeOutCode, timeoutLastErr.GetReason()) - assert.Equal(t, kebError.KEBDependency, timeoutLastErr.GetDependency()) + assert.Equal(t, kebError.KEBDependency, timeoutLastErr.GetComponent()) assert.Equal(t, expectTimeoutMsg, timeoutLastErr.Error()) + assert.Equal(t, "s4", timeoutLastErr.Step) }) } @@ -68,19 +72,21 @@ func TestTemporaryErrorToLastError(t *testing.T) { expectEdpMsg := fmt.Sprintf("EDP server returns failed status %s", "501") // when - lastErr := kebError.ReasonForError(tempErr, "") - edpLastErr := kebError.ReasonForError(edpTempErr, "") + lastErr := kebError.ReasonForError(tempErr, "s1") + edpLastErr := kebError.ReasonForError(edpTempErr, "s2") // then assert.Equal(t, kebError.HttpStatusCode, lastErr.GetReason()) - assert.Equal(t, kebError.ReconcileDependency, lastErr.GetDependency()) + assert.Equal(t, kebError.ReconcileDependency, lastErr.GetComponent()) assert.Equal(t, expectMsg, lastErr.Error()) assert.True(t, kebError.IsTemporaryError(tempErr)) + assert.Equal(t, "s1", lastErr.Step) assert.Equal(t, edp.ErrEDPTimeout, edpLastErr.GetReason()) - assert.Equal(t, kebError.EDPDependency, edpLastErr.GetDependency()) + assert.Equal(t, kebError.EDPDependency, edpLastErr.GetComponent()) assert.Equal(t, expectEdpMsg, edpLastErr.Error()) assert.True(t, kebError.IsTemporaryError(edpTempErr)) + assert.Equal(t, "s2", edpLastErr.Step) }) t.Run("new temporary error", func(t *testing.T) { @@ -89,13 +95,14 @@ func TestTemporaryErrorToLastError(t *testing.T) { expectMsg := "something: temporary error..." // when - lastErr := kebError.ReasonForError(tempErr, "") + lastErr := kebError.ReasonForError(tempErr, "s1") // then assert.Equal(t, kebError.KEBInternalCode, lastErr.GetReason()) - assert.Equal(t, kebError.KEBDependency, lastErr.GetDependency()) + assert.Equal(t, kebError.KEBDependency, lastErr.GetComponent()) assert.Equal(t, expectMsg, lastErr.Error()) assert.True(t, kebError.IsTemporaryError(tempErr)) + assert.Equal(t, "s1", lastErr.Step) }) } @@ -104,13 +111,14 @@ func TestNotFoundError(t *testing.T) { err := fmt.Errorf("something: %w", kebError.NotFoundError{}) // when - lastErr := kebError.ReasonForError(err, "") + lastErr := kebError.ReasonForError(err, "s2") // then assert.EqualError(t, lastErr, "something: not found") assert.Equal(t, kebError.ClusterNotFoundCode, lastErr.GetReason()) - assert.Equal(t, kebError.ReconcileDependency, lastErr.GetDependency()) + assert.Equal(t, kebError.ReconcileDependency, lastErr.GetComponent()) assert.True(t, kebError.IsNotFoundError(err)) + assert.Equal(t, "s2", lastErr.Step) } func TestK8SLastError(t *testing.T) { @@ -121,25 +129,29 @@ func TestK8SLastError(t *testing.T) { errNoMatch := fmt.Errorf("something: %w", &apierr2.NoKindMatchError{}) // when - lastErrBadReq := kebError.ReasonForError(errBadReq, "") - lastErrUnexpObj := kebError.ReasonForError(errUnexpObj, "") - lastErrAmbi := kebError.ReasonForError(errAmbi, "") - lastErrNoMatch := kebError.ReasonForError(errNoMatch, "") + lastErrBadReq := kebError.ReasonForError(errBadReq, "s1") + lastErrUnexpObj := kebError.ReasonForError(errUnexpObj, "s2") + lastErrAmbi := kebError.ReasonForError(errAmbi, "s3") + lastErrNoMatch := kebError.ReasonForError(errNoMatch, "s4") // then assert.EqualError(t, lastErrBadReq, "something: bad request here") assert.Equal(t, kebError.Reason("BadRequest"), lastErrBadReq.GetReason()) - assert.Equal(t, kebError.K8sDependency, lastErrBadReq.GetDependency()) + assert.Equal(t, kebError.K8sDependency, lastErrBadReq.GetComponent()) + assert.Equal(t, "s1", lastErrBadReq.Step) assert.ErrorContains(t, lastErrUnexpObj, "something: unexpected object: ") assert.Equal(t, kebError.K8SUnexpectedObjectCode, lastErrUnexpObj.GetReason()) - assert.Equal(t, kebError.K8sDependency, lastErrUnexpObj.GetDependency()) + assert.Equal(t, kebError.K8sDependency, lastErrUnexpObj.GetComponent()) + assert.Equal(t, "s2", lastErrUnexpObj.Step) assert.ErrorContains(t, lastErrAmbi, "matches multiple resources or kinds") assert.Equal(t, kebError.K8SAmbiguousCode, lastErrAmbi.GetReason()) - assert.Equal(t, kebError.K8sDependency, lastErrAmbi.GetDependency()) + assert.Equal(t, kebError.K8sDependency, lastErrAmbi.GetComponent()) + assert.Equal(t, "s3", lastErrAmbi.Step) assert.ErrorContains(t, lastErrNoMatch, "something: no matches for kind") assert.Equal(t, kebError.K8SNoMatchCode, lastErrNoMatch.GetReason()) - assert.Equal(t, kebError.K8sDependency, lastErrNoMatch.GetDependency()) + assert.Equal(t, kebError.K8sDependency, lastErrNoMatch.GetComponent()) + assert.Equal(t, "s4", lastErrNoMatch.Step) } diff --git a/internal/error/not_found_error.go b/internal/error/not_found_error.go index e3e2da6a53..071b93ada2 100644 --- a/internal/error/not_found_error.go +++ b/internal/error/not_found_error.go @@ -15,7 +15,7 @@ func (NotFoundError) GetReason() Reason { return ClusterNotFoundCode } -func (NotFoundError) GetDependency() Component { +func (NotFoundError) GetComponent() Component { return ReconcileDependency } diff --git a/internal/error/temporary_error.go b/internal/error/temporary_error.go index 5ff3e34d30..8793e2789c 100644 --- a/internal/error/temporary_error.go +++ b/internal/error/temporary_error.go @@ -19,10 +19,10 @@ func AsTemporaryError(err error, context string, args ...interface{}) *Temporary return &TemporaryError{message: msg} } -func (te TemporaryError) Error() string { return te.message } -func (TemporaryError) Temporary() bool { return true } -func (TemporaryError) GetReason() Reason { return KEBInternalCode } -func (TemporaryError) GetDependency() Component { return KEBDependency } +func (te TemporaryError) Error() string { return te.message } +func (TemporaryError) Temporary() bool { return true } +func (TemporaryError) GetReason() Reason { return KEBInternalCode } +func (TemporaryError) GetComponent() Component { return KEBDependency } func IsTemporaryError(err error) bool { cause := UnwrapAll(err) @@ -55,6 +55,6 @@ func (wte WrapTemporaryError) GetReason() Reason { return ReasonForError(wte.err, NotSet).GetReason() } -func (wte WrapTemporaryError) GetDependency() Component { - return ReasonForError(wte.err, NotSet).GetDependency() +func (wte WrapTemporaryError) GetComponent() Component { + return ReasonForError(wte.err, NotSet).GetComponent() } diff --git a/internal/metricsv2/metrics.go b/internal/metricsv2/metrics.go index 3205805b4b..0d2f496106 100644 --- a/internal/metricsv2/metrics.go +++ b/internal/metricsv2/metrics.go @@ -135,7 +135,7 @@ func GetLabels(op internal.Operation) map[string]string { labels["plan_id"] = op.ProvisioningParameters.PlanID labels["type"] = string(op.Type) labels["state"] = string(op.State) - labels["error_category"] = string(op.LastError.GetDependency()) + labels["error_category"] = string(op.LastError.GetComponent()) labels["error_reason"] = string(op.LastError.GetReason()) labels["error"] = op.LastError.Error() return labels diff --git a/internal/process/deprovisioning/check_runtime_removal_step.go b/internal/process/deprovisioning/check_runtime_removal_step.go index 74a2323d71..c992531970 100644 --- a/internal/process/deprovisioning/check_runtime_removal_step.go +++ b/internal/process/deprovisioning/check_runtime_removal_step.go @@ -80,10 +80,10 @@ func (s *CheckRuntimeRemovalStep) Run(operation internal.Operation, log logrus.F case gqlschema.OperationStatePending: return operation, 30 * time.Second, nil case gqlschema.OperationStateFailed: - lastErr := provisioner.OperationStatusLastError(status.LastError) + lastErr := provisioner.OperationStatusLastError(status.LastError, s.Name()) return s.operationManager.OperationFailed(operation, "provisioner client returns failed status", lastErr, log) } - lastErr := provisioner.OperationStatusLastError(status.LastError) + lastErr := provisioner.OperationStatusLastError(status.LastError, s.Name()) return s.operationManager.OperationFailed(operation, fmt.Sprintf("unsupported provisioner client status: %s", status.State.String()), lastErr, log) } diff --git a/internal/process/operation_manager_test.go b/internal/process/operation_manager_test.go index cde17375d3..b9c9dec777 100644 --- a/internal/process/operation_manager_test.go +++ b/internal/process/operation_manager_test.go @@ -89,10 +89,10 @@ func Test_OperationManager_LastError(t *testing.T) { err := operations.InsertOperation(op) require.NoError(t, err) op, _, err = opManager.OperationFailed(op, "friendly message", fmt.Errorf("technical err"), fixLogger()) - assert.EqualValues(t, "provisioner", op.LastError.GetDependency()) + assert.EqualValues(t, "provisioner", op.LastError.GetComponent()) assert.EqualValues(t, "technical err", op.LastError.Error()) assert.EqualValues(t, "friendly message", op.LastError.GetReason()) - assert.EqualValues(t, "some_step", op.LastError.StepName()) + assert.EqualValues(t, "some_step", op.LastError.GetStep()) }) t.Run("when all last error field set with 1 components v2", func(t *testing.T) { @@ -103,10 +103,10 @@ func Test_OperationManager_LastError(t *testing.T) { err := operations.InsertOperation(op) require.NoError(t, err) op, _, err = opManager.OperationFailed(op, "friendly message", fmt.Errorf("technical err"), fixLogger()) - assert.EqualValues(t, "db - keb", op.LastError.GetDependency()) + assert.EqualValues(t, "db - keb", op.LastError.GetComponent()) assert.EqualValues(t, "technical err", op.LastError.Error()) assert.EqualValues(t, "friendly message", op.LastError.GetReason()) - assert.EqualValues(t, "some_step", op.LastError.StepName()) + assert.EqualValues(t, "some_step", op.LastError.GetStep()) }) t.Run("when no error passed", func(t *testing.T) { @@ -117,10 +117,10 @@ func Test_OperationManager_LastError(t *testing.T) { err := operations.InsertOperation(op) require.NoError(t, err) op, _, err = opManager.OperationFailed(op, "friendly message", nil, fixLogger()) - assert.EqualValues(t, "", op.LastError.GetDependency()) + assert.EqualValues(t, "", op.LastError.GetComponent()) assert.EqualValues(t, "", op.LastError.Error()) assert.EqualValues(t, "", op.LastError.GetReason()) - assert.EqualValues(t, "", op.LastError.StepName()) + assert.EqualValues(t, "", op.LastError.GetStep()) }) t.Run("when no description passed", func(t *testing.T) { @@ -131,10 +131,10 @@ func Test_OperationManager_LastError(t *testing.T) { err := operations.InsertOperation(op) require.NoError(t, err) op, _, err = opManager.OperationFailed(op, "", fmt.Errorf("technical err"), fixLogger()) - assert.EqualValues(t, "provisioner", op.LastError.GetDependency()) + assert.EqualValues(t, "provisioner", op.LastError.GetComponent()) assert.EqualValues(t, "technical err", op.LastError.Error()) assert.EqualValues(t, "", op.LastError.GetReason()) - assert.EqualValues(t, "some_step", op.LastError.StepName()) + assert.EqualValues(t, "some_step", op.LastError.GetStep()) }) t.Run("when no description and no err passed", func(t *testing.T) { @@ -145,10 +145,10 @@ func Test_OperationManager_LastError(t *testing.T) { err := operations.InsertOperation(op) require.NoError(t, err) op, _, err = opManager.OperationFailed(op, "", nil, fixLogger()) - assert.EqualValues(t, "", op.LastError.GetDependency()) + assert.EqualValues(t, "", op.LastError.GetComponent()) assert.EqualValues(t, "", op.LastError.Error()) assert.EqualValues(t, "", op.LastError.GetReason()) - assert.EqualValues(t, "", op.LastError.StepName()) + assert.EqualValues(t, "", op.LastError.GetStep()) }) } diff --git a/internal/process/provisioning/check_runtime_step.go b/internal/process/provisioning/check_runtime_step.go index 7c9ce52aeb..494306471b 100644 --- a/internal/process/provisioning/check_runtime_step.go +++ b/internal/process/provisioning/check_runtime_step.go @@ -84,10 +84,10 @@ func (s *CheckRuntimeStep) checkRuntimeStatus(operation internal.Operation, log case gqlschema.OperationStatePending: return operation, 20 * time.Second, nil case gqlschema.OperationStateFailed: - lastErr := provisioner.OperationStatusLastError(status.LastError) + lastErr := provisioner.OperationStatusLastError(status.LastError, s.Name()) return s.operationManager.OperationFailed(operation, "provisioner client returns failed status", lastErr, log) } - lastErr := provisioner.OperationStatusLastError(status.LastError) + lastErr := provisioner.OperationStatusLastError(status.LastError, s.Name()) return s.operationManager.OperationFailed(operation, fmt.Sprintf("unsupported provisioner client status: %s", status.State.String()), lastErr, log) } diff --git a/internal/process/staged_manager.go b/internal/process/staged_manager.go index 60ea178961..6b0d3b5585 100644 --- a/internal/process/staged_manager.go +++ b/internal/process/staged_manager.go @@ -233,7 +233,7 @@ func (m *StagedManager) runStep(step Step, operation internal.Operation, logger processedOperation, backoff, err = step.Run(processedOperation, stepLogger) if err != nil { processedOperation.LastError = kebError.ReasonForError(err, step.Name()) - logOperation := stepLogger.WithFields(logrus.Fields{"error_component": processedOperation.LastError.GetDependency(), "error_reason": processedOperation.LastError.GetReason()}) + logOperation := stepLogger.WithFields(logrus.Fields{"error_component": processedOperation.LastError.GetComponent(), "error_reason": processedOperation.LastError.GetReason()}) logOperation.Warnf("Last error from step: %s", processedOperation.LastError.Error()) // only save to storage, skip for alerting if error _, err = m.operationStorage.UpdateOperation(processedOperation) @@ -259,7 +259,7 @@ func (m *StagedManager) runStep(step Step, operation internal.Operation, logger // - the loop takes too much time (to not block the worker too long) if backoff == 0 || err != nil || time.Since(begin) > m.cfg.MaxStepProcessingTime { if err != nil { - logOperation := m.log.WithFields(logrus.Fields{"step": step.Name(), "operation": processedOperation.ID, "error_component": processedOperation.LastError.GetDependency(), "error_reason": processedOperation.LastError.GetReason()}) + logOperation := m.log.WithFields(logrus.Fields{"step": step.Name(), "operation": processedOperation.ID, "error_component": processedOperation.LastError.GetComponent(), "error_reason": processedOperation.LastError.GetReason()}) logOperation.Errorf("Last Error that terminated the step: %s", processedOperation.LastError.Error()) } return processedOperation, backoff, err @@ -270,7 +270,7 @@ func (m *StagedManager) runStep(step Step, operation internal.Operation, logger } func (m *StagedManager) publishEventOnFail(operation *internal.Operation, err error) { - logOperation := m.log.WithFields(logrus.Fields{"operation": operation.ID, "error_component": operation.LastError.GetDependency(), "error_reason": operation.LastError.GetReason()}) + logOperation := m.log.WithFields(logrus.Fields{"operation": operation.ID, "error_component": operation.LastError.GetComponent(), "error_reason": operation.LastError.GetReason()}) logOperation.Errorf("Last error: %s", operation.LastError.Error()) m.publishOperationFinishedEvent(*operation) diff --git a/internal/provisioner/client.go b/internal/provisioner/client.go index eb13b01a2a..f875fb9caa 100644 --- a/internal/provisioner/client.go +++ b/internal/provisioner/client.go @@ -208,12 +208,12 @@ func isNotFoundError(err error) bool { return false } -func OperationStatusLastError(lastErr *schema.LastError) kebError.ErrorReporter { +func OperationStatusLastError(lastErr *schema.LastError, step string) kebError.ErrorReporter { var err kebError.LastError if lastErr == nil { - return err.SetReason(kebError.ProvisionerCode).SetComponent(kebError.ProvisionerDependency).SetStepName(kebError.NotSet) + return err.SetReason(kebError.ProvisionerCode).SetComponent(kebError.ProvisionerDependency).SetStep(step) } - return err.SetMessage(lastErr.ErrMessage).SetReason(kebError.Reason(lastErr.Reason)).SetComponent(kebError.Component(lastErr.Component)).SetStepName(kebError.NotSet) + return err.SetMessage(lastErr.ErrMessage).SetReason(kebError.Reason(lastErr.Reason)).SetComponent(kebError.Component(lastErr.Component)).SetStep(step) } diff --git a/internal/provisioner/client_test.go b/internal/provisioner/client_test.go index 0c3ed48063..30ed9d7a55 100644 --- a/internal/provisioner/client_test.go +++ b/internal/provisioner/client_test.go @@ -280,7 +280,8 @@ func TestClient_ReconnectRuntimeAgent(t *testing.T) { "extensions": { "error_code": 400, "error_reason": "Object not found", - "error_component": "compass director" + "error_component": "compass director", + "error_step": "s1" } } ], @@ -294,13 +295,14 @@ func TestClient_ReconnectRuntimeAgent(t *testing.T) { // when _, err := client.ProvisionRuntime(testAccountID, testSubAccountID, fixProvisionRuntimeInput()) - lastErr := kebError.ReasonForError(err, "") + lastErr := kebError.ReasonForError(err, "s1") // Then assert.Error(t, err) assert.False(t, kebError.IsTemporaryError(err)) assert.Equal(t, kebError.Reason("Object not found"), lastErr.GetReason()) - assert.Equal(t, kebError.Component("compass director"), lastErr.GetDependency()) + assert.Equal(t, kebError.Component("compass director"), lastErr.GetComponent()) + assert.Equal(t, "s1", lastErr.GetStep()) }) t.Run("provisioner returns temporary code error", func(t *testing.T) { @@ -328,13 +330,14 @@ func TestClient_ReconnectRuntimeAgent(t *testing.T) { // when _, err := client.ProvisionRuntime(testAccountID, testSubAccountID, fixProvisionRuntimeInput()) - lastErr := kebError.ReasonForError(err, "") + lastErr := kebError.ReasonForError(err, "s1") // Then assert.Error(t, err) assert.True(t, kebError.IsTemporaryError(err)) assert.Equal(t, kebError.Reason("whatever"), lastErr.GetReason()) - assert.Equal(t, kebError.Component("db - provisioner"), lastErr.GetDependency()) + assert.Equal(t, kebError.Component("db - provisioner"), lastErr.GetComponent()) + assert.Equal(t, "s1", lastErr.Step) }) t.Run("network error", func(t *testing.T) { @@ -402,10 +405,10 @@ func TestClient_OperationStatusLastError(t *testing.T) { } // When - lastErr := OperationStatusLastError(response.LastError) + lastErr := OperationStatusLastError(response.LastError, "s1") // Then - assert.Equal(t, kebError.ProvisionerDependency, lastErr.GetDependency()) + assert.Equal(t, kebError.ProvisionerDependency, lastErr.GetComponent()) assert.Equal(t, kebError.ProvisionerCode, lastErr.GetReason()) assert.Equal(t, "", lastErr.Error()) }) @@ -424,18 +427,18 @@ func TestClient_OperationStatusLastError(t *testing.T) { } // When - lastErr := OperationStatusLastError(response.LastError) + lastErr := OperationStatusLastError(response.LastError, "s1") // Then - assert.Equal(t, kebError.Component("provisioner-db"), lastErr.GetDependency()) + assert.Equal(t, kebError.Component("provisioner-db"), lastErr.GetComponent()) assert.Equal(t, kebError.Reason("not found"), lastErr.GetReason()) assert.Equal(t, "error msg", lastErr.Error()) err := fmt.Errorf("something: %w", lastErr) - lastErr = kebError.ReasonForError(err, "") + lastErr = kebError.ReasonForError(err, "s1") // Then - assert.Equal(t, kebError.Component("provisioner-db"), lastErr.GetDependency()) + assert.Equal(t, kebError.Component("provisioner-db"), lastErr.GetComponent()) assert.Equal(t, kebError.Reason("not found"), lastErr.GetReason()) assert.Equal(t, "something: error msg", lastErr.Error()) }) diff --git a/internal/storage/dberr/errors.go b/internal/storage/dberr/errors.go index 2c13748235..b73ba540c7 100644 --- a/internal/storage/dberr/errors.go +++ b/internal/storage/dberr/errors.go @@ -81,7 +81,7 @@ func (e dbError) Error() string { return e.message } -func (e dbError) GetDependency() kebError.Component { +func (e dbError) GetComponent() kebError.Component { return kebError.KebDbDependency }