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

Add -buildvcs=false flag to fix golint script #2302

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

z1cheng
Copy link
Member

@z1cheng z1cheng commented Aug 14, 2023

What type of PR is this?

/kind bug

What this PR does / why we need it:

Got such errors while running hack/verify-golint.sh:

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

So add -buildvcs=false to fix the errors

Which issue(s) this PR fixes:

Fixes #2071

Does this PR introduce a user-facing change?:

NONE

Signed-off-by: z1cheng <imchench@gmail.com>
@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Aug 14, 2023
@k8s-ci-robot
Copy link
Contributor

Welcome @z1cheng!

It looks like this is your first PR to kubernetes-sigs/gateway-api 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/gateway-api has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @z1cheng. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 14, 2023
@z1cheng
Copy link
Member Author

z1cheng commented Sep 10, 2023

@shaneutt Please take a look at the PR when you're available :)

/assign @shaneutt

@shaneutt
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 11, 2023
@shaneutt
Copy link
Member

I feel like I might be missing something.

golang/go#52338 seems to suggest that this is the default since v1.18.1 and the image we're using golangci/golangci-lint:v1.52.2 contains Go 1.20.2, so shouldn't this change in the flag be a no-opt?

@robscott
Copy link
Member

Hey @z1cheng, thanks for the PR! Can you help explain a bit more why this flag is necessary per @shaneutt's question above?

@z1cheng
Copy link
Member Author

z1cheng commented Dec 14, 2023

@shaneutt @robscott Sorry for my delayed response, from https://pkg.go.dev/cmd/go@go1.20.2, the default value is "auto":

    -buildvcs
            Whether to stamp binaries with version control information
            ("true", "false", or "auto"). By default ("auto"), version control
            information is stamped into a binary if the main package, the main module
            containing it, and the current directory are all in the same repository.
            Use -buildvcs=false to always omit version control information, or
            -buildvcs=true to error out if version control information is available but
            cannot be included due to a missing tool or ambiguous directory structure.

If not set the flag to false, go list all will return errors:

root@8d1c1387d170:/app# go list all
error obtaining VCS status: exit status 128
        Use -buildvcs=false to disable VCS stamping.
error obtaining VCS status: exit status 128
        Use -buildvcs=false to disable VCS stamping.

@robscott
Copy link
Member

Thanks for clarifying @z1cheng! This LGTM with that context.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 14, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: robscott, z1cheng

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 14, 2023
@k8s-ci-robot k8s-ci-robot merged commit 8672410 into kubernetes-sigs:main Dec 14, 2023
9 checks passed
@z1cheng z1cheng deleted the fix_lint_error branch December 16, 2023 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed verifying golint while executing make
4 participants