Skip to content

Log first k lines on unexpected snapshot getFiles actions - #1003

Merged
littlegrasscao merged 8 commits into
mainfrom
sucao/log-first-k-lines-getfiles
Aug 28, 2026
Merged

littlegrasscao merged 8 commits into
mainfrom
sucao/log-first-k-lines-getfiles

Conversation

@littlegrasscao

Copy link
Copy Markdown
Collaborator

Summary

  • Snapshot getFiles now calls logFirstKLines before throwing on an unexpected NDJSON action, matching CDF getFiles and getMetadata.
  • This dumps the first 10 response lines in the error log so unexpected parquet-format query responses are easier to diagnose.

Test plan

  • Confirm snapshot getFiles still succeeds on a normal parquet query response (protocol + metadata + add files).
  • Confirm an unexpected action line logs the first 10 lines via logFirstKLines then throws IllegalStateException.

Sun Cao added 3 commits August 27, 2026 14:39
The CDF getFiles path already calls logFirstKLines before throwing; snapshot getFiles now does the same so unexpected NDJSON actions are easier to diagnose.
@littlegrasscao
littlegrasscao enabled auto-merge (squash) August 28, 2026 19:53
@littlegrasscao
littlegrasscao merged commit 34f42ba into main Aug 28, 2026
9 of 10 checks passed
littlegrasscao added a commit that referenced this pull request Sep 1, 2026
)

* Log first k response lines on unexpected snapshot getFiles actions.

The CDF getFiles path already calls logFirstKLines before throwing; snapshot getFiles now does the same so unexpected NDJSON actions are easier to diagnose.

* Distinguish snapshot vs streaming getFiles in logFirstKLines labels.

* Log first k lines on unexpected getCDFFiles actions.

* Include expected parquet snapshot line types in getFiles error.

* Include expected parquet line types in streaming getFiles and getCDFFiles errors.

* Include request target URL and expected action types in unexpected-line errors.

* Clarify unexpected-line errors start expecting actions from the 3rd line.

* Simplify unexpected-line errors to expecting-but-got wording.

---------

Co-authored-by: Sun Cao <sun.cao+data@databricks.com>
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.

2 participants