1# Changes
2
3## v0.40.0
4
5- all:
6  - Update to protobuf-golang v1.3.1.
7- datastore:
8  - Attempt to decode GAE-encoded keys if initial decoding attempt fails.
9  - Support integer time conversion.
10- pubsub:
11  - Add PublishSettings.BundlerByteLimit. If users receive pubsub.ErrOverflow,
12  this value should be adjusted higher.
13  - Use IPv6 compatible target in testutil.
14- bigtable:
15  - Fix Latin-1 regexp filters in bttest, allowing \C.
16  - Expose PassAllFilter.
17- profiler:
18  - Add log messages for slow path in start.
19  - Fix start to allow retry until success.
20- firestore:
21  - Add admin client.
22- containeranalysis:
23  - Add apiv1 client.
24- grafeas:
25  - Add apiv1 client.
26
27## 0.39.0
28
29- bigtable:
30  - Implement DeleteInstance in bttest.
31  - Return an error on invalid ReadRowsRequest.RowRange key ranges in bttest.
32- bigquery:
33  - Move RequirePartitionFilter outside of TimePartioning.
34  - Expose models API.
35- firestore:
36  - Allow array values in create and update calls.
37  - Add CollectionGroup method.
38- pubsub:
39  - Add ExpirationPolicy to Subscription.
40- storage:
41  - Add V4 signing.
42- rpcreplay:
43  - Match streams by first sent request. This further improves rpcreplay's
44  ability to distinguish streams.
45- httpreplay:
46  - Set up Man-In-The-Middle config only once. This should improve proxy
47  creation when multiple proxies are used in a single process.
48  - Remove error on empty Content-Type, allowing requests with no Content-Type
49  header but a non-empty body.
50- all:
51  - Fix an edge case bug in auto-generated library pagination by properly
52  propagating pagetoken.
53
54## 0.38.0
55
56This update includes a substantial reduction in our transitive dependency list
57by way of updating to opencensus@v0.21.0.
58
59- spanner:
60  - Error implements GRPCStatus, allowing status.Convert.
61- bigtable:
62  - Fix a bug in bttest that prevents single column queries returning results
63  that match other filters.
64  - Remove verbose retry logging.
65- logging:
66  - Ensure RequestUrl has proper UTF-8, removing the need for users to wrap and
67  rune replace manually.
68- recaptchaenterprise:
69  - Add v1beta1 client.
70- phishingprotection:
71  - Add v1beta1 client.
72
73## 0.37.4
74
75This patch releases re-builds the go.sum. This was not possible in the
76previous release.
77
78- firestore:
79  - Add sentinel value DetectProjectID for auto-detecting project ID.
80  - Add OpenCensus tracing for public methods.
81  - Marked stable. All future changes come with a backwards compatibility
82  guarantee.
83  - Removed firestore/apiv1beta1. All users relying on this low-level library
84  should migrate to firestore/apiv1. Note that most users should use the
85  high-level firestore package instead.
86- pubsub:
87  - Allow large messages in synchronous pull case.
88  - Cap bundler byte limit. This should prevent OOM conditions when there are
89  a very large number of message publishes occurring.
90- storage:
91  - Add ETag to BucketAttrs and ObjectAttrs.
92- datastore:
93  - Removed some non-sensical OpenCensus traces.
94- webrisk:
95  - Add v1 client.
96- asset:
97  - Add v1 client.
98- cloudtasks:
99  - Add v2 client.
100
101## 0.37.3
102
103This patch release removes github.com/golang/lint from the transitive
104dependency list, resolving `go get -u` problems.
105
106Note: this release intentionally has a broken go.sum. Please use v0.37.4.
107
108## 0.37.2
109
110This patch release is mostly intended to bring in v0.3.0 of
111google.golang.org/api, which fixes a GCF deployment issue.
112
113Note: we had to-date accidentally marked Redis as stable. In this release, we've
114fixed it by downgrading its documentation to alpha, as it is in other languages
115and docs.
116
117- all:
118  - Document context in generated libraries.
119
120## 0.37.1
121
122Small go.mod version bumps to bring in v0.2.0 of google.golang.org/api, which
123introduces a new oauth2 url.
124
125## 0.37.0
126
127- spanner:
128  - Add BatchDML method.
129  - Reduced initial time between retries.
130- bigquery:
131  - Produce better error messages for InferSchema.
132  - Add logical type control for avro loads.
133  - Add support for the GEOGRAPHY type.
134- datastore:
135  - Add sentinel value DetectProjectID for auto-detecting project ID.
136  - Allow flatten tag on struct pointers.
137  - Fixed a bug that caused queries to panic with invalid queries. Instead they
138    will now return an error.
139- profiler:
140  - Add ability to override GCE zone and instance.
141- pubsub:
142  - BEHAVIOR CHANGE: Refactor error code retry logic. RPCs should now more
143    consistently retry specific error codes based on whether they're idempotent
144    or non-idempotent.
145- httpreplay: Fixed a bug when a non-GET request had a zero-length body causing
146  the Content-Length header to be dropped.
147- iot:
148  - Add new apiv1 client.
149- securitycenter:
150  - Add new apiv1 client.
151- cloudscheduler:
152  - Add new apiv1 client.
153
154## 0.36.0
155
156- spanner:
157  - Reduce minimum retry backoff from 1s to 100ms. This makes time between
158    retries much faster and should improve latency.
159- storage:
160  - Add support for Bucket Policy Only.
161- kms:
162  - Add ResourceIAM helper method.
163  - Deprecate KeyRingIAM and CryptoKeyIAM. Please use ResourceIAM.
164- firestore:
165  - Switch from v1beta1 API to v1 API.
166  - Allow emulator with FIRESTORE_EMULATOR_HOST.
167- bigquery:
168  - Add NumLongTermBytes to Table.
169  - Add TotalBytesProcessedAccuracy to QueryStatistics.
170- irm:
171  - Add new v1alpha2 client.
172- talent:
173  - Add new v4beta1 client.
174- rpcreplay:
175  - Fix connection to work with grpc >= 1.17.
176  - It is now required for an actual gRPC server to be running for Dial to
177    succeed.
178
179## 0.35.1
180
181- spanner:
182  - Adds OpenCensus views back to public API.
183
184## v0.35.0
185
186- all:
187  - Add go.mod and go.sum.
188  - Switch usage of gax-go to gax-go/v2.
189- bigquery:
190  - Fix bug where time partitioning could not be removed from a table.
191  - Fix panic that occurred with empty query parameters.
192- bttest:
193  - Fix bug where deleted rows were returned by ReadRows.
194- bigtable/emulator:
195  - Configure max message size to 256 MiB.
196- firestore:
197  - Allow non-transactional queries in transactions.
198  - Allow StartAt/EndBefore on direct children at any depth.
199  - QuerySnapshotIterator.Stop may be called in an error state.
200  - Fix bug the prevented reset of transaction write state in between retries.
201- functions/metadata:
202  - Make Metadata.Resource a pointer.
203- logging:
204  - Make SpanID available in logging.Entry.
205- metadata:
206  - Wrap !200 error code in a typed err.
207- profiler:
208  - Add function to check if function name is within a particular file in the
209    profile.
210  - Set parent field in create profile request.
211  - Return kubernetes client to start cluster, so client can be used to poll
212    cluster.
213  - Add function for checking if filename is in profile.
214- pubsub:
215  - Fix bug where messages expired without an initial modack in
216    synchronous=true mode.
217  - Receive does not retry ResourceExhausted errors.
218- spanner:
219  - client.Close now cancels existing requests and should be much faster for
220    large amounts of sessions.
221  - Correctly allow MinOpened sessions to be spun up.
222
223## v0.34.0
224
225- functions/metadata:
226  - Switch to using JSON in context.
227  - Make Resource a value.
228- vision: Fix ProductSearch return type.
229- datastore: Add an example for how to handle MultiError.
230
231## v0.33.1
232
233- compute: Removes an erroneously added go.mod.
234- logging: Populate source location in fromLogEntry.
235
236## v0.33.0
237
238- bttest:
239  - Add support for apply_label_transformer.
240- expr:
241  - Add expr library.
242- firestore:
243  - Support retrieval of missing documents.
244- kms:
245  - Add IAM methods.
246- pubsub:
247  - Clarify extension documentation.
248- scheduler:
249  - Add v1beta1 client.
250- vision:
251  - Add product search helper.
252  - Add new product search client.
253
254## v0.32.0
255
256Note: This release is the last to support Go 1.6 and 1.8.
257
258- bigquery:
259    - Add support for removing an expiration.
260    - Ignore NeverExpire in Table.Create.
261    - Validate table expiration time.
262- cbt:
263    - Add note about not supporting arbitrary bytes.
264- datastore:
265    - Align key checks.
266- firestore:
267    - Return an error when using Start/End without providing values.
268- pubsub:
269    - Add pstest Close method.
270    - Clarify MaxExtension documentation.
271- securitycenter:
272    - Add v1beta1 client.
273- spanner:
274    - Allow nil in mutations.
275    - Improve doc of SessionPoolConfig.MaxOpened.
276    - Increase session deletion timeout from 5s to 15s.
277
278## v0.31.0
279
280- bigtable:
281    - Group mutations across multiple requests.
282- bigquery:
283    - Link to bigquery troubleshooting errors page in bigquery.Error comment.
284- cbt:
285    - Fix go generate command.
286    - Document usage of both maxage + maxversions.
287- datastore:
288    - Passing nil keys results in ErrInvalidKey.
289- firestore:
290    - Clarify what Document.DataTo does with untouched struct fields.
291- profile:
292    - Validate service name in agent.
293- pubsub:
294    - Fix deadlock with pstest and ctx.Cancel.
295    - Fix a possible deadlock in pstest.
296- trace:
297    - Update doc URL with new fragment.
298
299Special thanks to @fastest963 for going above and beyond helping us to debug
300hard-to-reproduce Pub/Sub issues.
301
302## v0.30.0
303
304- spanner: DML support added. See https://godoc.org/cloud.google.com/go/spanner#hdr-DML_and_Partitioned_DML for more information.
305- bigtable: bttest supports row sample filter.
306- functions: metadata package added for accessing Cloud Functions resource metadata.
307
308## v0.29.0
309
310- bigtable:
311  - Add retry to all idempotent RPCs.
312  - cbt supports complex GC policies.
313  - Emulator supports arbitrary bytes in regex filters.
314- firestore: Add ArrayUnion and ArrayRemove.
315- logging: Add the ContextFunc option to supply the context used for
316  asynchronous RPCs.
317- profiler: Ignore NotDefinedError when fetching the instance name
318- pubsub:
319  - BEHAVIOR CHANGE: Receive doesn't retry if an RPC returns codes.Cancelled.
320  - BEHAVIOR CHANGE: Receive retries on Unavailable intead of returning.
321  - Fix deadlock.
322  - Restore Ack/Nack/Modacks metrics.
323  - Improve context handling in iterator.
324  - Implement synchronous mode for Receive.
325  - pstest: add Pull.
326- spanner: Add a metric for the number of sessions currently opened.
327- storage:
328  - Canceling the context releases all resources.
329  - Add additional RetentionPolicy attributes.
330- vision/apiv1: Add LocalizeObjects method.
331
332## v0.28.0
333
334- bigtable:
335  - Emulator returns Unimplemented for snapshot RPCs.
336- bigquery:
337  - Support zero-length repeated, nested fields.
338- cloud assets:
339  - Add v1beta client.
340- datastore:
341  - Don't nil out transaction ID on retry.
342- firestore:
343  - BREAKING CHANGE: When watching a query with Query.Snapshots, QuerySnapshotIterator.Next
344  returns a QuerySnapshot which contains read time, result size, change list and the DocumentIterator
345  (previously, QuerySnapshotIterator.Next returned just the DocumentIterator). See: https://godoc.org/cloud.google.com/go/firestore#Query.Snapshots.
346  - Add array-contains operator.
347- IAM:
348  - Add iam/credentials/apiv1 client.
349- pubsub:
350  - Canceling the context passed to Subscription.Receive causes Receive to return when
351  processing finishes on all messages currently in progress, even if new messages are arriving.
352- redis:
353  - Add redis/apiv1 client.
354- storage:
355  - Add Reader.Attrs.
356  - Deprecate several Reader getter methods: please use Reader.Attrs for these instead.
357  - Add ObjectHandle.Bucket and ObjectHandle.Object methods.
358
359## v0.27.0
360
361- bigquery:
362  - Allow modification of encryption configuration and partitioning options to a table via the Update call.
363  - Add a SchemaFromJSON function that converts a JSON table schema.
364- bigtable:
365  - Restore cbt count functionality.
366- containeranalysis:
367  - Add v1beta client.
368- spanner:
369  - Fix a case where an iterator might not be closed correctly.
370- storage:
371  - Add ServiceAccount method https://godoc.org/cloud.google.com/go/storage#Client.ServiceAccount.
372  - Add a method to Reader that returns the parsed value of the Last-Modified header.
373
374## v0.26.0
375
376- bigquery:
377  - Support filtering listed jobs  by min/max creation time.
378  - Support data clustering (https://godoc.org/cloud.google.com/go/bigquery#Clustering).
379  - Include job creator email in Job struct.
380- bigtable:
381  - Add `RowSampleFilter`.
382  - emulator: BREAKING BEHAVIOR CHANGE: Regexps in row, family, column and value filters
383    must match the entire target string to succeed. Previously, the emulator was
384    succeeding on  partial matches.
385    NOTE: As of this release, this change only affects the emulator when run
386    from this repo (bigtable/cmd/emulator/cbtemulator.go). The version launched
387    from `gcloud` will be updated in a subsequent `gcloud` release.
388- dataproc: Add apiv1beta2 client.
389- datastore: Save non-nil pointer fields on omitempty.
390- logging: populate Entry.Trace from the HTTP X-Cloud-Trace-Context header.
391- logging/logadmin:  Support writer_identity and include_children.
392- pubsub:
393  - Support labels on topics and subscriptions.
394  - Support message storage policy for topics.
395  - Use the distribution of ack times to determine when to extend ack deadlines.
396    The only user-visible effect of this change should be that programs that
397    call only `Subscription.Receive` need no IAM permissions other than `Pub/Sub
398    Subscriber`.
399- storage:
400  - Support predefined ACLs.
401  - Support additional ACL fields other than Entity and Role.
402  - Support bucket websites.
403  - Support bucket logging.
404
405
406## v0.25.0
407
408- Added [Code of Conduct](https://github.com/googleapis/google-cloud-go/blob/master/CODE_OF_CONDUCT.md)
409- bigtable:
410  - cbt: Support a GC policy of "never".
411- errorreporting:
412  - Support User.
413  - Close now calls Flush.
414  - Use OnError (previously ignored).
415  - Pass through the RPC error as-is to OnError.
416- httpreplay: A tool for recording and replaying HTTP requests
417  (for the bigquery and storage clients in this repo).
418- kms: v1 client added
419- logging: add SourceLocation to Entry.
420- storage: improve CRC checking on read.
421
422## v0.24.0
423
424- bigquery: Support for the NUMERIC type.
425- bigtable:
426  - cbt: Optionally specify columns for read/lookup
427  - Support instance-level administration.
428- oslogin: New client for the OS Login API.
429- pubsub:
430  - The package is now stable. There will be no further breaking changes.
431  - Internal changes to improve Subscription.Receive behavior.
432- storage: Support updating bucket lifecycle config.
433- spanner: Support struct-typed parameter bindings.
434- texttospeech: New client for the Text-to-Speech API.
435
436## v0.23.0
437
438- bigquery: Add DDL stats to query statistics.
439- bigtable:
440  - cbt: Add cells-per-column limit for row lookup.
441  - cbt: Make it possible to combine read filters.
442- dlp: v2beta2 client removed. Use the v2 client instead.
443- firestore, spanner: Fix compilation errors due to protobuf changes.
444
445## v0.22.0
446
447- bigtable:
448  - cbt: Support cells per column limit for row read.
449  - bttest: Correctly handle empty RowSet.
450  - Fix ReadModifyWrite operation in emulator.
451  - Fix API path in GetCluster.
452
453- bigquery:
454  - BEHAVIOR CHANGE: Retry on 503 status code.
455  - Add dataset.DeleteWithContents.
456  - Add SchemaUpdateOptions for query jobs.
457  - Add Timeline to QueryStatistics.
458  - Add more stats to ExplainQueryStage.
459  - Support Parquet data format.
460
461- datastore:
462  - Support omitempty for times.
463
464- dlp:
465  - **BREAKING CHANGE:** Remove v1beta1 client. Please migrate to the v2 client,
466  which is now out of beta.
467  - Add v2 client.
468
469- firestore:
470  - BEHAVIOR CHANGE: Treat set({}, MergeAll) as valid.
471
472- iam:
473  - Support JWT signing via SignJwt callopt.
474
475- profiler:
476  - BEHAVIOR CHANGE: PollForSerialOutput returns an error when context.Done.
477  - BEHAVIOR CHANGE: Increase the initial backoff to 1 minute.
478  - Avoid returning empty serial port output.
479
480- pubsub:
481  - BEHAVIOR CHANGE: Don't backoff during next retryable error once stream is healthy.
482  - BEHAVIOR CHANGE: Don't backoff on EOF.
483  - pstest: Support Acknowledge and ModifyAckDeadline RPCs.
484
485- redis:
486  - Add v1 beta Redis client.
487
488- spanner:
489  - Support SessionLabels.
490
491- speech:
492  - Add api v1 beta1 client.
493
494- storage:
495  - BEHAVIOR CHANGE: Retry reads when retryable error occurs.
496  - Fix delete of object in requester-pays bucket.
497  - Support KMS integration.
498
499## v0.21.0
500
501- bigquery:
502  - Add OpenCensus tracing.
503
504- firestore:
505  - **BREAKING CHANGE:** If a document does not exist, return a DocumentSnapshot
506    whose Exists method returns false. DocumentRef.Get and Transaction.Get
507    return the non-nil DocumentSnapshot in addition to a NotFound error.
508    **DocumentRef.GetAll and Transaction.GetAll return a non-nil
509    DocumentSnapshot instead of nil.**
510  - Add DocumentIterator.Stop. **Call Stop whenever you are done with a
511    DocumentIterator.**
512  - Added Query.Snapshots and DocumentRef.Snapshots, which provide realtime
513    notification of updates. See https://cloud.google.com/firestore/docs/query-data/listen.
514  - Canceling an RPC now always returns a grpc.Status with codes.Canceled.
515
516- spanner:
517  - Add `CommitTimestamp`, which supports inserting the commit timestamp of a
518    transaction into a column.
519
520## v0.20.0
521
522- bigquery: Support SchemaUpdateOptions for load jobs.
523
524- bigtable:
525  - Add SampleRowKeys.
526  - cbt: Support union, intersection GCPolicy.
527  - Retry admin RPCS.
528  - Add trace spans to retries.
529
530- datastore: Add OpenCensus tracing.
531
532- firestore:
533  - Fix queries involving Null and NaN.
534  - Allow Timestamp protobuffers for time values.
535
536- logging: Add a WriteTimeout option.
537
538- spanner: Support Batch API.
539
540- storage: Add OpenCensus tracing.
541
542## v0.19.0
543
544- bigquery:
545  - Support customer-managed encryption keys.
546
547- bigtable:
548  - Improved emulator support.
549  - Support GetCluster.
550
551- datastore:
552  - Add general mutations.
553  - Support pointer struct fields.
554  - Support transaction options.
555
556- firestore:
557  - Add Transaction.GetAll.
558  - Support document cursors.
559
560- logging:
561  - Support concurrent RPCs to the service.
562  - Support per-entry resources.
563
564- profiler:
565  - Add config options to disable heap and thread profiling.
566  - Read the project ID from $GOOGLE_CLOUD_PROJECT when it's set.
567
568- pubsub:
569  - BEHAVIOR CHANGE: Release flow control after ack/nack (instead of after the
570    callback returns).
571  - Add SubscriptionInProject.
572  - Add OpenCensus instrumentation for streaming pull.
573
574- storage:
575  - Support CORS.
576
577## v0.18.0
578
579- bigquery:
580  - Marked stable.
581  - Schema inference of nullable fields supported.
582  - Added TimePartitioning to QueryConfig.
583
584- firestore: Data provided to DocumentRef.Set with a Merge option can contain
585  Delete sentinels.
586
587- logging: Clients can accept parent resources other than projects.
588
589- pubsub:
590  - pubsub/pstest: A lighweight fake for pubsub. Experimental; feedback welcome.
591  - Support updating more subscription metadata: AckDeadline,
592    RetainAckedMessages and RetentionDuration.
593
594- oslogin/apiv1beta: New client for the Cloud OS Login API.
595
596- rpcreplay: A package for recording and replaying gRPC traffic.
597
598- spanner:
599  - Add a ReadWithOptions that supports a row limit, as well as an index.
600  - Support query plan and execution statistics.
601  - Added [OpenCensus](http://opencensus.io) support.
602
603- storage: Clarify checksum validation for gzipped files (it is not validated
604  when the file is served uncompressed).
605
606
607## v0.17.0
608
609- firestore BREAKING CHANGES:
610  - Remove UpdateMap and UpdateStruct; rename UpdatePaths to Update.
611    Change
612        `docref.UpdateMap(ctx, map[string]interface{}{"a.b", 1})`
613    to
614        `docref.Update(ctx, []firestore.Update{{Path: "a.b", Value: 1}})`
615
616    Change
617        `docref.UpdateStruct(ctx, []string{"Field"}, aStruct)`
618    to
619        `docref.Update(ctx, []firestore.Update{{Path: "Field", Value: aStruct.Field}})`
620  - Rename MergePaths to Merge; require args to be FieldPaths
621  - A value stored as an integer can be read into a floating-point field, and vice versa.
622- bigtable/cmd/cbt:
623  - Support deleting a column.
624  - Add regex option for row read.
625- spanner: Mark stable.
626- storage:
627  - Add Reader.ContentEncoding method.
628  - Fix handling of SignedURL headers.
629- bigquery:
630  - If Uploader.Put is called with no rows, it returns nil without making a
631    call.
632  - Schema inference supports the "nullable" option in struct tags for
633    non-required fields.
634  - TimePartitioning supports "Field".
635
636
637## v0.16.0
638
639- Other bigquery changes:
640  - `JobIterator.Next` returns `*Job`; removed `JobInfo` (BREAKING CHANGE).
641  - UseStandardSQL is deprecated; set UseLegacySQL to true if you need
642    Legacy SQL.
643  - Uploader.Put will generate a random insert ID if you do not provide one.
644  - Support time partitioning for load jobs.
645  - Support dry-run queries.
646  - A `Job` remembers its last retrieved status.
647  - Support retrieving job configuration.
648  - Support labels for jobs and tables.
649  - Support dataset access lists.
650  - Improve support for external data sources, including data from Bigtable and
651    Google Sheets, and tables with external data.
652  - Support updating a table's view configuration.
653  - Fix uploading civil times with nanoseconds.
654
655- storage:
656  - Support PubSub notifications.
657  - Support Requester Pays buckets.
658
659- profiler: Support goroutine and mutex profile types.
660
661## v0.15.0
662
663- firestore: beta release. See the
664  [announcement](https://firebase.googleblog.com/2017/10/introducing-cloud-firestore.html).
665
666- errorreporting: The existing package has been redesigned.
667
668- errors: This package has been removed. Use errorreporting.
669
670
671## v0.14.0
672
673- bigquery BREAKING CHANGES:
674  - Standard SQL is the default for queries and views.
675  - `Table.Create` takes `TableMetadata` as a second argument, instead of
676    options.
677  - `Dataset.Create` takes `DatasetMetadata` as a second argument.
678  - `DatasetMetadata` field `ID` renamed to `FullID`
679  - `TableMetadata` field `ID` renamed to `FullID`
680
681- Other bigquery changes:
682  - The client will append a random suffix to a provided job ID if you set
683    `AddJobIDSuffix` to true in a job config.
684  - Listing jobs is supported.
685  - Better retry logic.
686
687- vision, language, speech: clients are now stable
688
689- monitoring: client is now beta
690
691- profiler:
692  - Rename InstanceName to Instance, ZoneName to Zone
693  - Auto-detect service name and version on AppEngine.
694
695## v0.13.0
696
697- bigquery: UseLegacySQL options for CreateTable and QueryConfig. Use these
698  options to continue using Legacy SQL after the client switches its default
699  to Standard SQL.
700
701- bigquery: Support for updating dataset labels.
702
703- bigquery: Set DatasetIterator.ProjectID to list datasets in a project other
704  than the client's. DatasetsInProject is no longer needed and is deprecated.
705
706- bigtable: Fail ListInstances when any zones fail.
707
708- spanner: support decoding of slices of basic types (e.g. []string, []int64,
709  etc.)
710
711- logging/logadmin: UpdateSink no longer creates a sink if it is missing
712  (actually a change to the underlying service, not the client)
713
714- profiler: Service and ServiceVersion replace Target in Config.
715
716## v0.12.0
717
718- pubsub: Subscription.Receive now uses streaming pull.
719
720- pubsub: add Client.TopicInProject to access topics in a different project
721  than the client.
722
723- errors: renamed errorreporting. The errors package will be removed shortly.
724
725- datastore: improved retry behavior.
726
727- bigquery: support updates to dataset metadata, with etags.
728
729- bigquery: add etag support to Table.Update (BREAKING: etag argument added).
730
731- bigquery: generate all job IDs on the client.
732
733- storage: support bucket lifecycle configurations.
734
735
736## v0.11.0
737
738- Clients for spanner, pubsub and video are now in beta.
739
740- New client for DLP.
741
742- spanner: performance and testing improvements.
743
744- storage: requester-pays buckets are supported.
745
746- storage, profiler, bigtable, bigquery: bug fixes and other minor improvements.
747
748- pubsub: bug fixes and other minor improvements
749
750## v0.10.0
751
752- pubsub: Subscription.ModifyPushConfig replaced with Subscription.Update.
753
754- pubsub: Subscription.Receive now runs concurrently for higher throughput.
755
756- vision: cloud.google.com/go/vision is deprecated. Use
757cloud.google.com/go/vision/apiv1 instead.
758
759- translation: now stable.
760
761- trace: several changes to the surface. See the link below.
762
763### Code changes required from v0.9.0
764
765- pubsub: Replace
766
767    ```
768    sub.ModifyPushConfig(ctx, pubsub.PushConfig{Endpoint: "https://example.com/push"})
769    ```
770
771  with
772
773    ```
774    sub.Update(ctx, pubsub.SubscriptionConfigToUpdate{
775        PushConfig: &pubsub.PushConfig{Endpoint: "https://example.com/push"},
776    })
777    ```
778
779- trace: traceGRPCServerInterceptor will be provided from *trace.Client.
780Given an initialized `*trace.Client` named `tc`, instead of
781
782    ```
783    s := grpc.NewServer(grpc.UnaryInterceptor(trace.GRPCServerInterceptor(tc)))
784    ```
785
786  write
787
788    ```
789    s := grpc.NewServer(grpc.UnaryInterceptor(tc.GRPCServerInterceptor()))
790    ```
791
792- trace trace.GRPCClientInterceptor will also provided from *trace.Client.
793Instead of
794
795    ```
796    conn, err := grpc.Dial(srv.Addr, grpc.WithUnaryInterceptor(trace.GRPCClientInterceptor()))
797    ```
798
799  write
800
801    ```
802    conn, err := grpc.Dial(srv.Addr, grpc.WithUnaryInterceptor(tc.GRPCClientInterceptor()))
803    ```
804
805- trace: We removed the deprecated `trace.EnableGRPCTracing`. Use the gRPC
806interceptor as a dial option as shown below when initializing Cloud package
807clients:
808
809    ```
810    c, err := pubsub.NewClient(ctx, "project-id", option.WithGRPCDialOption(grpc.WithUnaryInterceptor(tc.GRPCClientInterceptor())))
811    if err != nil {
812        ...
813    }
814    ```
815
816
817## v0.9.0
818
819- Breaking changes to some autogenerated clients.
820- rpcreplay package added.
821
822## v0.8.0
823
824- profiler package added.
825- storage:
826  - Retry Objects.Insert call.
827  - Add ProgressFunc to WRiter.
828- pubsub: breaking changes:
829  - Publish is now asynchronous ([announcement](https://groups.google.com/d/topic/google-api-go-announce/aaqRDIQ3rvU/discussion)).
830  - Subscription.Pull replaced by Subscription.Receive, which takes a callback ([announcement](https://groups.google.com/d/topic/google-api-go-announce/8pt6oetAdKc/discussion)).
831  - Message.Done replaced with Message.Ack and Message.Nack.
832
833## v0.7.0
834
835- Release of a client library for Spanner. See
836the
837[blog
838post](https://cloudplatform.googleblog.com/2017/02/introducing-Cloud-Spanner-a-global-database-service-for-mission-critical-applications.html).
839Note that although the Spanner service is beta, the Go client library is alpha.
840
841## v0.6.0
842
843- Beta release of BigQuery, DataStore, Logging and Storage. See the
844[blog post](https://cloudplatform.googleblog.com/2016/12/announcing-new-google-cloud-client.html).
845
846- bigquery:
847  - struct support. Read a row directly into a struct with
848`RowIterator.Next`, and upload a row directly from a struct with `Uploader.Put`.
849You can also use field tags. See the [package documentation][cloud-bigquery-ref]
850for details.
851
852  - The `ValueList` type was removed. It is no longer necessary. Instead of
853   ```go
854   var v ValueList
855   ... it.Next(&v) ..
856   ```
857   use
858
859   ```go
860   var v []Value
861   ... it.Next(&v) ...
862   ```
863
864  - Previously, repeatedly calling `RowIterator.Next` on the same `[]Value` or
865  `ValueList` would append to the slice. Now each call resets the size to zero first.
866
867  - Schema inference will infer the SQL type BYTES for a struct field of
868  type []byte. Previously it inferred STRING.
869
870  - The types `uint`, `uint64` and `uintptr` are no longer supported in schema
871  inference. BigQuery's integer type is INT64, and those types may hold values
872  that are not correctly represented in a 64-bit signed integer.
873
874## v0.5.0
875
876- bigquery:
877  - The SQL types DATE, TIME and DATETIME are now supported. They correspond to
878    the `Date`, `Time` and `DateTime` types in the new `cloud.google.com/go/civil`
879    package.
880  - Support for query parameters.
881  - Support deleting a dataset.
882  - Values from INTEGER columns will now be returned as int64, not int. This
883    will avoid errors arising from large values on 32-bit systems.
884- datastore:
885  - Nested Go structs encoded as Entity values, instead of a
886flattened list of the embedded struct's fields. This means that you may now have twice-nested slices, eg.
887    ```go
888    type State struct {
889      Cities  []struct{
890        Populations []int
891      }
892    }
893    ```
894    See [the announcement](https://groups.google.com/forum/#!topic/google-api-go-announce/79jtrdeuJAg) for
895more details.
896  - Contexts no longer hold namespaces; instead you must set a key's namespace
897    explicitly. Also, key functions have been changed and renamed.
898  - The WithNamespace function has been removed. To specify a namespace in a Query, use the Query.Namespace method:
899     ```go
900     q := datastore.NewQuery("Kind").Namespace("ns")
901     ```
902  - All the fields of Key are exported. That means you can construct any Key with a struct literal:
903     ```go
904     k := &Key{Kind: "Kind",  ID: 37, Namespace: "ns"}
905     ```
906  - As a result of the above, the Key methods Kind, ID, d.Name, Parent, SetParent and Namespace have been removed.
907  - `NewIncompleteKey` has been removed, replaced by `IncompleteKey`. Replace
908      ```go
909      NewIncompleteKey(ctx, kind, parent)
910      ```
911      with
912      ```go
913      IncompleteKey(kind, parent)
914      ```
915      and if you do use namespaces, make sure you set the namespace on the returned key.
916  - `NewKey` has been removed, replaced by `NameKey` and `IDKey`. Replace
917      ```go
918      NewKey(ctx, kind, name, 0, parent)
919      NewKey(ctx, kind, "", id, parent)
920      ```
921      with
922      ```go
923      NameKey(kind, name, parent)
924      IDKey(kind, id, parent)
925      ```
926      and if you do use namespaces, make sure you set the namespace on the returned key.
927  - The `Done` variable has been removed. Replace `datastore.Done` with `iterator.Done`, from the package `google.golang.org/api/iterator`.
928  - The `Client.Close` method will have a return type of error. It will return the result of closing the underlying gRPC connection.
929  - See [the announcement](https://groups.google.com/forum/#!topic/google-api-go-announce/hqXtM_4Ix-0) for
930more details.
931
932## v0.4.0
933
934- bigquery:
935  -`NewGCSReference` is now a function, not a method on `Client`.
936  - `Table.LoaderFrom` now accepts a `ReaderSource`, enabling
937     loading data into a table from a file or any `io.Reader`.
938  * Client.Table and Client.OpenTable have been removed.
939      Replace
940      ```go
941      client.OpenTable("project", "dataset", "table")
942      ```
943      with
944      ```go
945      client.DatasetInProject("project", "dataset").Table("table")
946      ```
947
948  * Client.CreateTable has been removed.
949      Replace
950      ```go
951      client.CreateTable(ctx, "project", "dataset", "table")
952      ```
953      with
954      ```go
955      client.DatasetInProject("project", "dataset").Table("table").Create(ctx)
956      ```
957
958  * Dataset.ListTables have been replaced with Dataset.Tables.
959      Replace
960      ```go
961      tables, err := ds.ListTables(ctx)
962      ```
963      with
964      ```go
965      it := ds.Tables(ctx)
966      for {
967          table, err := it.Next()
968          if err == iterator.Done {
969              break
970          }
971          if err != nil {
972              // TODO: Handle error.
973          }
974          // TODO: use table.
975      }
976      ```
977
978  * Client.Read has been replaced with Job.Read, Table.Read and Query.Read.
979      Replace
980      ```go
981      it, err := client.Read(ctx, job)
982      ```
983      with
984      ```go
985      it, err := job.Read(ctx)
986      ```
987    and similarly for reading from tables or queries.
988
989  * The iterator returned from the Read methods is now named RowIterator. Its
990    behavior is closer to the other iterators in these libraries. It no longer
991    supports the Schema method; see the next item.
992      Replace
993      ```go
994      for it.Next(ctx) {
995          var vals ValueList
996          if err := it.Get(&vals); err != nil {
997              // TODO: Handle error.
998          }
999          // TODO: use vals.
1000      }
1001      if err := it.Err(); err != nil {
1002          // TODO: Handle error.
1003      }
1004      ```
1005      with
1006      ```
1007      for {
1008          var vals ValueList
1009          err := it.Next(&vals)
1010          if err == iterator.Done {
1011              break
1012          }
1013          if err != nil {
1014              // TODO: Handle error.
1015          }
1016          // TODO: use vals.
1017      }
1018      ```
1019      Instead of the `RecordsPerRequest(n)` option, write
1020      ```go
1021      it.PageInfo().MaxSize = n
1022      ```
1023      Instead of the `StartIndex(i)` option, write
1024      ```go
1025      it.StartIndex = i
1026      ```
1027
1028  * ValueLoader.Load now takes a Schema in addition to a slice of Values.
1029      Replace
1030      ```go
1031      func (vl *myValueLoader) Load(v []bigquery.Value)
1032      ```
1033      with
1034      ```go
1035      func (vl *myValueLoader) Load(v []bigquery.Value, s bigquery.Schema)
1036      ```
1037
1038
1039  * Table.Patch is replace by Table.Update.
1040      Replace
1041      ```go
1042      p := table.Patch()
1043      p.Description("new description")
1044      metadata, err := p.Apply(ctx)
1045      ```
1046      with
1047      ```go
1048      metadata, err := table.Update(ctx, bigquery.TableMetadataToUpdate{
1049          Description: "new description",
1050      })
1051      ```
1052
1053  * Client.Copy is replaced by separate methods for each of its four functions.
1054    All options have been replaced by struct fields.
1055
1056    * To load data from Google Cloud Storage into a table, use Table.LoaderFrom.
1057
1058      Replace
1059      ```go
1060      client.Copy(ctx, table, gcsRef)
1061      ```
1062      with
1063      ```go
1064      table.LoaderFrom(gcsRef).Run(ctx)
1065      ```
1066      Instead of passing options to Copy, set fields on the Loader:
1067      ```go
1068      loader := table.LoaderFrom(gcsRef)
1069      loader.WriteDisposition = bigquery.WriteTruncate
1070      ```
1071
1072    * To extract data from a table into Google Cloud Storage, use
1073      Table.ExtractorTo. Set fields on the returned Extractor instead of
1074      passing options.
1075
1076      Replace
1077      ```go
1078      client.Copy(ctx, gcsRef, table)
1079      ```
1080      with
1081      ```go
1082      table.ExtractorTo(gcsRef).Run(ctx)
1083      ```
1084
1085    * To copy data into a table from one or more other tables, use
1086      Table.CopierFrom. Set fields on the returned Copier instead of passing options.
1087
1088      Replace
1089      ```go
1090      client.Copy(ctx, dstTable, srcTable)
1091      ```
1092      with
1093      ```go
1094      dst.Table.CopierFrom(srcTable).Run(ctx)
1095      ```
1096
1097    * To start a query job, create a Query and call its Run method. Set fields
1098    on the query instead of passing options.
1099
1100      Replace
1101      ```go
1102      client.Copy(ctx, table, query)
1103      ```
1104      with
1105      ```go
1106      query.Run(ctx)
1107      ```
1108
1109  * Table.NewUploader has been renamed to Table.Uploader. Instead of options,
1110    configure an Uploader by setting its fields.
1111      Replace
1112      ```go
1113      u := table.NewUploader(bigquery.UploadIgnoreUnknownValues())
1114      ```
1115      with
1116      ```go
1117      u := table.NewUploader(bigquery.UploadIgnoreUnknownValues())
1118      u.IgnoreUnknownValues = true
1119      ```
1120
1121- pubsub: remove `pubsub.Done`. Use `iterator.Done` instead, where `iterator` is the package
1122`google.golang.org/api/iterator`.
1123
1124## v0.3.0
1125
1126- storage:
1127  * AdminClient replaced by methods on Client.
1128      Replace
1129      ```go
1130      adminClient.CreateBucket(ctx, bucketName, attrs)
1131      ```
1132      with
1133      ```go
1134      client.Bucket(bucketName).Create(ctx, projectID, attrs)
1135      ```
1136
1137  * BucketHandle.List replaced by BucketHandle.Objects.
1138      Replace
1139      ```go
1140      for query != nil {
1141          objs, err := bucket.List(d.ctx, query)
1142          if err != nil { ... }
1143          query = objs.Next
1144          for _, obj := range objs.Results {
1145              fmt.Println(obj)
1146          }
1147      }
1148      ```
1149      with
1150      ```go
1151      iter := bucket.Objects(d.ctx, query)
1152      for {
1153          obj, err := iter.Next()
1154          if err == iterator.Done {
1155              break
1156          }
1157          if err != nil { ... }
1158          fmt.Println(obj)
1159      }
1160      ```
1161      (The `iterator` package is at `google.golang.org/api/iterator`.)
1162
1163      Replace `Query.Cursor` with `ObjectIterator.PageInfo().Token`.
1164
1165      Replace `Query.MaxResults` with `ObjectIterator.PageInfo().MaxSize`.
1166
1167
1168  * ObjectHandle.CopyTo replaced by ObjectHandle.CopierFrom.
1169      Replace
1170      ```go
1171      attrs, err := src.CopyTo(ctx, dst, nil)
1172      ```
1173      with
1174      ```go
1175      attrs, err := dst.CopierFrom(src).Run(ctx)
1176      ```
1177
1178      Replace
1179      ```go
1180      attrs, err := src.CopyTo(ctx, dst, &storage.ObjectAttrs{ContextType: "text/html"})
1181      ```
1182      with
1183      ```go
1184      c := dst.CopierFrom(src)
1185      c.ContextType = "text/html"
1186      attrs, err := c.Run(ctx)
1187      ```
1188
1189  * ObjectHandle.ComposeFrom replaced by ObjectHandle.ComposerFrom.
1190      Replace
1191      ```go
1192      attrs, err := dst.ComposeFrom(ctx, []*storage.ObjectHandle{src1, src2}, nil)
1193      ```
1194      with
1195      ```go
1196      attrs, err := dst.ComposerFrom(src1, src2).Run(ctx)
1197      ```
1198
1199  * ObjectHandle.Update's ObjectAttrs argument replaced by ObjectAttrsToUpdate.
1200      Replace
1201      ```go
1202      attrs, err := obj.Update(ctx, &storage.ObjectAttrs{ContextType: "text/html"})
1203      ```
1204      with
1205      ```go
1206      attrs, err := obj.Update(ctx, storage.ObjectAttrsToUpdate{ContextType: "text/html"})
1207      ```
1208
1209  * ObjectHandle.WithConditions replaced by ObjectHandle.If.
1210      Replace
1211      ```go
1212      obj.WithConditions(storage.Generation(gen), storage.IfMetaGenerationMatch(mgen))
1213      ```
1214      with
1215      ```go
1216      obj.Generation(gen).If(storage.Conditions{MetagenerationMatch: mgen})
1217      ```
1218
1219      Replace
1220      ```go
1221      obj.WithConditions(storage.IfGenerationMatch(0))
1222      ```
1223      with
1224      ```go
1225      obj.If(storage.Conditions{DoesNotExist: true})
1226      ```
1227
1228  * `storage.Done` replaced by `iterator.Done` (from package `google.golang.org/api/iterator`).
1229
1230- Package preview/logging deleted. Use logging instead.
1231
1232## v0.2.0
1233
1234- Logging client replaced with preview version (see below).
1235
1236- New clients for some of Google's Machine Learning APIs: Vision, Speech, and
1237Natural Language.
1238
1239- Preview version of a new [Stackdriver Logging][cloud-logging] client in
1240[`cloud.google.com/go/preview/logging`](https://godoc.org/cloud.google.com/go/preview/logging).
1241This client uses gRPC as its transport layer, and supports log reading, sinks
1242and metrics. It will replace the current client at `cloud.google.com/go/logging` shortly.
1243
1244
1245