Skip to content

Commit

Permalink
feat: [documentai] Updated the exponential backoff settings for the D…
Browse files Browse the repository at this point in the history
…ocument AI ProcessDocument and BatchProcessDocuments methods (#5762)

* 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

Source-Link: googleapis/googleapis@211a72f

Source-Link: googleapis/googleapis-gen@7546101
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRvY3VtZW50YWkvLk93bEJvdC55YW1sIiwiaCI6Ijc1NDYxMDFkNTM0YzRlNmJjMzA2OWQ4ZjFjM2JlNGVmM2FiYjRiMmUifQ==

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 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

Source-Link: googleapis/googleapis@76ca663

Source-Link: googleapis/googleapis-gen@6ad9727
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRvY3VtZW50YWkvLk93bEJvdC55YW1sIiwiaCI6IjZhZDk3Mjc3NDMwNzQ0ZGQ5YzczZTdmZjM5N2RjZTAwNTQ3ZDhlMGMifQ==

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: sofisl <[email protected]>
  • Loading branch information
3 people authored Oct 30, 2024
1 parent f9dea89 commit 267abc2
Show file tree
Hide file tree
Showing 10 changed files with 142 additions and 14 deletions.
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

0 comments on commit 267abc2

Please sign in to comment.