getporter / helm2-mixin

Helm mixin for Porter
https://porter.sh/mixins/helm
Apache License 2.0
13 stars 7 forks source link

schema validation failure should debug print out the bad input #32

Closed carolynvs closed 2 years ago

carolynvs commented 5 years ago

When the input is rejected due to bad schema, I'm left with no clue what was bad that was passed in. For example, here's a bad test run from porter's make test-cli. Wordpress uninstalled fine, but mysql did not:

/cnab/app/mixins/helm/helm-runtime /cnab/app/mixins/helm/helm-runtime uninstall --debug
/usr/local/bin/helm helm delete --purge porter-ci-wordpress
release "porter-ci-wordpress" deleted
DEBUG mixin:    helm
DEBUG mixinDir: /cnab/app/mixins/helm
DEBUG file:
DEBUG stdin:
uninstall:
- helm:
    description: Uninstall MySQL
    name: porter-ci-mysql
    purge: true

/cnab/app/mixins/helm/helm-runtime /cnab/app/mixins/helm/helm-runtime uninstall --debug
Uninstall MySQL
Error: uninstall.0.helm: releases is required
    * uninstall.0.helm: Additional property name is not allowed
err: uninstall.0.helm: releases is required
    * uninstall.0.helm: Additional property name is not allowed
Usage:
  helm uninstall [flags]

Flags:
  -h, --help   help for uninstall

Global Flags:
      --debug   Enable debug logging

Even with the --debug flag I have no clue what came in on stdin that didn't meet the json schema.