-
Notifications
You must be signed in to change notification settings - Fork 168
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
Unable to run make hack-build-cli #1789
Comments
I have a feeling it came from thsi changes because I remember that in mid February I didn't have such issues yet: |
@webstradev can you try deleting the Docker volume named I believe anyone who contributed prior to #1517 might be encountering this and that is a one-time fix that seems to work. |
So I had already done this as Christian pointed it out in discord. I was experiencing another issue also cause bij #1517. |
Hmm. Ok will look at this close during the week. |
Happy to help you debug it on my machine if that makes things easier @krancour |
Can you share some more information about your macOS and Docker setup? As both Kent and I are on macOS where it works fine, I think we have to figure out what's different for your machine. |
I'm on a m2 Macbook Pro with Ventura 13.5.2 Also something that I noticed, hack-build-cli fails, hack-lint-go fails with the same error but hack-unit-test passess just fine. |
Some additional logging from adding -v to the build command State=" cd /workspaces/kargo; git status --porcelainfatal: detected dubious ownership in repository at '/workspaces/kargo'
error obtaining VCS status: exit status 128 some further digging shows this; |
fwiw... we have always had to set |
Is that because you set version related information via ldflags anyways and you don't need the vcs metadata? FYI I have just checked out the commit before #1517 and make hack-build-cli does work properly there so it is likely to be something that changed in that PR |
It's not strictly because of it, but at some point when first developing those automations, we must have encountered this same issue and decided that we could forgo the VCS metadata without worry due to what we were doing with the ldflags already. My search history shows I first looked up this issue 8 months ago! |
I agree this seems likely. |
Can you try erasing the node modules directory and then rerunning the command? |
I have nothing in there as I just recloned the whole repo. |
Anything else you would like me to try here, or alternatively i can make a pr to add -buildvcs=false to the goflags |
We're already passing all necessary version info in through other means, so I think I would find this acceptable. Thank you! |
Checklist
kargo version
.Description
This isn't a bug in Kargo just in the Makefile so only relevant for developers/contributors
When running make hack-build-cli I encounter the following error:
docker run -it --rm -v gomodcache:/home/user/gocache -v /Users/webstradev/development/personal/kargo/:/workspaces/kargo -v /workspaces/kargo/ui/node_modules -w /workspaces/kargo kargo:dev-tools sh -c 'GOOS=darwin GOARCH=arm64 make build-cli' CGO_ENABLED=0 go build \ -ldflags "-w -X github.com/akuity/kargo/internal/version.version= -X github.com/akuity/kargo/internal/version.buildDate=$(date -u +'%Y-%m-%dT%H:%M:%SZ') -X github.com/akuity/kargo/internal/version.gitCommit= -X github.com/akuity/kargo/internal/version.gitTreeState=" \ -o bin/kargo-darwin-arm64 \ ./cmd/cli error obtaining VCS status: exit status 128 Use -buildvcs=false to disable VCS stamping. make: *** [Makefile:109: build-cli] Error 1 make: *** [hack-build-cli] Error 2 webstradev@Eriks-MacBook-Pro kargo %
When I add -buildvcs - false, as the error message suggests it works just fine.
Running make build-cli (without the hack) also works as intended.
Screenshots
Steps to Reproduce
switch to main branch, run make hack-build-cli
Version
not applicable as I can't successfully build the CLI
Logs
See description.
The text was updated successfully, but these errors were encountered: