Skip to content

Adds field validation to Google Cloud runner registration

What does this MR do and why?

This change adds field by field validation to the "Specify environment" form in the Google Cloud Runner registration step.

As the user inputs data, each of the fields is validated according to the expected syntax so users can easily identify if they have added the data correctly.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before After
image image

How to set up and validate locally

  1. Simulate a SaaS instance in your GDK
  2. Enable the feature flag
 echo "Feature.enable(:google_cloud_support_feature_flag)" | rails c
  1. Visit project creation views (should not be available on admin and groups for now)
  2. Select google cloud radio option (for platform)
  3. Create runner
  4. New options should show for register view if you chose the google cloud platform option
  5. Existing runner options should still show for other platform selections
  6. Fill the form values with incorrect values. They should lead you to input correct fields like:
    "Google cloud project ID": "dev-gcp-s3c-integrati-9abafed1",
    "region": "us-central1",
    "zone": "us-central1-a",
    "machine": "n2d-standard-2"
  1. Click the Show instructions button and you should be able to see the instructions (or a button prompting you to fix the values)

Related to #444240 (closed)

Edited by Miguel Rincon

Merge request reports