Skip to content

Add legacy build directives necessary for some go versions #832

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

Merged
merged 1 commit into from
Sep 2, 2021

Conversation

mattcary
Copy link
Contributor

@mattcary mattcary commented Sep 2, 2021

/kind bug

What this PR does / why we need it:

Some go versions (at least 1.16) require the legacy +build comments in addition to the new go:build commands. At least, without this change the following error happens when running make with go1.16:

go build -mod=vendor -ldflags "-X main.vendorVersion=v1.0.2-0-g5d19516" -o bin/gce-pd-csi-driver ./cmd/
cmd/main.go:28:2: //go:build comment without // +build comment
pkg/gce-pd-csi-driver/gce-pd-driver.go:28:2: //go:build comment without // +build comment
make: *** [gce-pd-driver] Error 1
Makefile:29: recipe for target 'gce-pd-driver' failed

/release-note-none

Change-Id: If8bea2a20c45154408f79d4e929c6aa75093bc83
@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Sep 2, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mattcary

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 size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 2, 2021
@mattcary
Copy link
Contributor Author

mattcary commented Sep 2, 2021

/release-note-none

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Sep 2, 2021
@saikat-royc
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 2, 2021
@mattcary
Copy link
Contributor Author

mattcary commented Sep 2, 2021

The integration test successfully built the driver. We know the rest of the integration tests will fail, so I'll force-push.

@mattcary mattcary merged commit ff9f4d1 into kubernetes-sigs:release-1.0 Sep 2, 2021
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. 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.

3 participants