Add client registry validations when set via config by neel-astro · Pull Request #1969 · astronomer/astro-cli

Description

Changes:

  • Add a generic concept of validation for CLI configs
  • Add validation for client registry config

🎟 Issue(s)

Inconsistent validation for client registry when set via astro dev init vs astro config set

🧪 Functional Testing

❯ ../astro config set remote.client_registry test
Error: invalid value for remote.client_registry: registry endpoint must be in format 'registry/repository' (e.g. quay.io/acme/my-deployment-image)
❯ ../astro dev init --remote-execution-enabled --remote-image-repository test
Error: unable to get registry endpoint: invalid registry endpoint format: registry endpoint must be in format 'registry/repository' (e.g. quay.io/acme/my-deployment-image)
❯ ../astro dev init --remote-execution-enabled
Enter the remote Docker repository for the client image (leave blank if not known but you will not be able to use the Astro CLI to deploy the client image until configured)
Remote client image repository endpoint (e.g. quay.io/acme/my-deployment-image): test
Error: unable to get registry endpoint: invalid registry endpoint format: registry endpoint must be in format 'registry/repository' (e.g. quay.io/acme/my-deployment-image)

📸 Screenshots

Add screenshots to illustrate the validity of these changes.

📋 Checklist

  • Rebased from the main (or release if patching) branch (before testing)
  • Ran make test before taking out of draft
  • Ran make lint before taking out of draft
  • Added/updated applicable tests
  • Tested against Astro-API (if necessary).
  • Tested against Houston-API and Astronomer (if necessary).
  • Communicated to/tagged owners of respective clients potentially impacted by these changes.
  • Updated any related documentation