az-hop icon indicating copy to clipboard operation
az-hop copied to clipboard

packer: move check for image definition in `config.yml` before image creation process

Open ltalirz opened this issue 1 year ago • 0 comments

In what area(s)?

/area administration /area ansible /area autoscaling /area configuration /area cyclecloud /area documentation /area image /area job-scheduling /area monitoring /area ood /area remote-visualization /area user-management

Describe the feature

Currently, if one adds a new packer image but does not add a matching definition to the config.yml file, the packer build completes, and only afterwards you get an error message like

./build.sh -i new-image.json
...
Read image definition from ../config.yml
argument --offer/-f: expected one argument

and the script does not create the image version.

I have two asks here

  • as far as I am aware, the image metadata is known beforehand. if so, please move the check for the definition of the image before the actual packer build
  • please provide a more helpful error message if the definition is missing

cc @matt-chan

ltalirz avatar Mar 22 '23 20:03 ltalirz