You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hassio local build seems to have a faulty regular expression in place, responsible for validating build_from images. This causes troubles with building an add-on locally within Hass.io/Home Assistant.
Example from a local build that fails:
�[31m17-10-15 19:09:27 ERROR (SyncWorker_6) [hassio.tools] Can't parse /data/addons/local/addon-example/example/build.json -> does not match regular expression for dictionary value @ data['build_from']['aarch64']. Got 'hassioaddons/base-aarch64:1.0.0'
does not match regular expression for dictionary value @ data['build_from']['amd64']. Got 'hassioaddons/base-amd64:1.0.0'
does not match regular expression for dictionary value @ data['build_from']['armhf']. Got 'hassioaddons/base-armhf:1.0.0'
does not match regular expression for dictionary value @ data['build_from']['i386']. Got 'hassioaddons/base-i386:1.0.0'�[0m
In the above case hassioaddons/base-aarch64:1.0.0 is not accepted as a valid container name, while it is. I've been able to reproduce it with other containers as well, like alpine:3.6.
Currently used regular expression: ^[\-\w{}]+/[\-\w{}]+:[\-\w{}]+$
Demo with missing matches: http://regexr.com/3gve8
Proposed changes
Change the Voluptuous build config schema to allows for these images.
Change the regular expression to: ^([\-\w{}]+/)?[\-\w{}]+:[\-\.\w{}]+$
Tests over here: https://regexr.com/3gve2
The text was updated successfully, but these errors were encountered:
# Should not match, `-` is not allowed in vendor (not sure if this is a Docker Hub limitation)
home-assistant/base:latest
# These all match perfectly
homeassistant/base:latest
homeassistant/base:latest
# These don't match, but should
homeassistant/base-test:1.0.0
homeassistant/base-test:1.0
homeassistant/base:1.0.0
homeassistant/base:1.0
alpine:3.6
WARNING (MainThread) [hassio.store.data] Can't read /data/addons/local/my-addon/config.json: does not match regular expression for dictionary value @ data['image']. Got 'dockeruser/nice-app-1.2'
Current used regular expression: ^[\w{}]+/[\-\w{}]+$
It should be: ^[\w{}]+/[\-\.\w{}]+$
Problem/Motivation
Hassio local build seems to have a faulty regular expression in place, responsible for validating
build_from
images. This causes troubles with building an add-on locally within Hass.io/Home Assistant.Example from a local build that fails:
In the above case
hassioaddons/base-aarch64:1.0.0
is not accepted as a valid container name, while it is. I've been able to reproduce it with other containers as well, likealpine:3.6
.Currently used regular expression:
^[\-\w{}]+/[\-\w{}]+:[\-\w{}]+$
Demo with missing matches: http://regexr.com/3gve8
Proposed changes
Change the Voluptuous build config schema to allows for these images.
Change the regular expression to:
^([\-\w{}]+/)?[\-\w{}]+:[\-\.\w{}]+$
Tests over here: https://regexr.com/3gve2
The text was updated successfully, but these errors were encountered: