capactio / capact

Simple way to manage applications and infrastructure.
https://capact.io
Apache License 2.0
79 stars 19 forks source link

Cannot update the TypeInstance where the backend does not accept value #704

Closed mkuziemko closed 2 years ago

mkuziemko commented 2 years ago

Description

When I was working on capact ti edit I noticed that there is an issue with updating the TypeInstance where the backend does not accept value.

Expected behavior

Editing the TypeInstnace backend context should succeed when the backend does not accept value.

Actual behavior

In case of editing the TI:

id: 11e00f77-8eb5-4f2a-84c1-f3d5b236428c
typeInstance:
  attributes: []
  backend:
    context:
      chartLocation: https://charts.bitnami.com/bitnami
      driver: secrets
      name: postgresql-1649675191
      namespace: default
# value:
#   chart:
#     name: postgresql
#     repo: https://charts.bitnami.com/bitnami
#     version: 10.2.6
#   name: postgresql-1649675191
#   namespace: default

I got the error:

Error: while executing mutation to update TypeInstances: All attempts fail:
#1: graphql: failed to update TypeInstances: 1 error occurred:
    * Error: External backend "d1a6496a-df62-48e0-95c4-8560a87c4e9c": input value not allowed

Steps to reproduce

  1. Checkout to this PR
  2. Install Helm Storage and Matteromost
  3. Try to edit TI which used cap.type.helm.release.storage by replacing some of the backend value.