Skip to content

Commit 76ca663

Browse files
Google APIscopybara-github
authored andcommitted
feat: Updated the exponential backoff settings for the Document AI ProcessDocument and BatchProcessDocuments methods
feat: Add RESOURCE_EXHAUSTED to retryable status codes for ProcessDocument method feat: Added an url for issue reporting and api short name PiperOrigin-RevId: 688214664
1 parent b6a9d80 commit 76ca663

4 files changed

Lines changed: 31 additions & 9 deletions

File tree

google/cloud/documentai/v1/document_io.proto

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ message GcsPrefix {
6666

6767
// The common config to specify a set of documents used as input.
6868
message BatchDocumentsInputConfig {
69-
// The source.
69+
// The source. Make sure that the caller of the API has storage.objects.get
70+
// access to the buckets.
7071
oneof source {
7172
// The set of documents that match the specified Cloud Storage `gcs_prefix`.
7273
GcsPrefix gcs_prefix = 1;

google/cloud/documentai/v1/document_processor_service.proto

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,9 @@ message ProcessOptions {
359359
// If a page range is set, only the given pages are extracted and processed
360360
// from the document. In the output document,
361361
// [Document.Page.page_number][google.cloud.documentai.v1.Document.Page.page_number]
362-
// refers to the page number in the original document. This configuration
363-
// only applies to sync requests.
362+
// refers to the page number in the original document.
363+
// This configuration only applies to online processing with
364+
// [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument].
364365
oneof page_range {
365366
// Which pages to process (1-indexed).
366367
IndividualPageSelector individual_page_selector = 5;

google/cloud/documentai/v1/documentai_v1.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,29 @@ authentication:
8686
https://www.googleapis.com/auth/cloud-platform
8787
8888
publishing:
89+
new_issue_uri: https://issuetracker.google.com/issues/new?component=1132231&template=1639002
8990
documentation_uri: https://cloud.google.com/document-ai/docs
91+
api_short_name: documentai
9092
github_label: 'api: documentai'
9193
organization: CLOUD
9294
library_settings:
9395
- version: google.cloud.documentai.v1
96+
java_settings:
97+
common: {}
98+
cpp_settings:
99+
common: {}
100+
php_settings:
101+
common: {}
102+
python_settings:
103+
common: {}
104+
node_settings:
105+
common: {}
94106
dotnet_settings:
107+
common: {}
95108
ignored_resources:
96109
- documentai.googleapis.com/Location
110+
ruby_settings:
111+
common: {}
112+
go_settings:
113+
common: {}
97114
proto_reference_documentation_uri: https://cloud.google.com/document-ai/docs/reference/rpc

google/cloud/documentai/v1/documentai_v1_grpc_service_config.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@
99
],
1010
"timeout": "300s",
1111
"retryPolicy": {
12-
"initialBackoff": "0.100s",
13-
"maxBackoff": "60s",
14-
"backoffMultiplier": 1.3,
12+
"maxAttempts": 5,
13+
"initialBackoff": "1.000s",
14+
"maxBackoff": "90s",
15+
"backoffMultiplier": 9.0,
1516
"retryableStatusCodes": [
1617
"DEADLINE_EXCEEDED",
17-
"UNAVAILABLE"
18+
"UNAVAILABLE",
19+
"RESOURCE_EXHAUSTED"
1820
]
1921
}
2022
},
@@ -31,9 +33,10 @@
3133
],
3234
"timeout": "120s",
3335
"retryPolicy": {
34-
"initialBackoff": "0.100s",
36+
"maxAttempts": 5,
37+
"initialBackoff": "1.000s",
3538
"maxBackoff": "60s",
36-
"backoffMultiplier": 1.3,
39+
"backoffMultiplier": 1.5,
3740
"retryableStatusCodes": [
3841
"DEADLINE_EXCEEDED",
3942
"UNAVAILABLE"

0 commit comments

Comments
 (0)