[go: up one dir, main page]

Improve UX for error messaging for dynamic inputs

The following discussion from !214046 (merged) should be addressed:

  • @avielle started a discussion: (+2 comments)

    In the example config from the MR description, this input:

        # Level 3: Depends on environment + deployment_type
        canary_percentage:
          description: 'Canary rollout percentage'
          rules:
            - if: $[[ inputs.deployment_type ]] == 'canary' && $[[ inputs.environment ]] == 'production'
              options: ['10', '25', '50', '75']
              default: '25'
            - if: $[[ inputs.deployment_type ]] == 'canary' && $[[ inputs.environment ]] == 'staging'
              options: ['50', '100']
              default: '50'
            - if: $[[ inputs.deployment_type ]] == 'canary'
              options: ['100']
              default: '100'
            - options: []

    is giving me this error in the CI editor

    This GitLab CI configuration is invalid: `canary_percentage` input: `` cannot be used because it is not in the list of allowed options

    Is that what we expect?

Edited by 🤖 GitLab Bot 🤖