GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||
GeezerVison is showing github.com — Fix wait_for_job for create_extract job ids (#1093) by jacalata · Pull Request #1882 · tableau/server-client-python Conversation
Contributor
Closes #1093. Motivation
Reported in 2022, still reproduces on rel-windows on-prem 3.30 and stage-dataplane1 Cloud 3.30 against the monolith's Behavior change
The Test plan
🤖 Generated with Claude Code
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsTableau Server returns a JobItem from create_extract on datasources and
workbooks whose id is not addressable via GET /jobs/{id} -- that call
raises ServerResponseError with code 400031. The id IS visible through
the paginated /jobs listing endpoint.
wait_for_job now catches the 400031 error and transparently falls back
to polling /jobs, matching on id, and translating the resulting
BackgroundJobItem into a JobItem so the return type stays stable.
Callers that use wait_for_job are covered without changing their code.
Direct callers of get_by_id still see the raw server error.
BackgroundJobItem carries fewer fields than JobItem, so the translated
JobItem returns defaults for the missing fields (documented in the
wait_for_job docstring). Success/Failed/Cancelled map to their
FinishCode; anything else keeps completed_at=None so the outer poll
loop re-polls, with finish_code=-1 as a sentinel so a reader inspecting
finish_code alone can't mistake an unfinished job for Success.
Six new pytest cases cover the happy path (no listing hit), fallback
happy/failed/cancelled, in-progress iteration, multi-page pager walk,
timeout in the fallback, non-400031 propagation, and job-not-in-listing
(re-raises 400031).
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟢 Approval recommendedThe fallback is narrowly scoped, preserves existing error behavior, and has comprehensive regression coverage. Pull request overviewAdds a targeted fallback for unqueryable Changes:
File summaries
Review details
💡 Add a
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsThis branch has not been deployedNo deployments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reviewers
Copilot code review
Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
At least 1 approving review is required to merge this pull request. Uh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. server.jobs.wait_for_job fails for ID generated by create_extract
Uh oh!
There was an error while loading. Please reload this page. 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. | ||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |