poetry
Sometimes garden
fails with this error from poetry
:
1INFO[0043] Running: [/bin/sh -c poetry install --no-interaction --no-ansi] 2Skipping virtualenv creation, as specified in config file. 3 4 TypeError 5 6 expected string or bytes-like object 7 8 at /usr/local/lib/python3.8/site-packages/poetry/core/utils/helpers.py:27 in canonicalize_name 9 23│ _canonicalize_regex = re.compile(r"[-_]+") 10 24│ 11 25│ 12 26│ def canonicalize_name(name): # type: (str) -> str 13 → 27│ return _canonicalize_regex.sub("-", name).lower() 14 28│ 15 29│ 16 30│ def module_name(name): # type: (str) -> str 17 31│ return canonicalize_name(name).replace(".", "_").replace("-", "_") 18error building image: error building stage: failed to execute command: waiting for process to exit: exit status 1
This issue is usually caused when a build gets interrupted (eg by quitting
garden
with ctrl+c
) and the layer cache becomes corrupted.
You can clear out the Docker cache with:
1garden --env=dev plugins kubernetes cleanup-cluster-registry
This will clear up the cache, but also exit with an error:
1ℹ Cleaning up old workspaces from build sync volume... 2Got error from Kubernetes API - deployments.apps "garden-build-sync" not found
You can safely disregard this error. Try running your garden
command again,
and it should be able to build your image correctly.
1Error: unknown command ".sources | map(select( .name == (load(\"garden.dev.env.yaml\") | .projects-to-deploy[] ) ))" for "yq"
yq should be at least version 4.28.1. You can re-run the install.sh script.