Skip to content

Commit

Permalink
Remove unused reconciler fields from operation
Browse files Browse the repository at this point in the history
  • Loading branch information
KsaweryZietara committed Jun 7, 2024
1 parent 999cca4 commit d212744
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
19 changes: 5 additions & 14 deletions internal/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,15 +202,13 @@ type Operation struct {

// DEPROVISIONING
// Temporary indicates that this deprovisioning operation must not remove the instance
Temporary bool `json:"temporary"`
ClusterConfigurationDeleted bool `json:"clusterConfigurationDeleted"`
ReconcilerDeregistrationAt time.Time `json:"reconcilerDeregistrationAt"`
ExcutedButNotCompleted []string `json:"excutedButNotCompleted"`
UserAgent string `json:"userAgent,omitempty"`
Temporary bool `json:"temporary"`
ClusterConfigurationDeleted bool `json:"clusterConfigurationDeleted"`
ExcutedButNotCompleted []string `json:"excutedButNotCompleted"`
UserAgent string `json:"userAgent,omitempty"`

// UPDATING
UpdatingParameters UpdatingParametersDTO `json:"updating_parameters"`
CheckReconcilerStatus bool `json:"check_reconciler_status"`
UpdatingParameters UpdatingParametersDTO `json:"updating_parameters"`

// UPGRADE KYMA
orchestration.RuntimeOperation `json:"runtime_operation"`
Expand Down Expand Up @@ -373,13 +371,6 @@ type DeprovisioningOperation struct {
Operation
}

func (op *Operation) TimeSinceReconcilerDeregistrationTriggered() time.Duration {
if op.ReconcilerDeregistrationAt.IsZero() {
return 0
}
return time.Since(op.ReconcilerDeregistrationAt)
}

type UpdatingOperation struct {
Operation
}
Expand Down
2 changes: 1 addition & 1 deletion internal/storage/driver/memory/runtime_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func (s *runtimeState) GetLatestWithKymaVersionByRuntimeID(runtimeID string) (in
}
}

return internal.RuntimeState{}, dberr.NotFound("runtime state with Reconciler input for runtime with ID: %s not found", runtimeID)
return internal.RuntimeState{}, dberr.NotFound("failed to find RuntimeState with kyma version for runtime %s", runtimeID)
}

func (s *runtimeState) GetLatestWithOIDCConfigByRuntimeID(runtimeID string) (internal.RuntimeState, error) {
Expand Down

0 comments on commit d212744

Please sign in to comment.