-
Notifications
You must be signed in to change notification settings - Fork 319
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
Opening a GitHub repo in a container volume doesn't find the devcontainer setup #6454
Comments
Small further discovery, it seems that it is selecting the correct branch. However, rather than cloning it directly from GitHub it's trying to use a cached version from before that branch had the configuration added. |
Thanks for the details @Jademalo. It sounds like the issue was ultimately that the cloned version in the volume had the latest commits, but didn't apply them? |
I did a bit more testing just now, I think I've figured out why this happens. First, create a container from a remote repo that doesn't have a .devcontainer. When it prompts you to automatically initialise a .devcontainer folder, cancel and have the container build fail. What I think is happening is since the container didn't complete building initially, a volume gets created with a clone of the repo. Even if this is changed on the remote, when you try to build the container again it will use this volume and won't try to pull changes nor re-clone the repo. Going into docker and deleting the volume that gets created when the repo is pulled forces it to clone again, and correctly gets the up to date repo. |
Thanks @Jademalo for the great explanation, saved me some time! This just happened to me too, for the same reason. I don't know if or how the solution for this could be implemented. |
Just experienced this as well. I was trying out devcontainers and forgot to upload the .devcontainer folder. I committed it, pushed, but then couldn't understand why I kept hitting the error. |
Hey, are you sure it's not related to #9163 ? |
It's been two and a half years since I made this issue so I can't remember exactly, but I believe I was using GitHub sign in via VSCode rather than a key pair for authentication to download the private repo |
It's basically the same underlying mechanism Can you reproduce your issue nowadays, or has it been fixed in the meantime ? |
I've not used it in a long time, I'll need to find some time to investigate and I'm pretty busy at the moment |
We can improve this by pulling in the latest changes when rebuilding the container and there are no local changes. |
Validated that the latest changes are successfully pulled on rebuilding a dev container cloned into a volume ✅ As mentioned, there needs to be no pending changes for the pull to happen. I wonder if it would be valuable a flow for when the local is dirty. Tracked in #10539 |
Issue Type: Bug
I have a private GitHub repo. Within this repo, I have a branch that includes a full .devcontainer configuration. If I clone the repo locally and switch to the correct branch, it works correctly in a dev container.
However, if I try to clone it into a container volume, even when selecting the correct branch it fails to find the devcontainer configuration. I have double checked the logs and the branch on GitHub, and I'm definitely selecting the correct branch.
No matter what I do, it says no configuration is found, and opens the auto configuration tool to add a dev container setup.
The container setup isn't included in the default branch, but since I'm selecting the specific branch I want to use when creating the container volume I don't see why that should matter.
As you can see from the log and the image, this should work. It seems that it doesn't change branch before trying to create the container, so it doesn't find any config.
Extension version: 0.224.2
VS Code version: Code 1.65.2 (c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1, 2022-03-10T14:33:55.248Z)
OS version: Windows_NT x64 10.0.22000
Restricted Mode: No
System Info
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: