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
Broken sql/sqladmin package #448
Comments
Seems to be a problem on our side -- looking into it. Thank you for reporting this! |
Very strange. The changes to the JSON discovery doc should not have caused that. Will investigate. |
The discovery doc changed substantially back in November: Strangely, it looks like sqladmin hadn't been re-generated since my manual re-generation (8c19f07) even though the discovery doc had changed several times. The root cause is certainly that the discovery doc says "sql" when the API name is "sqladmin". Root discovery service says:
But the discovery doc at https://www.googleapis.com/discovery/v1/apis/sqladmin/v1beta4/rest says:
notice how name and id say "sql" and not "sqladmin" |
I regenerated everything again and now it's back to the way it should be. https://code-review.googlesource.com/c/google-api-go-client/+/51550 I found the issue: for the previous bad generation, I used But this is also a bug in sqladmin's discovery doc. |
This is the diff between running -// Package sqladmin provides access to the Cloud SQL Admin API.
+// Package sql provides access to the Cloud SQL Admin API.
-// import "google.golang.org/api/sqladmin/v1beta4"
+// import "google.golang.org/api/sql/v1beta4"
-// sqladminService, err := sqladmin.NewService(ctx)
+// sqlService, err := sql.NewService(ctx)
-// sqladminService, err := sqladmin.NewService(ctx, option.WithScopes(sqladmin.SqlserviceAdminScope))
+// sqlService, err := sql.NewService(ctx, option.WithScopes(sql.SqlserviceAdminScope))
-// sqladminService, err := sqladmin.NewService(ctx, option.WithAPIKey("AIza..."))
+// sqlService, err := sql.NewService(ctx, option.WithAPIKey("AIza..."))
-// sqladminService, err := sqladmin.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
+// sqlService, err := sql.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
-package sqladmin // import "google.golang.org/api/sqladmin/v1beta4"
+package sql // import "google.golang.org/api/sql/v1beta4"
- StorageAutoResize *bool `json:"storageAutoResize,omitempty"`
+ StorageAutoResize bool `json:"storageAutoResize,omitempty"` |
Next step is a You can depend on |
v0.17.0 is tagged. |
Thank you all for looking into this so quickly! |
Thank you for flagging it. |
Hello,
I've been getting this error since yesterday in our build tool, here it is reproduced:
I believe this change:
in
sqladmin/v1beta4/sqladmin-gen.go
in release 0.16.0 is responsible. It looks like the packagesqladmin
was merged into packagesql
but it cannot compile because they are still in different directories?Please let me know if this is indeed the issue or if the problem is somewhere on our side.
The text was updated successfully, but these errors were encountered: