Repository navigation
♻️ various improvements to polling - #281
Merged
Merged
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
There was a problem hiding this comment.
🟡 Changes recommended
Client regression tests are missing for polled jobs returning Failed, including assertions for exception type, job ID, error details or fallback message, and no result request.
1 open issue
2 resolved since last review
Review effort: Balanced
Comment on lines
+226
to
+229
| if job_response.job.status == 'Failed' | ||
| if job_response.job.error | ||
| err_to_raise = Mindee::Error::MindeeHTTPErrorV2.new(job_response.job.error) | ||
| raise err_to_raise, "Parsing failed for job #{job_response.job.id}: #{err_to_raise.message}" |
ianardee
force-pushed
the
fix-polling
branch
from
November 16, 2026 13:21
51f091b to
c0bb218
Compare
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