Skip to content

fix(upload): report DONE status for multipart load jobs (#6) - #12

Draft
expobrain wants to merge 1 commit into
mainfrom
stack/01-load-json-400
Draft

expobrain wants to merge 1 commit into
mainfrom
stack/01-load-json-400

Conversation

@expobrain

Copy link
Copy Markdown
Owner

What

client.load_table_from_json(...).result() from the Python client fails with 400 unspecified job configuration query. The client uses a small multipart upload for this path and reads the terminal job status directly from the upload response. serveMultipart returned the job without setting status.state, so the client treated the job as failed.

This sets status.state = DONE on the multipart response, matching what the resumable upload path and jobs.get already do.

Changes

  • server/handler.go: set a terminal JobStatus on the job returned by serveMultipart.
  • server/server_test.go: new TestMultipartJSONLoadReportsJobStatus sends a Python-client-shaped NEWLINE_DELIMITED_JSON multipart upload (with jsonExtension, ignoreUnknownValues, schemaUpdateOptions) and asserts a DONE status plus queryable rows.

Verification

  • go test ./server ./internal/... ./types — all green.
  • Full go test ./... hits the 11-minute sandbox timeout in test/e2e (environment-related, unrelated to this change).

Stack

Rung 1 of the PR stack. Next: #7 (CDC load options). Upstream context: goccy#288 (closed), goccy#533 (open PR claiming the same fix).

Refs #6

The Python client's load_table_from_json uses the small multipart upload path and reads the job status from the upload response. serveMultipart returned the job without a status, so the client surfaced '400 unspecified job configuration query'. Set the terminal status the same way the resumable path does.

Refs #6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant