Skip to content

Commit 211a72f

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: 687393779
1 parent 0dfb6a9 commit 211a72f

5 files changed

Lines changed: 37 additions & 9 deletions

File tree

google/cloud/documentai/v1beta3/dataset.proto

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,12 @@ message DatasetSchema {
174174

175175
// Optional. Schema of the dataset.
176176
DocumentSchema document_schema = 3 [(google.api.field_behavior) = OPTIONAL];
177+
178+
// Output only. Reserved for future use.
179+
bool satisfies_pzs = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
180+
181+
// Output only. Reserved for future use.
182+
bool satisfies_pzi = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
177183
}
178184

179185
// Dataset documents that the batch operation will be applied to.

google/cloud/documentai/v1beta3/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/v1beta3/document_processor_service.proto

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,8 +384,9 @@ message ProcessOptions {
384384
// If a page range is set, only the given pages are extracted and processed
385385
// from the document. In the output document,
386386
// [Document.Page.page_number][google.cloud.documentai.v1beta3.Document.Page.page_number]
387-
// refers to the page number in the original document. This configuration
388-
// only applies to sync requests.
387+
// refers to the page number in the original document.
388+
// This configuration only applies to online processing with
389+
// [ProcessDocument][google.cloud.documentai.v1beta3.DocumentProcessorService.ProcessDocument].
389390
oneof page_range {
390391
// Which pages to process (1-indexed).
391392
IndividualPageSelector individual_page_selector = 5;

google/cloud/documentai/v1beta3/documentai_v1beta3.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,29 @@ authentication:
9898
https://www.googleapis.com/auth/cloud-platform
9999
100100
publishing:
101+
new_issue_uri: https://issuetracker.google.com/issues/new?component=1132231&template=1639002
101102
documentation_uri: https://cloud.google.com/document-ai/docs
103+
api_short_name: documentai
102104
github_label: 'api: documentai'
103105
organization: CLOUD
104106
library_settings:
105107
- version: google.cloud.documentai.v1beta3
108+
java_settings:
109+
common: {}
110+
cpp_settings:
111+
common: {}
112+
php_settings:
113+
common: {}
114+
python_settings:
115+
common: {}
116+
node_settings:
117+
common: {}
106118
dotnet_settings:
119+
common: {}
107120
ignored_resources:
108121
- documentai.googleapis.com/Location
122+
ruby_settings:
123+
common: {}
124+
go_settings:
125+
common: {}
109126
proto_reference_documentation_uri: https://cloud.google.com/document-ai/docs/reference/rpc

google/cloud/documentai/v1beta3/documentai_v1beta3_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)