Enhance IcebergProbeImpl with jar source logging and version fallback - #14488
Conversation
Greptile SummaryThis PR enhances Key changes:
Confidence Score: 4/5Safe to merge after considering a minor duplicate-warning issue; no correctness or data-loss risks. All previously flagged P0/P1 concerns (null safety, trait mismatch) are resolved. The one remaining finding is a P2 style issue: the fallback warning can fire twice due to independent lazy val computations in IcebergProvider. This is cosmetic and does not affect correctness, but keeping the score at 4 to prompt the author to consider caching getDetectedVersion. iceberg/common/src/main/scala/com/nvidia/spark/rapids/iceberg/IcebergProbeImpl.scala — duplicate warning log in fallback path. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[getDetectedVersion] --> B{commitId in commitToVersion?}
B -- yes --> C[return version string]
B -- no --> D[extractVersionFromJarPath]
D --> E{getProtectionDomain != null?}
E -- no --> F[return commitId as-is]
E -- yes --> G{getCodeSource != null?}
G -- no --> F
G -- yes --> H{getLocation != null?}
H -- no --> F
H -- yes --> I[url.getPath]
I --> J{jarVersionPattern matches?}
J -- no --> F
J -- yes --> K[logWarning + return version]
Reviews (7): Last reviewed commit: "Refactor version extraction logic in Ice..." | Re-trigger Greptile |
Signed-off-by: Gera Shegalov <gshegalov@nvidia.com>
Signed-off-by: Gera Shegalov <gshegalov@nvidia.com>
186de32 to
e48ecea
Compare
…probe-version-detection
Updated the jar version pattern to be more specific to the iceberg-spark-runtime format. Introduced a new private method to extract the version from the jar path, improving the clarity and maintainability of the version detection logic. The getDetectedVersion method now utilizes this new method for better handling of unknown commit IDs.
Updated the method for extracting the version from the jar path to improve clarity and reliability. The change ensures that the protection domain is properly accessed before retrieving the code source, enhancing the robustness of the version detection process.
|
build |
Fixes #14487
Requires #14494
Description
Fallback on the version in the jar file name
Checklists
(Please explain in the PR description how the new code paths are tested, such as names of the new/existing tests that cover them.)