-
Notifications
You must be signed in to change notification settings - Fork 43
Change a devcontainer's image to an invalid image, causes a failed pod and the UI to loop endlessly #20
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
Comments
Issue appears to be referencing the devcontainer-kubernetes/main.tf example template. |
Passing the image name Build logs: envbuilder - Build development environments from repositories in a container
#1: 📦 Cloning invalid-url to /workspaces/invalid-url...
Failed to clone repository: clone "invalid-url": exec: "git": executable file not found in $PATH
Falling back to the default image...
#2: Deleting filesystem...
#2: 🏗️ Building image...
#2: Retrieving image manifest codercom/enterprise-base:ubuntu
... $ coder ssh bob
coder@coder-danny-bob-69b8f664ff-fk6c4:/workspaces$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy This satisfied the first clause of the feature: https://pkg.go.dev/github.com/coder/envbuilder#section-readme
I'm now going to test out how it behaves when an invalid devcontainer/Dockerfile works. |
An invalid devcontainer also falls back just fine: I used this devcontainer: (note the invalid JSON). #1: 📦 Cloned repository! [1.178864329s]
Failed to parse devcontainer.json: standardize json: hujson: line 5, column 5: invalid character ']' after object value (expecting ',' or '}')
Falling back to the default image...
#2: Deleting filesystem...
#2: 🏗️ Building image...
#2: Retrieving image manifest codercom/enterprise-base:ubuntu
... $ coder ssh bob
coder@coder-danny-bob-84998f4f99-5z9cb:/workspaces$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy |
An invalid Dockerfile also falls back just fine: I used this devcontainer: (note the invalid Dockerfile) #1: 📦 Cloned repository! [851.098596ms]
#2: Deleting filesystem...
#2: 🏗️ Building image...
Failed to build: parsing dockerfile: dockerfile parse error on line 1: unknown instruction: INVALID
Falling back to the default image...
#2: Deleting filesystem...
#3: 🏗️ Building image...
#2: Retrieving image manifest codercom/enterprise-base:ubuntu
... $ coder ssh bob
coder@coder-danny-bob-84998f4f99-5z9cb:/workspaces$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy |
Closing, this bug no longer exists. |
This was fixed by #30 |
evnbuilder
should detect the image is incorrect, and fall back to the FALLBACK_IMAGE.kubectl
reveals theCrashLoopBackOff
and the UI just stays in an endless loop.You resolve it, in my example template, by choosing another Parameter devcontainer
The text was updated successfully, but these errors were encountered: