envbuilder
envbuilder copied to clipboard
Fallback not working when invalid Dockerfile in coder workspace
When I use devcontainer in coder (kubernetes) from this template:
And change the Dockerfile to this and restart: Dockerfile: INVALID FROM qmcgaw/godevcontainer
Then envbuilder is not detecting the failure and is not reverting to the fallback image
I can confirm, this behavior does in fact not match our documentation. This should only happen when exit on build failure is used but that's not the case. There are multiple code paths where we end up returning an error instead of using the fallback image.
We'll need to refactor the fallback logic to fix this.
Maybe also make it that from the coder ui like with templates, so one can edit the devcontainer.json directly from there. So one could make changes faster if it doesn't work.
@datapedd I'm not sure what you're askin. Are you asking to be able to provide devcontainer.json contents as e.g. an base64-encoded environment variable?
ENVBUILDER_DEVCONTAINER_JSON_BASE64=eyJpbWFnZSI6InVidW50dTpsYXRlc3QifQo=
That's certainly one way we could support the use-cases of plumbing the JSON through from the template to envbuilder.
no just when the build failed that one can still change the devcontainer.json from coder ui. Or just make it that this case does not happen that if a build fails one can always fallback to a image where i then can change the devcontainer.json