Skip to content

Fix a batch of v0.7.0 follow-up bugs#467

Merged
goccy merged 1 commit into
mainfrom
fix/v0.7.0-followups
May 19, 2026
Merged

Fix a batch of v0.7.0 follow-up bugs#467
goccy merged 1 commit into
mainfrom
fix/v0.7.0-followups

Conversation

@goccy

@goccy goccy commented May 18, 2026

Copy link
Copy Markdown
Owner

Summary

Hands-on verification of the v0.7.0 release surfaced a set of defects in the REST layer and in the startup / metadata handling. This PR fixes all of them. Each fix was reproduced against a locally running emulator before and after, and is covered by a new regression test.

Fixes

Issue(s) Problem Fix
#333 --port=0 logged :0 instead of the assigned port The server reports the bound HTTP/gRPC addresses via a SetListenCallback hook; the CLI prints them and the library writes nothing to stdout
#237 / #397 / #207 Restarting against a persisted database crashed with a UNIQUE constraint violation, and overwrote the project so datasets disappeared from the REST catalog The startup loader reconciles source-described objects with what is already stored, inserting only what is missing
#136 / #396 An upload omitting jobReference (Node.js client) dereferenced a nil pointer; uploading to a missing dataset panicked The upload job is normalized (a job id is generated when absent); a missing dataset returns 404
#339 / #249 tables.get did not populate numRows numRows is filled from the backing table row count
#293 / #363 / #362 / #412 tables.patch ignored the request body and echoed it back; tables.update was an unsupported stub; X-HTTP-Method-Override was not honored Patch shallow-merges and persists, update replaces, both return the full resource, and a method-override wrapper runs before routing
#144 Inserting into a JSON column stored a string double-encoded and panicked on a native JSON object JSON columns are inserted via PARSE_JSON; normalizeData no longer walks a JSON value as a STRUCT
#347 A load from gs:// failed with "could not find default credentials" when no GCS emulator was configured The Storage client falls back to anonymous access (honoring GOOGLE_APPLICATION_CREDENTIALS when set)
#392 External tables were created in metadata but never registered with the query engine ("Table not found") External table source data is materialized into a backing table through the load pipeline at creation time

Testing

  • Regression tests for every fix were added to server/server_test.go (and server/gcs_internal_test.go for the unexported GCS options helper).
  • go test ./... — full suite green, including the test/e2e multi-client conformance suite (Python, Ruby, PHP, Node.js, Java, bq CLI).
  • go vet ./... clean.

🤖 Generated with Claude Code

Hands-on verification of the v0.7.0 release surfaced a set of defects
in the REST layer and the startup/metadata handling. This addresses
all of them; each fix was reproduced against a locally running
emulator before and after, and is covered by a new regression test.

- #333: with --port=0 the startup log printed ":0" instead of the
  OS-assigned port. The server now reports the actually bound HTTP and
  gRPC addresses through a SetListenCallback hook; the CLI prints them
  and the server library writes nothing to stdout itself.
- #237 / #397 / #207: restarting against a persisted database wiped
  or duplicated metadata. The startup loader re-inserted datasets
  unconditionally (UNIQUE constraint violation) and overwrote the
  project datasetIDs with the empty CLI project (datasets vanished
  from the REST catalog). The loader now reconciles source-described
  objects with what is already stored, inserting only what is missing.
- #136 / #396: an upload whose metadata omitted jobReference (the
  Node.js client) dereferenced a nil pointer; uploading to a missing
  dataset panicked. The upload job is normalized (a job id is
  generated when absent) and the missing-dataset case returns 404.
- #339 / #249: tables.get did not populate numRows. It is now filled
  from the backing table row count.
- #293 / #363 / #362 / #412: table updates were broken. tables.patch
  ignored the request body and echoed it back instead of a full Table
  resource; tables.update was an "unsupported" stub; the
  X-HTTP-Method-Override header (used by the Java client) was not
  honored. Patch now shallow-merges and persists, update replaces,
  both return the full resource, and a method-override wrapper runs
  before routing.
- #144: inserting into a JSON column stored a string double-encoded
  and panicked on a native JSON object. JSON columns are now inserted
  via PARSE_JSON, and normalizeData no longer walks a JSON value as a
  STRUCT.
- #347: a load job from gs:// failed with "could not find default
  credentials" when no GCS emulator was configured. The Storage
  client now falls back to anonymous access (honoring
  GOOGLE_APPLICATION_CREDENTIALS when set).
- #392: external tables were created in metadata but never registered
  with the query engine, so querying them failed with "Table not
  found". External table source data is now materialized into a
  backing table through the load pipeline at creation time.

Regression tests for every fix are added to server/server_test.go,
plus server/gcs_internal_test.go for the unexported GCS client
options helper.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@goccy goccy force-pushed the fix/v0.7.0-followups branch from 6270c78 to 6173dc6 Compare May 19, 2026 01:23
@goccy goccy merged commit 2e73d3d into main May 19, 2026
12 checks passed
@goccy goccy deleted the fix/v0.7.0-followups branch May 19, 2026 01:40
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