Skip to content

Commit

Permalink
AVS cleanup - last stage (#1309)
Browse files Browse the repository at this point in the history
configuration

removed from model and some tests

utility function removed

secrets removed

error code

docs update, fixtures update

last touches
  • Loading branch information
jaroslaw-pieszka authored Oct 11, 2024
1 parent ab679dd commit 931e8fa
Show file tree
Hide file tree
Showing 13 changed files with 3 additions and 540 deletions.
1 change: 0 additions & 1 deletion common/runtime/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ type RuntimeDTO struct {
Provider string `json:"provider"`
Status RuntimeStatus `json:"status"`
UserID string `json:"userID"`
AVSInternalEvaluationID int64 `json:"avsInternalEvaluationID"`
KymaConfig *gqlschema.KymaConfigInput `json:"kymaConfig,omitempty"`
ClusterConfig *gqlschema.GardenerConfigInput `json:"clusterConfig,omitempty"`
RuntimeConfig *map[string]interface{} `json:"runtimeConfig,omitempty"`
Expand Down
2 changes: 0 additions & 2 deletions docs/user/03-10-service-description.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,6 @@ The trial plan allows you to install Kyma runtime on Azure, AWS, or GCP. The pla
- Kyma runtime is uninstalled after 14 days and the Kyma cluster is deprovisioned after this time.
- It's possible to provision only one Kyma runtime per global account.

To reduce the costs, the trial plan skips one of the [provisioning steps](./03-20-runtime-operations.md#provisioning), that is, `AVS External Evaluation`.

### Provisioning Parameters

These are the provisioning parameters for the Trial plan that you can configure:
Expand Down
1 change: 0 additions & 1 deletion internal/error/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ const (
ErrEDP ErrComponent = "edp"
ErrProvisioner ErrComponent = "provisioner"
ErrReconciler ErrComponent = "reconciler"
ErrAVS ErrComponent = "avs"
)

func (err LastError) Reason() ErrReason {
Expand Down
1 change: 0 additions & 1 deletion internal/fixture/fixture.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ func FixInstanceDetails(id string) internal.InstanceDetails {
}

return internal.InstanceDetails{
Avs: internal.AvsLifecycleData{},
EventHub: internal.EventHub{Deleted: false},
SubAccountID: subAccountId,
RuntimeID: runtimeId,
Expand Down
19 changes: 1 addition & 18 deletions internal/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,6 @@ type ProvisionerInputCreator interface {
SetOIDCLastValues(oidcConfig gqlschema.OIDCConfigInput) ProvisionerInputCreator
}

type AvsEvaluationStatus struct {
Current string `json:"current_value"`
Original string `json:"original_value"`
}

type AvsLifecycleData struct {
AvsEvaluationInternalId int64 `json:"avs_evaluation_internal_id"`
AVSEvaluationExternalId int64 `json:"avs_evaluation_external_id"`

AvsInternalEvaluationStatus AvsEvaluationStatus `json:"avs_internal_evaluation_status"`
AvsExternalEvaluationStatus AvsEvaluationStatus `json:"avs_external_evaluation_status"`

AVSInternalEvaluationDeleted bool `json:"avs_internal_evaluation_deleted"`
AVSExternalEvaluationDeleted bool `json:"avs_external_evaluation_deleted"`
}

type EventHub struct {
Deleted bool `json:"event_hub_deleted"`
}
Expand Down Expand Up @@ -231,8 +215,7 @@ type InstanceWithOperation struct {
}

type InstanceDetails struct {
Avs AvsLifecycleData `json:"avs"`
EventHub EventHub `json:"eh"`
EventHub EventHub `json:"eh"`

SubAccountID string `json:"sub_account_id"`
RuntimeID string `json:"runtime_id"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func TestRemoveInstanceStep_InstanceHasExecutedButNotCompletedOperationSteps(t *
memoryStorage := storage.NewMemoryStorage()

operation := fixture.FixDeprovisioningOperationAsOperation(testOperationID, testInstanceID)
operation.ExcutedButNotCompleted = append(operation.ExcutedButNotCompleted, "De-provision_AVS_Evaluations")
operation.ExcutedButNotCompleted = append(operation.ExcutedButNotCompleted, "Remove_Runtime")
instance := fixture.FixInstance(testInstanceID)
instance.DeletedAt = time.Time{}

Expand Down
3 changes: 1 addition & 2 deletions internal/process/provisioning/initialisation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ const (
statusGlobalAccountID = "abf73c71-a653-4951-b9c2-a26d6c2cccbd"
statusProvisionerOperationID = "e04de524-53b3-4890-b05a-296be393e4ba"

dashboardURL = "http://runtime.com"
fixAvsEvaluationInternalId = int64(1234)
dashboardURL = "http://runtime.com"
)

func TestInitialisationStep_Run(t *testing.T) {
Expand Down
Loading

0 comments on commit 931e8fa

Please sign in to comment.