You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

old-news.md 19 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698
  1. _February 26, 2018_
  2. *v0.19.0*
  3. - bigquery:
  4. - Support customer-managed encryption keys.
  5. - bigtable:
  6. - Improved emulator support.
  7. - Support GetCluster.
  8. - datastore:
  9. - Add general mutations.
  10. - Support pointer struct fields.
  11. - Support transaction options.
  12. - firestore:
  13. - Add Transaction.GetAll.
  14. - Support document cursors.
  15. - logging:
  16. - Support concurrent RPCs to the service.
  17. - Support per-entry resources.
  18. - profiler:
  19. - Add config options to disable heap and thread profiling.
  20. - Read the project ID from $GOOGLE_CLOUD_PROJECT when it's set.
  21. - pubsub:
  22. - BEHAVIOR CHANGE: Release flow control after ack/nack (instead of after the
  23. callback returns).
  24. - Add SubscriptionInProject.
  25. - Add OpenCensus instrumentation for streaming pull.
  26. - storage:
  27. - Support CORS.
  28. _January 18, 2018_
  29. *v0.18.0*
  30. - bigquery:
  31. - Marked stable.
  32. - Schema inference of nullable fields supported.
  33. - Added TimePartitioning to QueryConfig.
  34. - firestore: Data provided to DocumentRef.Set with a Merge option can contain
  35. Delete sentinels.
  36. - logging: Clients can accept parent resources other than projects.
  37. - pubsub:
  38. - pubsub/pstest: A lighweight fake for pubsub. Experimental; feedback welcome.
  39. - Support updating more subscription metadata: AckDeadline,
  40. RetainAckedMessages and RetentionDuration.
  41. - oslogin/apiv1beta: New client for the Cloud OS Login API.
  42. - rpcreplay: A package for recording and replaying gRPC traffic.
  43. - spanner:
  44. - Add a ReadWithOptions that supports a row limit, as well as an index.
  45. - Support query plan and execution statistics.
  46. - Added [OpenCensus](http://opencensus.io) support.
  47. - storage: Clarify checksum validation for gzipped files (it is not validated
  48. when the file is served uncompressed).
  49. _December 11, 2017_
  50. *v0.17.0*
  51. - firestore BREAKING CHANGES:
  52. - Remove UpdateMap and UpdateStruct; rename UpdatePaths to Update.
  53. Change
  54. `docref.UpdateMap(ctx, map[string]interface{}{"a.b", 1})`
  55. to
  56. `docref.Update(ctx, []firestore.Update{{Path: "a.b", Value: 1}})`
  57. Change
  58. `docref.UpdateStruct(ctx, []string{"Field"}, aStruct)`
  59. to
  60. `docref.Update(ctx, []firestore.Update{{Path: "Field", Value: aStruct.Field}})`
  61. - Rename MergePaths to Merge; require args to be FieldPaths
  62. - A value stored as an integer can be read into a floating-point field, and vice versa.
  63. - bigtable/cmd/cbt:
  64. - Support deleting a column.
  65. - Add regex option for row read.
  66. - spanner: Mark stable.
  67. - storage:
  68. - Add Reader.ContentEncoding method.
  69. - Fix handling of SignedURL headers.
  70. - bigquery:
  71. - If Uploader.Put is called with no rows, it returns nil without making a
  72. call.
  73. - Schema inference supports the "nullable" option in struct tags for
  74. non-required fields.
  75. - TimePartitioning supports "Field".
  76. _October 30, 2017_
  77. *v0.16.0*
  78. - Other bigquery changes:
  79. - `JobIterator.Next` returns `*Job`; removed `JobInfo` (BREAKING CHANGE).
  80. - UseStandardSQL is deprecated; set UseLegacySQL to true if you need
  81. Legacy SQL.
  82. - Uploader.Put will generate a random insert ID if you do not provide one.
  83. - Support time partitioning for load jobs.
  84. - Support dry-run queries.
  85. - A `Job` remembers its last retrieved status.
  86. - Support retrieving job configuration.
  87. - Support labels for jobs and tables.
  88. - Support dataset access lists.
  89. - Improve support for external data sources, including data from Bigtable and
  90. Google Sheets, and tables with external data.
  91. - Support updating a table's view configuration.
  92. - Fix uploading civil times with nanoseconds.
  93. - storage:
  94. - Support PubSub notifications.
  95. - Support Requester Pays buckets.
  96. - profiler: Support goroutine and mutex profile types.
  97. _October 3, 2017_
  98. *v0.15.0*
  99. - firestore: beta release. See the
  100. [announcement](https://firebase.googleblog.com/2017/10/introducing-cloud-firestore.html).
  101. - errorreporting: The existing package has been redesigned.
  102. - errors: This package has been removed. Use errorreporting.
  103. _September 28, 2017_
  104. *v0.14.0*
  105. - bigquery BREAKING CHANGES:
  106. - Standard SQL is the default for queries and views.
  107. - `Table.Create` takes `TableMetadata` as a second argument, instead of
  108. options.
  109. - `Dataset.Create` takes `DatasetMetadata` as a second argument.
  110. - `DatasetMetadata` field `ID` renamed to `FullID`
  111. - `TableMetadata` field `ID` renamed to `FullID`
  112. - Other bigquery changes:
  113. - The client will append a random suffix to a provided job ID if you set
  114. `AddJobIDSuffix` to true in a job config.
  115. - Listing jobs is supported.
  116. - Better retry logic.
  117. - vision, language, speech: clients are now stable
  118. - monitoring: client is now beta
  119. - profiler:
  120. - Rename InstanceName to Instance, ZoneName to Zone
  121. - Auto-detect service name and version on AppEngine.
  122. _September 8, 2017_
  123. *v0.13.0*
  124. - bigquery: UseLegacySQL options for CreateTable and QueryConfig. Use these
  125. options to continue using Legacy SQL after the client switches its default
  126. to Standard SQL.
  127. - bigquery: Support for updating dataset labels.
  128. - bigquery: Set DatasetIterator.ProjectID to list datasets in a project other
  129. than the client's. DatasetsInProject is no longer needed and is deprecated.
  130. - bigtable: Fail ListInstances when any zones fail.
  131. - spanner: support decoding of slices of basic types (e.g. []string, []int64,
  132. etc.)
  133. - logging/logadmin: UpdateSink no longer creates a sink if it is missing
  134. (actually a change to the underlying service, not the client)
  135. - profiler: Service and ServiceVersion replace Target in Config.
  136. _August 22, 2017_
  137. *v0.12.0*
  138. - pubsub: Subscription.Receive now uses streaming pull.
  139. - pubsub: add Client.TopicInProject to access topics in a different project
  140. than the client.
  141. - errors: renamed errorreporting. The errors package will be removed shortly.
  142. - datastore: improved retry behavior.
  143. - bigquery: support updates to dataset metadata, with etags.
  144. - bigquery: add etag support to Table.Update (BREAKING: etag argument added).
  145. - bigquery: generate all job IDs on the client.
  146. - storage: support bucket lifecycle configurations.
  147. _July 31, 2017_
  148. *v0.11.0*
  149. - Clients for spanner, pubsub and video are now in beta.
  150. - New client for DLP.
  151. - spanner: performance and testing improvements.
  152. - storage: requester-pays buckets are supported.
  153. - storage, profiler, bigtable, bigquery: bug fixes and other minor improvements.
  154. - pubsub: bug fixes and other minor improvements
  155. _June 17, 2017_
  156. *v0.10.0*
  157. - pubsub: Subscription.ModifyPushConfig replaced with Subscription.Update.
  158. - pubsub: Subscription.Receive now runs concurrently for higher throughput.
  159. - vision: cloud.google.com/go/vision is deprecated. Use
  160. cloud.google.com/go/vision/apiv1 instead.
  161. - translation: now stable.
  162. - trace: several changes to the surface. See the link below.
  163. [Code changes required from v0.9.0.](https://github.com/googleapis/google-cloud-go/blob/master/MIGRATION.md)
  164. _March 17, 2017_
  165. Breaking Pubsub changes.
  166. * Publish is now asynchronous
  167. ([announcement](https://groups.google.com/d/topic/google-api-go-announce/aaqRDIQ3rvU/discussion)).
  168. * Subscription.Pull replaced by Subscription.Receive, which takes a callback ([announcement](https://groups.google.com/d/topic/google-api-go-announce/8pt6oetAdKc/discussion)).
  169. * Message.Done replaced with Message.Ack and Message.Nack.
  170. _February 14, 2017_
  171. Release of a client library for Spanner. See
  172. the
  173. [blog post](https://cloudplatform.googleblog.com/2017/02/introducing-Cloud-Spanner-a-global-database-service-for-mission-critical-applications.html).
  174. Note that although the Spanner service is beta, the Go client library is alpha.
  175. _December 12, 2016_
  176. Beta release of BigQuery, DataStore, Logging and Storage. See the
  177. [blog post](https://cloudplatform.googleblog.com/2016/12/announcing-new-google-cloud-client.html).
  178. Also, BigQuery now supports structs. Read a row directly into a struct with
  179. `RowIterator.Next`, and upload a row directly from a struct with `Uploader.Put`.
  180. You can also use field tags. See the [package documentation][cloud-bigquery-ref]
  181. for details.
  182. _December 5, 2016_
  183. More changes to BigQuery:
  184. * The `ValueList` type was removed. It is no longer necessary. Instead of
  185. ```go
  186. var v ValueList
  187. ... it.Next(&v) ..
  188. ```
  189. use
  190. ```go
  191. var v []Value
  192. ... it.Next(&v) ...
  193. ```
  194. * Previously, repeatedly calling `RowIterator.Next` on the same `[]Value` or
  195. `ValueList` would append to the slice. Now each call resets the size to zero first.
  196. * Schema inference will infer the SQL type BYTES for a struct field of
  197. type []byte. Previously it inferred STRING.
  198. * The types `uint`, `uint64` and `uintptr` are no longer supported in schema
  199. inference. BigQuery's integer type is INT64, and those types may hold values
  200. that are not correctly represented in a 64-bit signed integer.
  201. * The SQL types DATE, TIME and DATETIME are now supported. They correspond to
  202. the `Date`, `Time` and `DateTime` types in the new `cloud.google.com/go/civil`
  203. package.
  204. _November 17, 2016_
  205. Change to BigQuery: values from INTEGER columns will now be returned as int64,
  206. not int. This will avoid errors arising from large values on 32-bit systems.
  207. _November 8, 2016_
  208. New datastore feature: datastore now encodes your nested Go structs as Entity values,
  209. instead of a flattened list of the embedded struct's fields.
  210. This means that you may now have twice-nested slices, eg.
  211. ```go
  212. type State struct {
  213. Cities []struct{
  214. Populations []int
  215. }
  216. }
  217. ```
  218. See [the announcement](https://groups.google.com/forum/#!topic/google-api-go-announce/79jtrdeuJAg) for
  219. more details.
  220. _November 8, 2016_
  221. Breaking changes to datastore: contexts no longer hold namespaces; instead you
  222. must set a key's namespace explicitly. Also, key functions have been changed
  223. and renamed.
  224. * The WithNamespace function has been removed. To specify a namespace in a Query, use the Query.Namespace method:
  225. ```go
  226. q := datastore.NewQuery("Kind").Namespace("ns")
  227. ```
  228. * All the fields of Key are exported. That means you can construct any Key with a struct literal:
  229. ```go
  230. k := &Key{Kind: "Kind", ID: 37, Namespace: "ns"}
  231. ```
  232. * As a result of the above, the Key methods Kind, ID, d.Name, Parent, SetParent and Namespace have been removed.
  233. * `NewIncompleteKey` has been removed, replaced by `IncompleteKey`. Replace
  234. ```go
  235. NewIncompleteKey(ctx, kind, parent)
  236. ```
  237. with
  238. ```go
  239. IncompleteKey(kind, parent)
  240. ```
  241. and if you do use namespaces, make sure you set the namespace on the returned key.
  242. * `NewKey` has been removed, replaced by `NameKey` and `IDKey`. Replace
  243. ```go
  244. NewKey(ctx, kind, name, 0, parent)
  245. NewKey(ctx, kind, "", id, parent)
  246. ```
  247. with
  248. ```go
  249. NameKey(kind, name, parent)
  250. IDKey(kind, id, parent)
  251. ```
  252. and if you do use namespaces, make sure you set the namespace on the returned key.
  253. * The `Done` variable has been removed. Replace `datastore.Done` with `iterator.Done`, from the package `google.golang.org/api/iterator`.
  254. * The `Client.Close` method will have a return type of error. It will return the result of closing the underlying gRPC connection.
  255. See [the announcement](https://groups.google.com/forum/#!topic/google-api-go-announce/hqXtM_4Ix-0) for
  256. more details.
  257. _October 27, 2016_
  258. Breaking change to bigquery: `NewGCSReference` is now a function,
  259. not a method on `Client`.
  260. New bigquery feature: `Table.LoaderFrom` now accepts a `ReaderSource`, enabling
  261. loading data into a table from a file or any `io.Reader`.
  262. _October 21, 2016_
  263. Breaking change to pubsub: removed `pubsub.Done`.
  264. Use `iterator.Done` instead, where `iterator` is the package
  265. `google.golang.org/api/iterator`.
  266. _October 19, 2016_
  267. Breaking changes to cloud.google.com/go/bigquery:
  268. * Client.Table and Client.OpenTable have been removed.
  269. Replace
  270. ```go
  271. client.OpenTable("project", "dataset", "table")
  272. ```
  273. with
  274. ```go
  275. client.DatasetInProject("project", "dataset").Table("table")
  276. ```
  277. * Client.CreateTable has been removed.
  278. Replace
  279. ```go
  280. client.CreateTable(ctx, "project", "dataset", "table")
  281. ```
  282. with
  283. ```go
  284. client.DatasetInProject("project", "dataset").Table("table").Create(ctx)
  285. ```
  286. * Dataset.ListTables have been replaced with Dataset.Tables.
  287. Replace
  288. ```go
  289. tables, err := ds.ListTables(ctx)
  290. ```
  291. with
  292. ```go
  293. it := ds.Tables(ctx)
  294. for {
  295. table, err := it.Next()
  296. if err == iterator.Done {
  297. break
  298. }
  299. if err != nil {
  300. // TODO: Handle error.
  301. }
  302. // TODO: use table.
  303. }
  304. ```
  305. * Client.Read has been replaced with Job.Read, Table.Read and Query.Read.
  306. Replace
  307. ```go
  308. it, err := client.Read(ctx, job)
  309. ```
  310. with
  311. ```go
  312. it, err := job.Read(ctx)
  313. ```
  314. and similarly for reading from tables or queries.
  315. * The iterator returned from the Read methods is now named RowIterator. Its
  316. behavior is closer to the other iterators in these libraries. It no longer
  317. supports the Schema method; see the next item.
  318. Replace
  319. ```go
  320. for it.Next(ctx) {
  321. var vals ValueList
  322. if err := it.Get(&vals); err != nil {
  323. // TODO: Handle error.
  324. }
  325. // TODO: use vals.
  326. }
  327. if err := it.Err(); err != nil {
  328. // TODO: Handle error.
  329. }
  330. ```
  331. with
  332. ```
  333. for {
  334. var vals ValueList
  335. err := it.Next(&vals)
  336. if err == iterator.Done {
  337. break
  338. }
  339. if err != nil {
  340. // TODO: Handle error.
  341. }
  342. // TODO: use vals.
  343. }
  344. ```
  345. Instead of the `RecordsPerRequest(n)` option, write
  346. ```go
  347. it.PageInfo().MaxSize = n
  348. ```
  349. Instead of the `StartIndex(i)` option, write
  350. ```go
  351. it.StartIndex = i
  352. ```
  353. * ValueLoader.Load now takes a Schema in addition to a slice of Values.
  354. Replace
  355. ```go
  356. func (vl *myValueLoader) Load(v []bigquery.Value)
  357. ```
  358. with
  359. ```go
  360. func (vl *myValueLoader) Load(v []bigquery.Value, s bigquery.Schema)
  361. ```
  362. * Table.Patch is replace by Table.Update.
  363. Replace
  364. ```go
  365. p := table.Patch()
  366. p.Description("new description")
  367. metadata, err := p.Apply(ctx)
  368. ```
  369. with
  370. ```go
  371. metadata, err := table.Update(ctx, bigquery.TableMetadataToUpdate{
  372. Description: "new description",
  373. })
  374. ```
  375. * Client.Copy is replaced by separate methods for each of its four functions.
  376. All options have been replaced by struct fields.
  377. * To load data from Google Cloud Storage into a table, use Table.LoaderFrom.
  378. Replace
  379. ```go
  380. client.Copy(ctx, table, gcsRef)
  381. ```
  382. with
  383. ```go
  384. table.LoaderFrom(gcsRef).Run(ctx)
  385. ```
  386. Instead of passing options to Copy, set fields on the Loader:
  387. ```go
  388. loader := table.LoaderFrom(gcsRef)
  389. loader.WriteDisposition = bigquery.WriteTruncate
  390. ```
  391. * To extract data from a table into Google Cloud Storage, use
  392. Table.ExtractorTo. Set fields on the returned Extractor instead of
  393. passing options.
  394. Replace
  395. ```go
  396. client.Copy(ctx, gcsRef, table)
  397. ```
  398. with
  399. ```go
  400. table.ExtractorTo(gcsRef).Run(ctx)
  401. ```
  402. * To copy data into a table from one or more other tables, use
  403. Table.CopierFrom. Set fields on the returned Copier instead of passing options.
  404. Replace
  405. ```go
  406. client.Copy(ctx, dstTable, srcTable)
  407. ```
  408. with
  409. ```go
  410. dst.Table.CopierFrom(srcTable).Run(ctx)
  411. ```
  412. * To start a query job, create a Query and call its Run method. Set fields
  413. on the query instead of passing options.
  414. Replace
  415. ```go
  416. client.Copy(ctx, table, query)
  417. ```
  418. with
  419. ```go
  420. query.Run(ctx)
  421. ```
  422. * Table.NewUploader has been renamed to Table.Uploader. Instead of options,
  423. configure an Uploader by setting its fields.
  424. Replace
  425. ```go
  426. u := table.NewUploader(bigquery.UploadIgnoreUnknownValues())
  427. ```
  428. with
  429. ```go
  430. u := table.NewUploader(bigquery.UploadIgnoreUnknownValues())
  431. u.IgnoreUnknownValues = true
  432. ```
  433. _October 10, 2016_
  434. Breaking changes to cloud.google.com/go/storage:
  435. * AdminClient replaced by methods on Client.
  436. Replace
  437. ```go
  438. adminClient.CreateBucket(ctx, bucketName, attrs)
  439. ```
  440. with
  441. ```go
  442. client.Bucket(bucketName).Create(ctx, projectID, attrs)
  443. ```
  444. * BucketHandle.List replaced by BucketHandle.Objects.
  445. Replace
  446. ```go
  447. for query != nil {
  448. objs, err := bucket.List(d.ctx, query)
  449. if err != nil { ... }
  450. query = objs.Next
  451. for _, obj := range objs.Results {
  452. fmt.Println(obj)
  453. }
  454. }
  455. ```
  456. with
  457. ```go
  458. iter := bucket.Objects(d.ctx, query)
  459. for {
  460. obj, err := iter.Next()
  461. if err == iterator.Done {
  462. break
  463. }
  464. if err != nil { ... }
  465. fmt.Println(obj)
  466. }
  467. ```
  468. (The `iterator` package is at `google.golang.org/api/iterator`.)
  469. Replace `Query.Cursor` with `ObjectIterator.PageInfo().Token`.
  470. Replace `Query.MaxResults` with `ObjectIterator.PageInfo().MaxSize`.
  471. * ObjectHandle.CopyTo replaced by ObjectHandle.CopierFrom.
  472. Replace
  473. ```go
  474. attrs, err := src.CopyTo(ctx, dst, nil)
  475. ```
  476. with
  477. ```go
  478. attrs, err := dst.CopierFrom(src).Run(ctx)
  479. ```
  480. Replace
  481. ```go
  482. attrs, err := src.CopyTo(ctx, dst, &storage.ObjectAttrs{ContextType: "text/html"})
  483. ```
  484. with
  485. ```go
  486. c := dst.CopierFrom(src)
  487. c.ContextType = "text/html"
  488. attrs, err := c.Run(ctx)
  489. ```
  490. * ObjectHandle.ComposeFrom replaced by ObjectHandle.ComposerFrom.
  491. Replace
  492. ```go
  493. attrs, err := dst.ComposeFrom(ctx, []*storage.ObjectHandle{src1, src2}, nil)
  494. ```
  495. with
  496. ```go
  497. attrs, err := dst.ComposerFrom(src1, src2).Run(ctx)
  498. ```
  499. * ObjectHandle.Update's ObjectAttrs argument replaced by ObjectAttrsToUpdate.
  500. Replace
  501. ```go
  502. attrs, err := obj.Update(ctx, &storage.ObjectAttrs{ContextType: "text/html"})
  503. ```
  504. with
  505. ```go
  506. attrs, err := obj.Update(ctx, storage.ObjectAttrsToUpdate{ContextType: "text/html"})
  507. ```
  508. * ObjectHandle.WithConditions replaced by ObjectHandle.If.
  509. Replace
  510. ```go
  511. obj.WithConditions(storage.Generation(gen), storage.IfMetaGenerationMatch(mgen))
  512. ```
  513. with
  514. ```go
  515. obj.Generation(gen).If(storage.Conditions{MetagenerationMatch: mgen})
  516. ```
  517. Replace
  518. ```go
  519. obj.WithConditions(storage.IfGenerationMatch(0))
  520. ```
  521. with
  522. ```go
  523. obj.If(storage.Conditions{DoesNotExist: true})
  524. ```
  525. * `storage.Done` replaced by `iterator.Done` (from package `google.golang.org/api/iterator`).
  526. _October 6, 2016_
  527. Package preview/logging deleted. Use logging instead.
  528. _September 27, 2016_
  529. Logging client replaced with preview version (see below).
  530. _September 8, 2016_
  531. * New clients for some of Google's Machine Learning APIs: Vision, Speech, and
  532. Natural Language.
  533. * Preview version of a new [Stackdriver Logging][cloud-logging] client in
  534. [`cloud.google.com/go/preview/logging`](https://godoc.org/cloud.google.com/go/preview/logging).
  535. This client uses gRPC as its transport layer, and supports log reading, sinks
  536. and metrics. It will replace the current client at `cloud.google.com/go/logging` shortly.