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

fix: silence devcontainer Permission denied error. Fixes #13109 #13111

Merged
merged 1 commit into from
May 29, 2024

Conversation

Adrien-D
Copy link
Member

@Adrien-D Adrien-D commented May 29, 2024

Fixes #13109

Motivation

chown command fails for some reason on .git folder on my mac M1

Modifications

I silenced the error by adding || true on the failing command on .devcontainer/pre-build.sh

-> The error is probably due to a mac-specific thing. It'll be to do with how the OS has mounted that volume to the dev docker container
-> There is no gitignore-style file for devcontainers, to ignore .git directory

Verification

The impact of the change are quite small, but the process reached the end

Screenshot 2024-05-29 at 15 16 01

Signed-off-by: Adrien Delannoy <a.delannoyfr@gmail.com>
@agilgur5 agilgur5 changed the title fix: Permission Denied error. Fixes #13109 fix: silence devcontainer Permission denied error. Fixes #13109 May 29, 2024
@agilgur5 agilgur5 added the area/contributing Contributing docs, ownership, etc. Also devtools like devcontainer and Nix label May 29, 2024
Copy link
Member

@agilgur5 agilgur5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if this might accidentally break anything, but @Joibel, I, and others have run into this before.

Approving as this does solve the error in the interim (root cause fix would be preferred) but will give final say to Alan

@Joibel
Copy link
Member

Joibel commented May 29, 2024

I added the chmod in the first place, so this is an incremental improvement upon the breakage that adding it has caused.

More people will successfully run devcontainers now hopefully.

@Joibel Joibel merged commit fce51df into argoproj:main May 29, 2024
18 checks passed
@agilgur5 agilgur5 added the area/build Build or GithubAction/CI issues label May 29, 2024
@agilgur5
Copy link
Member

Ah in #11153 part c). I rarely rebuild my devcontainer but IIRC I did have bugs with and without the chown.
It would be more optimal if we could just mount the directory as the user; IIRC the chown -R takes some time to get through every single file. Otherwise, a more selective chown might be possible (skipping .git, for instance)

@Adrien-D Adrien-D deleted the fix-devcontainer-build branch May 30, 2024 07:12
ATGardner pushed a commit to codefresh-io/argo-workflows that referenced this pull request Jul 14, 2024
…3109 (argoproj#13111)

Signed-off-by: Adrien Delannoy <a.delannoyfr@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build Build or GithubAction/CI issues area/contributing Contributing docs, ownership, etc. Also devtools like devcontainer and Nix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Devcontainer Permission denied error during chown
3 participants