Require "Variable Key" field in Scheduled Pipeline Creation Page

Summary

When creating a Scheduled Pipeline, the form does not require the user to enter a Variable Key value. They are able to create a pipeline schedule with the blank key value which then causes the pipeline to immediately fail with this error message:

ERROR: Job failed (system failure): prepare environment: Error response from daemon: invalid environment variable: =TEST (docker.go:659:0s). Check https://docs.gitlab.com/runner/shells/index.html#shell-profile-loading for more information

Steps to reproduce

  1. New project->Create blank Project
  2. Call it “test-blank-pipeline-variable”, Private, Initialize repository with a README
  3. Click the “Set up CI/CD” button->Configure pipeline->Commit changes
  4. Schedules->New Schedule
  5. Enter the folloing information: Description “test”, Schedule Timezone, Variable key (nothing), value “TEST”, and be sure to set Active checkbox to unchecked.
  6. Save Pipeline schedule (it saves…probably should not, though due to the missing key)
  7. Click the “play” button (Run) this scheduled pipeline you just created.

What is the current bug behavior?

The empty key value is saved successfully, the pipeline is triggered, but fails due to the lack of the key value.

What is the expected correct behavior?

The Variable Key field is made into a "Required field" in order to save the scheduled pipeline, much like the Schedule Timezone field.

Relevant logs and/or screenshots

ERROR: Job failed (system failure): prepare environment: Error response from daemon: invalid environment variable: =TEST (docker.go:659:0s). Check https://docs.gitlab.com/runner/shells/index.html#shell-profile-loading for more information

Output of checks

This bug happens on GitLab.com reproduced on GitLab.com

Possible fixes

Make the Variable Key Field required in the Scheduled Pipelines page.