mia-platform / mlp

cli for easier deployment of Mia-Platform Console projects
https://docs.mia-platform.eu/docs/runtime_suite_tools/mlp/overview
Apache License 2.0
12 stars 2 forks source link

If env variables type validation fails, mlp error is not understandable #27

Open davidebianchi opened 2 years ago

davidebianchi commented 2 years ago

Describe the bug When deploy a Deployment resource with env var not set to string, the error is not clear: unrecognized type: string

Expected behavior I expect a more clear error on how to fix the resource, or at least the kind and name or the file path of the resource which has the problem.

To Reproduce Steps to reproduce the behavior:

Try to deply a resource like:

apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: test-case
spec:
  concurrencyPolicy: Forbid
  successfulJobsHistoryLimit: 3
  failedJobsHistoryLimit: 1
  schedule: '*/5 * * * *'
  jobTemplate:
    spec:
      backoffLimit: 1
      template:
        metadata:
          name: test-case
        spec:
          containers:
            - name: test-case
              image: busybox
              env:
                - name: SOME_ENV
                  value: 50
          restartPolicy: Never