Suddenly dotfiles installation not working

Looks like some has changed recently in dotfiles cloning and installation within the container.
Seems cloning is done to persisted volume and then soft linked to home directory. And finally install.sh script is called with a wrong path (seems like a bug)

Creation logs.

OPERATION_ID=84113248-98ea-4e19-acbd-6e38fe4a2a79 /.codespaces/agent/bin/codespaces exec docker exec   bf66f08ffba2 git clone --recurse-submodules https://github.com/jahan01/dotfiles "/home/vscode/.codespaces/.persistedshare/dotfiles"
[VS Online][84113248-98ea-4e19-acbd-6e38fe4a2a79] Cloning into '/home/vscode/.codespaces/.persistedshare/dotfiles'...
[VS Online][84113248-98ea-4e19-acbd-6e38fe4a2a79] 
[VS Online][84113248-98ea-4e19-acbd-6e38fe4a2a79] 
[VS Online][84113248-98ea-4e19-acbd-6e38fe4a2a79] Process finished successfully.
OPERATION_ID=3b4b4b39-ad39-4b5d-a728-fb0edd036670 /.codespaces/agent/bin/codespaces exec docker exec   bf66f08ffba2 ln -sfn /home/vscode/.codespaces/.persistedshare/dotfiles /home/vscode/dotfiles
[VS Online][3b4b4b39-ad39-4b5d-a728-fb0edd036670] 
[VS Online][3b4b4b39-ad39-4b5d-a728-fb0edd036670] 
[VS Online][3b4b4b39-ad39-4b5d-a728-fb0edd036670] Process finished successfully.
root@8fc39599-4d04-47e6-b0e2-8b9560a72c4a:/root# OPERATION_ID=43cda07c-5f15-40ab-916a-008e767ecd74 /.codespaces/agent/bin/codespaces exec docker exec   -w "/home/vscode/dotfiles" bf66f08ffba2 bash /var/lib/docker/vsonlinemount/.persistedshare/dotfiles/install.sh
[VS Online][43cda07c-5f15-40ab-916a-008e767ecd74] bash: /var/lib/docker/vsonlinemount/.persistedshare/dotfiles/install.sh: No such file or directory
[VS Online][43cda07c-5f15-40ab-916a-008e767ecd74] 
[VS Online][43cda07c-5f15-40ab-916a-008e767ecd74] 
[VS Online][43cda07c-5f15-40ab-916a-008e767ecd74] Process exited with non - zero result (127).

Cloned dir: /home/vscode/.codespaces/.persistedshare/dotfiles
install script called like: /var/lib/docker/vsonlinemount/.persistedshare/dotfiles/install.sh: No such file or directory

Ideally would expect install.sh to be called like ~/dotfiles/install.sh (pointing to the softlinked dir)

I think permissions are also now bit messed up. The dotfiles directory is linked a root user but my container user is non root user.

Same problem here. I see it cloning my dotfiles repo but it never runs install.sh, I also see the “install.sh: No such file or directory” error, yet when I go into ~/dotfiles it’s there I can run it manually

Something is broken I’m sure this used to work

Sorry for the issues. We did roll out a change this week with a different architecture for the Codespaces agent which improves creation/resume times and has a couple other benefits. It sounds like there’s a bug with the changes to the dotfiles setup though. We’re investigating.

Thanks again for reporting. We’ve identified the issue and are working on a fix.

We have rolled out a fix and the dotfiles installations should be now working as expected.
Thank you for reporting and your patience.

Regards,
Eljo

1 Like

thanks @eljog for quicly fixing it.

However running container with non-root user is still a problem. Dotfiles installation is run as a root user, hence it is installed only to root home. This used work correctly earlier.

My setup looks like this:
devcontainer.json:

{
	// ...
	// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
	"remoteUser": "vscode",
}

Docker image: mcr.microsoft.com/vscode/devcontainers/java:11

Hi @jahan01 sorry for the issue and thank you for taking the time to report this.
We will look into this and keep you posted.

@jahan01
We have rolled out a fix, and now the repos that has a “remoteUser” set in the devcontainer.json should work as expected.
The issue that cause doftiles be owned by the root user should also be resolved by now.

We appreciate your patience and thank you again for reporting the issues.

-Eljo

1 Like