google-cloud-scheduler 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/MIGRATING.md +47 -1
- data/lib/google/cloud/scheduler/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8f4217b58de7acdb27f5844ee1846d86c1b921d4ec5ca91037f22418876f096
|
4
|
+
data.tar.gz: 1ec7bb133c180da0a217d72b90e369469a36737279b14b4a4093ab29f7e3bb5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5bbf96cc00caf869342285bd29954321cd0f0bcd0481e2fcdfbe690e7b11d4e476a1399101f6aa6bd66364203d0e897078d4c5660a389f95adc6e48938d706b
|
7
|
+
data.tar.gz: 16494c26d3ebdef612cc5b5e8b51af55ae517b9c38ec9a141a303da5a3f15cffe047daedfdb855486b36c7f08d72d0b50341a6bf1d3276e41752569252a4f246
|
data/MIGRATING.md
CHANGED
@@ -30,6 +30,10 @@ To summarize:
|
|
30
30
|
resource paths. These methods now take keyword rather than positional
|
31
31
|
arguments, and are also available in a separate paths module. See
|
32
32
|
[Resource Path Helpers](#resource-path-helpers) for more info.
|
33
|
+
* Previously, clients reported RPC errors by raising instances of
|
34
|
+
`Google::Gax::GaxError` and its subclasses. Now, RPC exceptions are of type
|
35
|
+
`Google::Cloud::Error` and its subclasses. See
|
36
|
+
[Handling Errors](#handling-errors) for more info.
|
33
37
|
* Some classes have moved into different namespaces. See
|
34
38
|
[Class Namespaces](#class-namespaces) for more info.
|
35
39
|
|
@@ -241,7 +245,7 @@ In the 2.0 client, you can also use the paths module as a convenience module.
|
|
241
245
|
|
242
246
|
New:
|
243
247
|
```
|
244
|
-
# Bring the
|
248
|
+
# Bring the path helper methods into the current class
|
245
249
|
include Google::Cloud::Scheduler::V1::CloudScheduler::Paths
|
246
250
|
|
247
251
|
def foo
|
@@ -256,6 +260,48 @@ def foo
|
|
256
260
|
end
|
257
261
|
```
|
258
262
|
|
263
|
+
### Handling Errors
|
264
|
+
|
265
|
+
The client reports standard
|
266
|
+
[gRPC error codes](https://github.com/grpc/grpc/blob/master/doc/statuscodes.md)
|
267
|
+
by raising exceptions. In older releases, these exceptions were located in the
|
268
|
+
`Google::Gax` namespace and were subclasses of the `Google::Gax::GaxError` base
|
269
|
+
exception class, defined in the `google-gax` gem. However, these classes were
|
270
|
+
different from the standard exceptions (subclasses of `Google::Cloud::Error`)
|
271
|
+
thrown by other client libraries such as `google-cloud-storage`.
|
272
|
+
|
273
|
+
The 2.0 client library now uses the `Google::Cloud::Error` exception hierarchy,
|
274
|
+
for consistency across all the Google Cloud client libraries. In general, these
|
275
|
+
exceptions have the same name as their counterparts from older releases, but
|
276
|
+
are located in the `Google::Cloud` namespace rather than the `Google::Gax`
|
277
|
+
namespace.
|
278
|
+
|
279
|
+
Old:
|
280
|
+
```
|
281
|
+
client = Google::Cloud::Scheduler.new
|
282
|
+
|
283
|
+
parent = "projects/my-project/locations/-"
|
284
|
+
|
285
|
+
begin
|
286
|
+
response = client.list_jobs parent, page_size: 10
|
287
|
+
rescue Google::Gax::Error => e
|
288
|
+
# Handle exceptions that subclass Google::Gax::Error
|
289
|
+
end
|
290
|
+
```
|
291
|
+
|
292
|
+
New:
|
293
|
+
```
|
294
|
+
client = Google::Cloud::Scheduler.cloud_scheduler
|
295
|
+
|
296
|
+
parent = "projects/my-project/locations/-"
|
297
|
+
|
298
|
+
begin
|
299
|
+
response = client.list_jobs parent: parent, page_size: 10
|
300
|
+
rescue Google::Cloud::Error => e
|
301
|
+
# Handle exceptions that subclass Google::Cloud::Error
|
302
|
+
end
|
303
|
+
```
|
304
|
+
|
259
305
|
### Class Namespaces
|
260
306
|
|
261
307
|
In older releases, the client object was of class
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-scheduler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.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-
|
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
|