Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [documentai] Updated the exponential backoff settings for the Document AI ProcessDocument and BatchProcessDocuments methods #5762

Merged
merged 6 commits into from
Oct 30, 2024
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ message GcsPrefix {

// The common config to specify a set of documents used as input.
message BatchDocumentsInputConfig {
// The source.
// The source. Make sure that the caller of the API has storage.objects.get
// access to the buckets.
oneof source {
// The set of documents that match the specified Cloud Storage `gcs_prefix`.
GcsPrefix gcs_prefix = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,9 @@ message ProcessOptions {
// If a page range is set, only the given pages are extracted and processed
// from the document. In the output document,
// [Document.Page.page_number][google.cloud.documentai.v1.Document.Page.page_number]
// refers to the page number in the original document. This configuration
// only applies to sync requests.
// refers to the page number in the original document.
// This configuration only applies to online processing with
// [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument].
oneof page_range {
// Which pages to process (1-indexed).
IndividualPageSelector individual_page_selector = 5;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,12 @@ message DatasetSchema {

// Optional. Schema of the dataset.
DocumentSchema document_schema = 3 [(google.api.field_behavior) = OPTIONAL];

// Output only. Reserved for future use.
bool satisfies_pzs = 4 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Reserved for future use.
bool satisfies_pzi = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Dataset documents that the batch operation will be applied to.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ message GcsPrefix {

// The common config to specify a set of documents used as input.
message BatchDocumentsInputConfig {
// The source.
// The source. Make sure that the caller of the API has storage.objects.get
// access to the buckets.
oneof source {
// The set of documents that match the specified Cloud Storage `gcs_prefix`.
GcsPrefix gcs_prefix = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,9 @@ message ProcessOptions {
// If a page range is set, only the given pages are extracted and processed
// from the document. In the output document,
// [Document.Page.page_number][google.cloud.documentai.v1beta3.Document.Page.page_number]
// refers to the page number in the original document. This configuration
// only applies to sync requests.
// refers to the page number in the original document.
// This configuration only applies to online processing with
// [ProcessDocument][google.cloud.documentai.v1beta3.DocumentProcessorService.ProcessDocument].
oneof page_range {
// Which pages to process (1-indexed).
IndividualPageSelector individual_page_selector = 5;
Expand Down
12 changes: 12 additions & 0 deletions packages/google-cloud-documentai/protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions packages/google-cloud-documentai/protos/protos.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions packages/google-cloud-documentai/protos/protos.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
"idempotent": [
"DEADLINE_EXCEEDED",
"UNAVAILABLE"
],
"deadline_exceeded_resource_exhausted_unavailable": [
"DEADLINE_EXCEEDED",
"RESOURCE_EXHAUSTED",
"UNAVAILABLE"
]
},
"retry_params": {
Expand All @@ -17,18 +22,36 @@
"rpc_timeout_multiplier": 1,
"max_rpc_timeout_millis": 60000,
"total_timeout_millis": 600000
},
"cf44f94e283152b741c30fbc9df4a6abb71aa468": {
"initial_retry_delay_millis": 1000,
"retry_delay_multiplier": 9,
"max_retry_delay_millis": 90000,
"initial_rpc_timeout_millis": 60000,
"rpc_timeout_multiplier": 1,
"max_rpc_timeout_millis": 60000,
"total_timeout_millis": 600000
},
"c85d7af2fd532496a9c7916f9bf84795125b2bf2": {
"initial_retry_delay_millis": 1000,
"retry_delay_multiplier": 1.5,
"max_retry_delay_millis": 60000,
"initial_rpc_timeout_millis": 60000,
"rpc_timeout_multiplier": 1,
"max_rpc_timeout_millis": 60000,
"total_timeout_millis": 600000
}
},
"methods": {
"ProcessDocument": {
"timeout_millis": 300000,
"retry_codes_name": "idempotent",
"retry_params_name": "default"
"retry_codes_name": "deadline_exceeded_resource_exhausted_unavailable",
"retry_params_name": "cf44f94e283152b741c30fbc9df4a6abb71aa468"
},
"BatchProcessDocuments": {
"timeout_millis": 120000,
"retry_codes_name": "idempotent",
"retry_params_name": "default"
"retry_params_name": "c85d7af2fd532496a9c7916f9bf84795125b2bf2"
},
"FetchProcessorTypes": {
"retry_codes_name": "non_idempotent",
Expand Down Expand Up @@ -97,7 +120,7 @@
"ReviewDocument": {
"timeout_millis": 120000,
"retry_codes_name": "idempotent",
"retry_params_name": "default"
"retry_params_name": "c85d7af2fd532496a9c7916f9bf84795125b2bf2"
},
"EvaluateProcessorVersion": {
"retry_codes_name": "non_idempotent",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
"idempotent": [
"DEADLINE_EXCEEDED",
"UNAVAILABLE"
],
"deadline_exceeded_resource_exhausted_unavailable": [
"DEADLINE_EXCEEDED",
"RESOURCE_EXHAUSTED",
"UNAVAILABLE"
]
},
"retry_params": {
Expand All @@ -17,18 +22,36 @@
"rpc_timeout_multiplier": 1,
"max_rpc_timeout_millis": 60000,
"total_timeout_millis": 600000
},
"cf44f94e283152b741c30fbc9df4a6abb71aa468": {
"initial_retry_delay_millis": 1000,
"retry_delay_multiplier": 9,
"max_retry_delay_millis": 90000,
"initial_rpc_timeout_millis": 60000,
"rpc_timeout_multiplier": 1,
"max_rpc_timeout_millis": 60000,
"total_timeout_millis": 600000
},
"c85d7af2fd532496a9c7916f9bf84795125b2bf2": {
"initial_retry_delay_millis": 1000,
"retry_delay_multiplier": 1.5,
"max_retry_delay_millis": 60000,
"initial_rpc_timeout_millis": 60000,
"rpc_timeout_multiplier": 1,
"max_rpc_timeout_millis": 60000,
"total_timeout_millis": 600000
}
},
"methods": {
"ProcessDocument": {
"timeout_millis": 300000,
"retry_codes_name": "idempotent",
"retry_params_name": "default"
"retry_codes_name": "deadline_exceeded_resource_exhausted_unavailable",
"retry_params_name": "cf44f94e283152b741c30fbc9df4a6abb71aa468"
},
"BatchProcessDocuments": {
"timeout_millis": 120000,
"retry_codes_name": "idempotent",
"retry_params_name": "default"
"retry_params_name": "c85d7af2fd532496a9c7916f9bf84795125b2bf2"
},
"FetchProcessorTypes": {
"retry_codes_name": "non_idempotent",
Expand Down Expand Up @@ -97,7 +120,7 @@
"ReviewDocument": {
"timeout_millis": 120000,
"retry_codes_name": "idempotent",
"retry_params_name": "default"
"retry_params_name": "c85d7af2fd532496a9c7916f9bf84795125b2bf2"
},
"EvaluateProcessorVersion": {
"retry_codes_name": "non_idempotent",
Expand Down
Loading