fix(deps): update googlecloud-go-sdk
This MR contains the following updates:
| Package | Change | Age | Confidence |
|---|---|---|---|
| cloud.google.com/go/profiler | v0.1.0 → v0.6.0 |
||
| google.golang.org/api | v0.267.0 → v0.278.0 |
||
| google.golang.org/api | v0.231.0 → v0.278.0 |
View the Renovate pipeline for this MR
Release Notes
googleapis/google-cloud-go (cloud.google.com/go/profiler)
v0.6.0
-
Beta release of BigQuery, DataStore, Logging and Storage. See the blog post.
-
bigquery:
-
struct support. Read a row directly into a struct with
RowIterator.Next, and upload a row directly from a struct withUploader.Put. You can also use field tags. See the [package documentation][cloud-bigquery-ref] for details. -
The
ValueListtype was removed. It is no longer necessary. Instead of
var v ValueList ... it.Next(&v) ..use
var v []Value ... it.Next(&v) ...-
Previously, repeatedly calling
RowIterator.Nexton the same[]ValueorValueListwould append to the slice. Now each call resets the size to zero first. -
Schema inference will infer the SQL type BYTES for a struct field of type []byte. Previously it inferred STRING.
-
The types
uint,uint64anduintptrare no longer supported in schema inference. BigQuery's integer type is INT64, and those types may hold values that are not correctly represented in a 64-bit signed integer.
-
v0.5.0
- bigquery:
- The SQL types DATE, TIME and DATETIME are now supported. They correspond to
the
Date,TimeandDateTimetypes in the newcloud.google.com/go/civilpackage. - Support for query parameters.
- Support deleting a dataset.
- Values from INTEGER columns will now be returned as int64, not int. This will avoid errors arising from large values on 32-bit systems.
- The SQL types DATE, TIME and DATETIME are now supported. They correspond to
the
- datastore:
- Nested Go structs encoded as Entity values, instead of a
flattened list of the embedded struct's fields. This means that you may now have twice-nested slices, eg.
See the announcement for more details.
type State struct { Cities []struct{ Populations []int } } - Contexts no longer hold namespaces; instead you must set a key's namespace explicitly. Also, key functions have been changed and renamed.
- The WithNamespace function has been removed. To specify a namespace in a Query, use the Query.Namespace method:
q := datastore.NewQuery("Kind").Namespace("ns") - All the fields of Key are exported. That means you can construct any Key with a struct literal:
k := &Key{Kind: "Kind", ID: 37, Namespace: "ns"} - As a result of the above, the Key methods Kind, ID, d.Name, Parent, SetParent and Namespace have been removed.
NewIncompleteKeyhas been removed, replaced byIncompleteKey. ReplacewithNewIncompleteKey(ctx, kind, parent)and if you do use namespaces, make sure you set the namespace on the returned key.IncompleteKey(kind, parent)NewKeyhas been removed, replaced byNameKeyandIDKey. ReplacewithNewKey(ctx, kind, name, 0, parent) NewKey(ctx, kind, "", id, parent)and if you do use namespaces, make sure you set the namespace on the returned key.NameKey(kind, name, parent) IDKey(kind, id, parent)- The
Donevariable has been removed. Replacedatastore.Donewithiterator.Done, from the packagegoogle.golang.org/api/iterator. - The
Client.Closemethod will have a return type of error. It will return the result of closing the underlying gRPC connection. - See the announcement for more details.
- Nested Go structs encoded as Entity values, instead of a
flattened list of the embedded struct's fields. This means that you may now have twice-nested slices, eg.
v0.4.0
-
bigquery: -
NewGCSReferenceis now a function, not a method onClient.Table.LoaderFromnow accepts aReaderSource, enabling loading data into a table from a file or anyio.Reader.
-
Client.Table and Client.OpenTable have been removed. Replace
client.OpenTable("project", "dataset", "table")with
client.DatasetInProject("project", "dataset").Table("table") -
Client.CreateTable has been removed. Replace
client.CreateTable(ctx, "project", "dataset", "table")with
client.DatasetInProject("project", "dataset").Table("table").Create(ctx) -
Dataset.ListTables have been replaced with Dataset.Tables. Replace
tables, err := ds.ListTables(ctx)with
it := ds.Tables(ctx) for { table, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: use table. } -
Client.Read has been replaced with Job.Read, Table.Read and Query.Read. Replace
it, err := client.Read(ctx, job)with
it, err := job.Read(ctx)and similarly for reading from tables or queries.
-
The iterator returned from the Read methods is now named RowIterator. Its behavior is closer to the other iterators in these libraries. It no longer supports the Schema method; see the next item. Replace
for it.Next(ctx) { var vals ValueList if err := it.Get(&vals); err != nil { // TODO: Handle error. } // TODO: use vals. } if err := it.Err(); err != nil { // TODO: Handle error. }with
for { var vals ValueList err := it.Next(&vals) if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: use vals. }Instead of the
RecordsPerRequest(n)option, writeit.PageInfo().MaxSize = nInstead of the
StartIndex(i)option, writeit.StartIndex = i -
ValueLoader.Load now takes a Schema in addition to a slice of Values. Replace
func (vl *myValueLoader) Load(v []bigquery.Value)with
func (vl *myValueLoader) Load(v []bigquery.Value, s bigquery.Schema) -
Table.Patch is replace by Table.Update. Replace
p := table.Patch() p.Description("new description") metadata, err := p.Apply(ctx)with
metadata, err := table.Update(ctx, bigquery.TableMetadataToUpdate{ Description: "new description", }) -
Client.Copy is replaced by separate methods for each of its four functions. All options have been replaced by struct fields.
-
To load data from Google Cloud Storage into a table, use Table.LoaderFrom.
Replace
client.Copy(ctx, table, gcsRef)with
table.LoaderFrom(gcsRef).Run(ctx)Instead of passing options to Copy, set fields on the Loader:
loader := table.LoaderFrom(gcsRef) loader.WriteDisposition = bigquery.WriteTruncate -
To extract data from a table into Google Cloud Storage, use Table.ExtractorTo. Set fields on the returned Extractor instead of passing options.
Replace
client.Copy(ctx, gcsRef, table)with
table.ExtractorTo(gcsRef).Run(ctx) -
To copy data into a table from one or more other tables, use Table.CopierFrom. Set fields on the returned Copier instead of passing options.
Replace
client.Copy(ctx, dstTable, srcTable)with
dst.Table.CopierFrom(srcTable).Run(ctx) -
To start a query job, create a Query and call its Run method. Set fields on the query instead of passing options.
Replace
client.Copy(ctx, table, query)with
query.Run(ctx)
-
-
Table.NewUploader has been renamed to Table.Uploader. Instead of options, configure an Uploader by setting its fields. Replace
u := table.NewUploader(bigquery.UploadIgnoreUnknownValues())with
u := table.NewUploader(bigquery.UploadIgnoreUnknownValues()) u.IgnoreUnknownValues = true
-
pubsub: remove
pubsub.Done. Useiterator.Doneinstead, whereiteratoris the packagegoogle.golang.org/api/iterator.
v0.3.0
-
storage:
-
AdminClient replaced by methods on Client. Replace
adminClient.CreateBucket(ctx, bucketName, attrs)with
client.Bucket(bucketName).Create(ctx, projectID, attrs) -
BucketHandle.List replaced by BucketHandle.Objects. Replace
for query != nil { objs, err := bucket.List(d.ctx, query) if err != nil { ... } query = objs.Next for _, obj := range objs.Results { fmt.Println(obj) } }with
iter := bucket.Objects(d.ctx, query) for { obj, err := iter.Next() if err == iterator.Done { break } if err != nil { ... } fmt.Println(obj) }(The
iteratorpackage is atgoogle.golang.org/api/iterator.)Replace
Query.CursorwithObjectIterator.PageInfo().Token.Replace
Query.MaxResultswithObjectIterator.PageInfo().MaxSize. -
ObjectHandle.CopyTo replaced by ObjectHandle.CopierFrom. Replace
attrs, err := src.CopyTo(ctx, dst, nil)with
attrs, err := dst.CopierFrom(src).Run(ctx)Replace
attrs, err := src.CopyTo(ctx, dst, &storage.ObjectAttrs{ContextType: "text/html"})with
c := dst.CopierFrom(src) c.ContextType = "text/html" attrs, err := c.Run(ctx) -
ObjectHandle.ComposeFrom replaced by ObjectHandle.ComposerFrom. Replace
attrs, err := dst.ComposeFrom(ctx, []*storage.ObjectHandle{src1, src2}, nil)with
attrs, err := dst.ComposerFrom(src1, src2).Run(ctx) -
ObjectHandle.Update's ObjectAttrs argument replaced by ObjectAttrsToUpdate. Replace
attrs, err := obj.Update(ctx, &storage.ObjectAttrs{ContextType: "text/html"})with
attrs, err := obj.Update(ctx, storage.ObjectAttrsToUpdate{ContextType: "text/html"}) -
ObjectHandle.WithConditions replaced by ObjectHandle.If. Replace
obj.WithConditions(storage.Generation(gen), storage.IfMetaGenerationMatch(mgen))with
obj.Generation(gen).If(storage.Conditions{MetagenerationMatch: mgen})Replace
obj.WithConditions(storage.IfGenerationMatch(0))with
obj.If(storage.Conditions{DoesNotExist: true}) -
storage.Donereplaced byiterator.Done(from packagegoogle.golang.org/api/iterator).
-
-
Package preview/logging deleted. Use logging instead.
v0.2.0
-
Logging client replaced with preview version (see below).
-
New clients for some of Google's Machine Learning APIs: Vision, Speech, and Natural Language.
-
Preview version of a new [Stackdriver Logging][cloud-logging] client in
cloud.google.com/go/preview/logging. This client uses gRPC as its transport layer, and supports log reading, sinks and metrics. It will replace the current client atcloud.google.com/go/loggingshortly.
googleapis/google-api-go-client (google.golang.org/api)
v0.278.0
Features
- all: Auto-regenerate discovery clients (#3582) (76b1187)
- all: Auto-regenerate discovery clients (#3584) (e36c883)
v0.277.0
Features
- all: Auto-regenerate discovery clients (#3567) (3958295)
- all: Auto-regenerate discovery clients (#3571) (ca9851e)
- all: Auto-regenerate discovery clients (#3574) (8efb1af)
- all: Auto-regenerate discovery clients (#3575) (de49bb5)
- all: Auto-regenerate discovery clients (#3577) (ce68c87)
- all: Auto-regenerate discovery clients (#3578) (8be033e)
- all: Auto-regenerate discovery clients (#3579) (bc6990e)
- all: Auto-regenerate discovery clients (#3580) (2de1a5a)
- all: Auto-regenerate discovery clients (#3581) (0c219d9)
Bug Fixes
v0.276.0
Features
- all: Auto-regenerate discovery clients (#3561) (dd3f1bb)
- all: Auto-regenerate discovery clients (#3565) (7c11b5a)
- all: Auto-regenerate discovery clients (#3566) (54188cf)
v0.275.0
Features
- all: Auto-regenerate discovery clients (#3557) (2b2ef99)
- all: Auto-regenerate discovery clients (#3560) (9437d4d)
v0.274.0
Features
v0.273.1
Bug Fixes
v0.273.0
Features
- all: Auto-regenerate discovery clients (#3542) (a4b4711)
- all: Auto-regenerate discovery clients (#3546) (0cacfa8)
v0.272.0
Features
- all: Auto-regenerate discovery clients (#3534) (b4d37a1)
- all: Auto-regenerate discovery clients (#3536) (549ef3e)
- all: Auto-regenerate discovery clients (#3537) (6def284)
- all: Auto-regenerate discovery clients (#3538) (319b5ab)
- all: Auto-regenerate discovery clients (#3539) (73bcfcf)
- all: Auto-regenerate discovery clients (#3541) (6374c49)
v0.271.0
Features
v0.270.0
Features
- all: Auto-regenerate discovery clients (#3515) (44db8ef)
- all: Auto-regenerate discovery clients (#3518) (b3dc663)
- all: Auto-regenerate discovery clients (#3519) (01c06b9)
- all: Auto-regenerate discovery clients (#3520) (7ed0454)
- all: Auto-regenerate discovery clients (#3521) (d11f54e)
- all: Auto-regenerate discovery clients (#3523) (ce39b40)
- all: Auto-regenerate discovery clients (#3525) (15b140d)
- all: Auto-regenerate discovery clients (#3526) (1b18158)
- all: Auto-regenerate discovery clients (#3527) (a932a45)
- all: Auto-regenerate discovery clients (#3528) (f6ede69)
- all: Auto-regenerate discovery clients (#3529) (b73e4fb)
- option/internaloption: Add more option introspection (#3524) (ac5da8f)
- option/internaloption: Unsafe option resolver (#3514) (b263cee)
v0.269.0
Features
Bug Fixes
v0.268.0
Features
- all: Auto-regenerate discovery clients (#3502) (5ccf9b9)
- all: Auto-regenerate discovery clients (#3505) (f405df9)
- all: Auto-regenerate discovery clients (#3506) (cda923a)
- all: Auto-regenerate discovery clients (#3507) (e9015cc)
- all: Auto-regenerate discovery clients (#3508) (20fbcc1)
- all: Auto-regenerate discovery clients (#3509) (20c1e0f)
- Update to go 1.26 (#3504) (cc5baec)
Configuration
- Branch creation
- "every weekend"
- Automerge
- At any time (no schedule defined)
- If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.