Fail 'deploy' command early on if OCI image resource is missing

Bug #2028204 reported by Leon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Medium
Heather Lanigan

Bug Description

I hit "juju deploy" for a local charm but forgot to specify the image via `--resource`.

After staring a bit too long at "waiting - allocating - installing agent", headed over to debug-log, which said pretty clearly

 ERROR juju.worker.caasapplicationprovisioner.runner exited "trfk": getting OCI image resources: unable to fetch OCI image resources for trfk: while getting resource from charmhub: resource "traefik-image" not found

It would be nice if charm/bundle deployment would fail early on (just like it does for bundle yaml errors) if an OCI image resource is missing.

Revision history for this message
Harry Pidcock (hpidcock) wrote :

Which version did you see this in?

Revision history for this message
Leon (sed-i) wrote :

3.2.0

Changed in juju:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Heather Lanigan (hmlanigan)
Revision history for this message
Heather Lanigan (hmlanigan) wrote :

You can run `juju attach-resource` after an application has been deployed to upload the OCI image.

Apparently there is a method, validateResourcesNeededForLocalDeploy, that is only used when deploying local charms already deployed with a new application name. Using that in the normal local charm deploy path is none trivial, as it would need to be done in a section of code agnostic to where the charm comes from.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.