Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Failed-job exceptions discard API failure details shown by the CLI, and the rewritten polling loop lacks regression coverage for success on the final allowed attempt.
2 open issues
What changed in this PR
This PR refactors V2 asynchronous polling to separate job completion from result retrieval, while updating error handling and shared lint settings.
Changes:
- Reorganizes polling retries, cancellation checks, and optional webhook waiting.
- Updates polling type signatures and the retry-exhaustion test assertion.
- Adjusts RuboCop complexity limits and removes local suppressions.
| File | Description |
|---|---|
spec/v2/client_v2_spec.rb |
Updates the expected retry-exhaustion error message. |
sig/mindee/v2/client.rbs |
Defines signatures for the refactored polling helpers. |
lib/mindee/v2/parsing/job.rb |
Removes a local complexity suppression. |
lib/mindee/v2/parsing/field/inference_fields.rb |
Removes local complexity suppressions. |
lib/mindee/v2/client.rb |
Refactors polling, webhook waiting, and result retrieval. |
lib/mindee/v1/parsing/common/execution.rb |
Removes a local complexity suppression. |
lib/mindee/v1/client.rb |
Removes a local complexity suppression. |
.rubocop.yml |
Raises complexity limits and permits optional boolean parameters. |
Review effort: Balanced
| "Job ID #{job_response.job.id} completed processing at: #{job_response.job.completed_at}" | ||
| ) | ||
|
|
||
| return job_response if !wait_for_webhooks || check_webhooks_done?(job_response) |
Comment on lines
+228
to
+229
| raise Mindee::Error::MindeeHTTPErrorV2.new(job_response.job.error), | ||
| "Parsing failed for job #{job_response.job.id}" |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Types of changes