Skip to content

[SE-5544] Explicitly raise errors on invalid instance names

Boros Gábor requested to merge gabor/instance-name-restrictions into main

Description

This PR implements explicit error return on not complying instance names. The instance names will be "slugified" (properly, not as we did before) on Instance object initialization.

Also, instance name validation is introduced upon instance creation to fail instance creation as necessary.

Supporting information

Currently, instance creation allows invalid names, but that results in terraform or other script failures.

Testing instructions

Steps to test the changes:

  1. Proofread the code
  2. Check pipeline to fail: https://gitlab.com/opencraft/ops/grove-stage-digitalocean/-/jobs/2442436386#L33
  3. Check pipeline to pass: https://gitlab.com/opencraft/ops/grove-stage-digitalocean/-/pipelines/536563798

Dependencies

N/A

Screenshots

N/A

Checklist

If any of the items below is not applicable, do not remove them, but put a check in it.

  • All providers include the new feature/change
  • All affected providers can provision new clusters
  • Unit tests are added/updated
  • Documentation is added/updated
  • The TOOLS_CONTAINER_IMAGE_VERSION in ci_vars.yml is updated
  • The grove-template repository is updated

Additional context

N/A

Edited by Boros Gábor

Merge request reports