google-cloud-container 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4e8df2dc1416c4f34efb8433387f77f8f3e2a05bf4c889b85468e0fe5070141b
4
- data.tar.gz: 6699a0b6bdadb6ab79ad122399bc65818bdcff535cf43a3b9c7097811071a58e
3
+ metadata.gz: 34bf171374c5d572ad87691b3d6858992bf3c26b57af2de064a7dd65001eb57a
4
+ data.tar.gz: 8b861f5541354bff6264bf097bf90af5710484d954a5f031fa95f7e05adfcbb9
5
5
  SHA512:
6
- metadata.gz: 2fdc11d78dc02e876de19e2e4a08860e7cf2895a7b056df6291c1cd501c026ec7ca88ae660c6ef09b1a277ca8ae5456ea6c76a6a3b3e6d3489fd91fe14ea8957
7
- data.tar.gz: 447a01635fa0ca31928f60bfae4f8f8400d73068c1fa06c5fc49f2104b38ec9490b48144dfc8350a89b8dc7e356c411cc59582e1a59eaea2e0a180001ea74467
6
+ metadata.gz: 067ee50a7091ef34e9694d8f7230bb15829bdd6aab5dc4cd9bee17037dc8020ddbe64e82a63bd417d2e536636cfa8c18a942e9bab47306dacf9357cdc402fe69
7
+ data.tar.gz: 26c8888127c40c93715e95d10142966991c41eab2f80080e946d231d97dbabe39830e398412074473e071b430e79e9a61ecd218670910fb000d1e25c4ae0141e
@@ -26,6 +26,10 @@ To summarize:
26
26
  specifies whether they are required or optional. Additionally, you can pass
27
27
  a proto request object instead of separate arguments. See
28
28
  [Passing Arguments](#passing-arguments) for more info.
29
+ * Previously, clients reported RPC errors by raising instances of
30
+ `Google::Gax::GaxError` and its subclasses. Now, RPC exceptions are of type
31
+ `Google::Cloud::Error` and its subclasses. See
32
+ [Handling Errors](#handling-errors) for more info.
29
33
  * Some classes have moved into different namespaces. See
30
34
  [Class Namespaces](#class-namespaces) for more info.
31
35
 
@@ -208,6 +212,51 @@ response = client.set_logging_service(
208
212
  )
209
213
  ```
210
214
 
215
+ ### Handling Errors
216
+
217
+ The client reports standard
218
+ [gRPC error codes](https://github.com/grpc/grpc/blob/master/doc/statuscodes.md)
219
+ by raising exceptions. In older releases, these exceptions were located in the
220
+ `Google::Gax` namespace and were subclasses of the `Google::Gax::GaxError` base
221
+ exception class, defined in the `google-gax` gem. However, these classes were
222
+ different from the standard exceptions (subclasses of `Google::Cloud::Error`)
223
+ thrown by other client libraries such as `google-cloud-storage`.
224
+
225
+ The 1.0 client library now uses the `Google::Cloud::Error` exception hierarchy,
226
+ for consistency across all the Google Cloud client libraries. In general, these
227
+ exceptions have the same name as their counterparts from older releases, but
228
+ are located in the `Google::Cloud` namespace rather than the `Google::Gax`
229
+ namespace.
230
+
231
+ Old:
232
+ ```
233
+ client = Google::Cloud::Container.new
234
+
235
+ name = "projects/my-project/locations/-/clusters/my-cluster"
236
+ logging_service = "logging.googleapis.com"
237
+
238
+ begin
239
+ response = client.set_logging_service logging_service, name: name
240
+ rescue Google::Gax::Error => e
241
+ # Handle exceptions that subclass Google::Gax::Error
242
+ end
243
+ ```
244
+
245
+ New:
246
+ ```
247
+ client = Google::Cloud::Container.cluster_manager
248
+
249
+ name = "projects/my-project/locations/-/clusters/my-cluster"
250
+ logging_service = "logging.googleapis.com"
251
+
252
+ begin
253
+ response = client.set_logging_service name: name,
254
+ logging_service: logging_service
255
+ rescue Google::Cloud::Error => e
256
+ # Handle exceptions that subclass Google::Cloud::Error
257
+ end
258
+ ```
259
+
211
260
  ### Class Namespaces
212
261
 
213
262
  In older releases, some data type (protobuf) classes were located under the module
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Container
23
- VERSION = "1.1.0"
23
+ VERSION = "1.1.1"
24
24
  end
25
25
  end
26
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-container
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-20 00:00:00.000000000 Z
11
+ date: 2020-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-core