[ENG-43320] Add metadata-extractor flow doc + harden ConfigLoader errors - #193
Merged
Merged
Conversation
Two coupled changes for the data-plane metadata-extractor job.
1. docs/metadata-extractor-flow.md (new) — canonical end-to-end walk-through
of the Push-Model extractor: entry & lifecycle, discovery, metadata read
path (Hudi V1/V2 + Iceberg), pre-signed URL fetch, upload path, HTTP
transport / retry / jitter, checkpoint state, error-handling matrix,
concurrency model, cost levers, configuration reference, current
test-coverage map, and debugging recipes. Linked from docs/index.md
so the lakeview-docs QMD collection picks it up on the next git-sync.
2. ConfigLoader hardening — replace the implicit NullPointerException
that fires when YAML omits the 'version' field with a clear, actionable
IllegalArgumentException. Specifically loadConfigFromJsonNode now
distinguishes:
- empty/unparseable YAML -> "Config is empty or could not be parsed"
- missing/blank version field -> "Config missing required 'version' field"
- unknown version value -> "Unsupported config version: <X>"
Also includes the config file path in the outer
loadConfigFromConfigFile error message so "Failed to load config"
says which file failed.
Tests added to ConfigLoaderTest cover all four error paths.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
dharmendersheshma
approved these changes
Jun 16, 2026
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.



Two coupled changes for the data-plane metadata-extractor job.
1. New doc:
docs/metadata-extractor-flow.mdCanonical end-to-end walk-through of the Push-Model extractor, intended for engineers extending it, on-callers debugging it, and the lakeview-docs QMD collection that mounts this folder into the OneHouse AI agent platform. Sections:
Linked from
docs/index.md.2. ConfigLoader hardening
ConfigLoader.loadConfigFromJsonNodepreviously crashed with a buriedNullPointerExceptionwhen YAML omitted theversionfield — the outercatch (Exception e) { throw new RuntimeException(\"Failed to load config\", e) }wrapped the NPE in a message that didn't say what was actually wrong, and didn't include the config file path.Replaced the silent NPE with explicit, actionable errors:
IllegalArgumentException(\"Config is empty or could not be parsed\")versionfieldnull.asText()IllegalArgumentException(\"Config missing required 'version' field\")version: \"\"orversion: nullIllegalArgumentException(\"Config missing required 'version' field\")version: V99(unknown enum)\"No enum constant ConfigVersion.V99\"IllegalArgumentException(\"Unsupported config version: V99\")\"Failed to load config\"\"Failed to load config from /path/to/missing.yaml\"5 tests added to
ConfigLoaderTestcover all five paths above.Regression risk
Zero for valid configs. The fix tightens error messages on already-broken inputs (which used to crash with cryptic stack traces). The exception type thrown by
loadConfigFromString/loadConfigFromConfigFileis unchanged (RuntimeExceptionwrapping the newIllegalArgumentException), so any caller that catchesRuntimeExceptioncontinues to work. If a caller was relying ongetCause()being a Jackson exception for the empty-YAML case, they would now get anIllegalArgumentException— no such callers found in this repo (ConfigLoaderis only called fromMainandConfigRefresher, neither inspects the cause).Test plan
./gradlew :lakeview:test --tests ai.onehouse.config.*— 16 tests green (11 existing + 5 new)../gradlew :lakeview:spotlessCheck— green.Related
Fix InputStream leak in PresignedUrlFileUploader + error-path tests) — same ENG-43320 effort, different file.