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

make release-binaries fails on macOS with a VCS error. #4881

Open
nrb opened this issue Mar 18, 2024 · 2 comments
Open

make release-binaries fails on macOS with a VCS error. #4881

nrb opened this issue Mar 18, 2024 · 2 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-priority triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@nrb
Copy link
Contributor

nrb commented Mar 18, 2024

/kind bug
/triage accept

What steps did you take and what happened:

Running make release, or more specifically, make release-binaries during the release process from a macOS machine (Intel or Apple silicon) will result in the following error:

error obtaining VCS status: exit status 128
        Use -buildvcs=false to disable VCS stamping.

This is happening because the directory name inside the container (/workspace) differs from the directory name on the host and in the checkout's .git repository.

What did you expect to happen:

make release succeeds without git vcs errors.

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]

This is fixed by calling git config safe.directory /workspace, but might take some testing to figure out exactly where that needs to go.

Testing has shown that mounting the .git/config file inside the container will work, too, as long as it's in a global or system-wide location that git recognizes, not within the directory that's untrusted.

Also, we do not want to follow the advice of the message to set -buildvcs=false, since that disables the version information being inserted into the binary at Go build time.

Environment:

  • OS (e.g. from /etc/os-release): macOS
    During v2.4.1 release process
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Mar 18, 2024
@k8s-ci-robot
Copy link
Contributor

@nrb: The label(s) triage/accept cannot be applied, because the repository doesn't have them.

In response to this:

/kind bug
/triage accept

What steps did you take and what happened:

Running make release, or more specifically, make release-binaries during the release process from a macOS machine (Intel or Apple silicon) will result in the following error:

error obtaining VCS status: exit status 128
       Use -buildvcs=false to disable VCS stamping.

This is happening because the directory name inside the container (/workspace) differs from the directory name on the host and in the checkout's .git repository.

What did you expect to happen:

make release succeeds without git vcs errors.

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]

This is fixed by calling git config safe.directory /workspace, but might take some testing to figure out exactly where that needs to go.

Testing has shown that mounting the .git/config file inside the container will work, too, as long as it's in a global or system-wide location that git recognizes, not within the directory that's untrusted.

Also, we do not want to follow the advice of the message to set -buildvcs=false, since that disables the version information being inserted into the binary at Go build time.

Environment:

  • OS (e.g. from /etc/os-release): macOS
    During v2.4.1 release process

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Mar 18, 2024
@nrb
Copy link
Contributor Author

nrb commented Mar 18, 2024

/assign
/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-priority triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

2 participants