Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback not working when invalid Dockerfile in coder workspace #374

Open
datapedd opened this issue Sep 28, 2024 · 4 comments
Open

Fallback not working when invalid Dockerfile in coder workspace #374

datapedd opened this issue Sep 28, 2024 · 4 comments

Comments

@datapedd
Copy link

datapedd commented Sep 28, 2024

When I use devcontainer in coder (kubernetes) from this template:

template_workspace_coder.txt

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
image

image

@coder-labeler coder-labeler bot added the bug label Sep 28, 2024
@mafredri
Copy link
Member

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.

@datapedd
Copy link
Author

datapedd commented Oct 3, 2024

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.

@mafredri
Copy link
Member

mafredri commented Oct 3, 2024

@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.

@matifali matifali removed the bug label Oct 15, 2024
@datapedd
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants