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: Make devcontainer able to pre-commit #11153

Merged
merged 1 commit into from
May 30, 2023

Conversation

Joibel
Copy link
Member

@Joibel Joibel commented May 28, 2023

make pre-commit doesn't work in devcontainer, with this commit it does.

Motivation

I'd like an easy way for everyone to be able to maintain workflows, and devcontainers are nearly there.

Modifications

This fixes that by
a) Moving GOPATH to /home/vscode/go
b) Installing protoc (apt package protobuf-compiler)
c) Ensuring ~/go is writable (so subdirs can be created)
d) Ensuring /home/vscode/go/bin is on the path too

Using /home/vscode/go rather than /go is necessary when doing all the protocol malarky due to requirements on subdirectories.

Verification

Launched a new devcontainer with these changes, and ensure make pre-commit reaches the end successfully. The resulting tree is unchanged, so all the generated code matches that in git.

make pre-commit doesn't work in devcontainer, with this commit it does.

This fixes that by
a) Moving GOPATH to /home/vscode/go
b) Installing protoc (apt package protobuf-compiler)
c) Ensuring ~/go is writable (so subdirs can be created)
d) Ensuring /home/vscode/go/bin is on the path too

Using /home/vscode/go rather than /go is necessary when doing all the
protocol malarky due to requirements on subdirectories.

Signed-off-by: Alan Clucas <alan@clucas.org>
@Joibel Joibel marked this pull request as ready for review May 29, 2023 20:55
@terrytangyuan terrytangyuan merged commit 58793a8 into argoproj:master May 30, 2023
@Joibel Joibel deleted the devcontainer-pc branch June 1, 2023 09:17
JPZ13 pushed a commit to pipekit/argo-workflows that referenced this pull request Jul 4, 2023
Signed-off-by: Alan Clucas <alan@clucas.org>
terrytangyuan pushed a commit that referenced this pull request Jul 19, 2023
Signed-off-by: Alan Clucas <alan@clucas.org>
@agilgur5 agilgur5 added the area/build Build or GithubAction/CI issues label Jan 29, 2024
dpadhiar pushed a commit to dpadhiar/argo-workflows that referenced this pull request May 9, 2024
Signed-off-by: Alan Clucas <alan@clucas.org>
Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
@agilgur5 agilgur5 added the area/contributing Contributing docs, ownership, etc. Also devtools like devcontainer and Nix label May 29, 2024
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.

3 participants