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

go vet ./... returns error and breaks build since 0.81.0 #1579

Closed
trakhimenok opened this issue Jun 10, 2022 · 1 comment
Closed

go vet ./... returns error and breaks build since 0.81.0 #1579

trakhimenok opened this issue Jun 10, 2022 · 1 comment
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@trakhimenok
Copy link

trakhimenok commented Jun 10, 2022

Starting from 0.81 when running go vet ./... on my project am getting this error:

Error: ../../../go/pkg/mod/cloud.google.com/go/storage@v1.21.0/writer.go:[4]
(https://github.com/.../runs/...?check_suite_focus=true#step:7:5)[5]
(https://github.com/.../runs/...?check_suite_focus=true#step:7:6)1:24:
undefined: storage.CommonRequestParams

And it breaks our build.

Environment details

  • Programming language: Go
  • OS: Mac OS X
  • Language runtime version: go1.18 darwin/arm64
  • Package version: 0.81-0.83

Steps to reproduce

  1. Create a project that usess google-api-go-client v > 0.80
  2. run go vet ./...
##### Output
go vet ./...
  shell: /usr/bin/bash -e {0}
go: downloading github.com/golang/mock v1.6.0
go: downloading github.com/stretchr/testify v1.7.2
go: downloading github.com/davecgh/go-spew v1.1.1
go: downloading github.com/pmezard/go-difflib v1.0.0
go: downloading gopkg.in/yaml.v[3](https://github.com/.../runs/...?check_suite_focus=true#step:7:3) v3.0.1
# cloud.google.com/go/storage
Error: ../../../go/pkg/mod/cloud.google.com/go/storage@v1.21.0/writer.go:[4](https://github.com/.../runs/...?check_suite_focus=true#step:7:5)[5](https://github.com/.../runs/...?check_suite_focus=true#step:7:6)1:24: undefined: storage.CommonRequestParams
Error: ../../../go/pkg/mod/cloud.google.com/go/storage@v1.21.0/writer.go:453:23: undefined: storage.CommonRequestParams
Error: ../../../go/pkg/mod/cloud.google.com/go/storage@v1.21.0/writer.go:4[6](https://github.com/.../runs/...?check_suite_focus=true#step:7:7)1:3: unknown field 'CommonRequestParams' in struct literal of type "google.golang.org/genproto/googleapis/storage/v2".StartResumableWriteRequest
Error: Process completed with exit code 2.

Expected behaviour

We would expect go vet ./... to be run in CI on google-api-go-client repo so it does not block other who run go vet ./....

@trakhimenok trakhimenok added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Jun 10, 2022
@codyoss
Copy link
Member

codyoss commented Jun 10, 2022

It looks like the issue you are having is in our sister repo googleapis/google-cloud-go. To fix this issue though please ensure you are pulling in the latest for cloud.google.com/go/storage and for go-genproto. Upping both should fix the issue.

Updates: googleapis/google-cloud-go#6055

@codyoss codyoss closed this as completed Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

2 participants