Skip to content

Bad error message when config.yaml is missing the 'image' key #222

@f18m

Description

@f18m

I noticed that when I try to use the builder to build the container image for my addon, if config.yaml is missing the 'image' key, I get a weird error message at some point saying:

10:36:29] INFO: Setup crosscompiling feature
[10:36:29] WARNING: Can't enable crosscompiling feature
[10:36:29] INFO: Starting docker.
[10:36:29] INFO: Waiting for docker to initialize...
[10:36:30] INFO: Docker was initialized
[10:36:30] INFO: Run addon build for: armhf armv7 amd64 i386 aarch64
[10:36:30] INFO: Init cache for /:0.0.1 with tag latest and platform linux/amd64
[10:36:30] INFO: Init cache for /:0.0.1 with tag latest and platform linux/arm/v6
[10:36:30] INFO: Init cache for /:0.0.1 with tag latest and platform linux/386
[10:36:30] INFO: Init cache for /:0.0.1 with tag latest and platform linux/arm/v7
[10:36:30] INFO: Init cache for /:0.0.1 with tag latest and platform linux/arm64
[10:36:30] WARNING: No cache image found. Disabling cache for this build.
[10:36:30] WARNING: No cache image found. Disabling cache for this build.
[10:36:30] WARNING: No cache image found. Disabling cache for this build.
[10:36:30] WARNING: No cache image found. Disabling cache for this build.
[10:36:30] WARNING: No cache image found. Disabling cache for this build.
[10:36:30] INFO: Run build for /:0.0.1 with platform linux/arm/v7
[10:36:30] INFO: Run build for /:0.0.1 with platform linux/386
[10:36:30] INFO: Run build for /:0.0.1 with platform linux/arm/v6
[10:36:30] INFO: Run build for /:0.0.1 with platform linux/amd64
[10:36:30] INFO: Run build for /:0.0.1 with platform linux/arm64
ERROR: invalid tag "/:0.0.1": invalid reference format
ERROR: invalid tag "/:0.0.1": invalid reference format
ERROR: invalid tag "/:0.0.1": invalid reference format
ERROR: invalid tag "/:0.0.1": invalid reference format
ERROR: invalid tag "/:0.0.1": invalid reference format

I think builder should validate if it has all the info needed BEFORE trying to kick off the build, and give a readable error message if not

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions