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.

CHANGES.md 34 KiB

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