firebase / firebase-admin-go

Firebase Admin Go SDK
Apache License 2.0
1.12k stars 239 forks source link

chore: update cloud.google.com/go/storage v1.22.1 #499

Closed shogo82148 closed 1 year ago

shogo82148 commented 2 years ago

I found that the SDK doesn't work with the latest version of google.golang.org/api (v0.81.0). https://github.com/googleapis/google-cloud-go/pull/6061 fixed this problem, and it is released as cloud.google.com/go/storage v1.22.1.

% go test ./...
# cloud.google.com/go/storage
../../../../pkg/mod/cloud.google.com/go/storage@v1.21.0/writer.go:451:24: undefined: storage.CommonRequestParams
../../../../pkg/mod/cloud.google.com/go/storage@v1.21.0/writer.go:453:23: undefined: storage.CommonRequestParams
../../../../pkg/mod/cloud.google.com/go/storage@v1.21.0/writer.go:461:3: unknown field 'CommonRequestParams' in struct literal of type "google.golang.org/genproto/googleapis/storage/v2".StartResumableWriteRequest
FAIL    firebase.google.com/go/v4 [build failed]
ok      firebase.google.com/go/v4/auth  4.368s
ok      firebase.google.com/go/v4/auth/hash 3.276s
ok      firebase.google.com/go/v4/db    2.608s
?       firebase.google.com/go/v4/errorutils    [no test files]
ok      firebase.google.com/go/v4/iid   1.196s
FAIL    firebase.google.com/go/v4/integration/auth [build failed]
FAIL    firebase.google.com/go/v4/integration/db [build failed]
FAIL    firebase.google.com/go/v4/integration/firestore [build failed]
FAIL    firebase.google.com/go/v4/integration/iid [build failed]
FAIL    firebase.google.com/go/v4/integration/messaging [build failed]
FAIL    firebase.google.com/go/v4/integration/storage [build failed]
ok      firebase.google.com/go/v4/internal  1.914s
ok      firebase.google.com/go/v4/messaging 4.046s
FAIL    firebase.google.com/go/v4/storage [build failed]
lahirumaramba commented 1 year ago

Thanks @shogo82148 ! Could check the failing CI, please?

lahirumaramba commented 1 year ago

We also plan to drop support for 1.15 (#505) and I think we can include the dependency upgrades in the same release. Thanks!

shogo82148 commented 1 year ago

All tests are passed, but running golint fails.

https://github.com/firebase/firebase-admin-go/runs/8223311379?check_suite_focus=true

Run GOLINT=`go list -f {{.Target}} golang.org/x/lint/golint`
  GOLINT=`go list -f {{.Target}} golang.org/x/lint/golint`
  $GOLINT -set_exit_status ./...
  shell: /usr/bin/bash -e {0}
  env:
    GOROOT: /opt/hostedtoolcache/go/1.17.13/x64
missing go.sum entry for module providing package golang.org/x/lint/golint; to add:
    go mod download golang.org/x/lint
Error: Process completed with exit code 1.

It will be fixed by https://github.com/firebase/firebase-admin-go/pull/505, so we can merge this pull request.

lahirumaramba commented 1 year ago

Hi @shogo82148, We decided to bump the minimum version to 1.17 (supporting 1.17 to 1.19). I had to update the go.mod in #505 and I think that upgraded the dependencies as well. Let me know if I have missed anything. Thank you again for your contribution. We really appreciate it!