Edit cluster fails if init scripts were specified
Summary
Cluster edition fails if init scripts were specified the cluster update fails
Steps to reproduce
- Creates a cluster with one instance, and specify some init scripts.
- Wait for the cluster to be created
- Edit node instances from 1 to 2.
Expected Behaviour
Cluster should be updated without any issues.
Environment
- StackGres version: 0.9-RC2
- Kubernetes version: 1.17.0
- Cloud provider or hardware configuration: kind
Relevant logs and/or screenshots
Taken from the chrome console:
vue.js:634 [Vue warn]: Error in v-on handler: "TypeError: Cannot read property 'length' of undefined"
found in
---> <CreateCluster>
<Root>
warn @ vue.js:634
logError @ vue.js:1893
globalHandleError @ vue.js:1888
handleError @ vue.js:1848
invokeWithErrorHandling @ vue.js:1871
invoker @ vue.js:2188
original._wrapper @ vue.js:7541
vue.js:1897 TypeError: Cannot read property 'length' of undefined
at CreateCluster.vue.js:770
at Array.forEach (<anonymous>)
at VueComponent.cleanupScripts (CreateCluster.vue.js:763)
at VueComponent.createCluster (CreateCluster.vue.js:799)
at invokeWithErrorHandling (vue.js:1863)
at HTMLAnchorElement.invoker (vue.js:2188)
at HTMLAnchorElement.original._wrapper (vue.js:7541)