Repository navigation
Conversation
- rely on required options and validators after expansion - cover response files, defaults, and invalid parser input - document private argument files and writable mappings
WalkthroughLoader 选项解析不再要求至少三个命令行参数。测试新增默认值、响应文件解析和错误场景覆盖。README 新增参数文件用法及相关注意事项。 ChangesLoader 参数解析
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to No actionable issue is established that needs to block merging after normal checks. Pre-merge checks |
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🔇 Additional comments (5)
hugegraph-loader/src/test/java/org/apache/hugegraph/loader/test/unit/LoadOptionsTest.java (4)
59-61: LGTM!
63-75: LGTM!
116-137: LGTM!
77-114: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.临时文件创建在当前工作目录,且
File.createTempFile默认不限制权限。
createTempFile(..., new File("."))会在工作目录创建文件。如果测试在finally之前被强制终止,会在源码目录留下残留文件。测试使用的是非敏感内容,权限风险很低。可以改用java.nio.file.Files.createTempFile,或使用 JUnit 的TemporaryFolder。这样文件会放在系统临时目录并自动清理。此项为可选改进。Source: Linters/SAST tools
hugegraph-loader/README.md (1)
112-131: LGTM!
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
97350ab6-fe28-43e4-91cf-3ccb3cb162fe
📒 Files selected for processing (3)
hugegraph-loader/README.mdhugegraph-loader/src/main/java/org/apache/hugegraph/loader/executor/LoadOptions.javahugegraph-loader/src/test/java/org/apache/hugegraph/loader/test/unit/LoadOptionsTest.java
💤 Files with no reviewable changes (1)
- hugegraph-loader/src/main/java/org/apache/hugegraph/loader/executor/LoadOptions.java
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #61 +/- ##
============================================
- Coverage 46.97% 44.75% -2.23%
+ Complexity 4509 3323 -1186
============================================
Files 602 377 -225
Lines 29432 22484 -6948
Branches 3454 3005 -449
============================================
- Hits 13825 10062 -3763
+ Misses 14321 11351 -2970
+ Partials 1286 1071 -215 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Purpose of the PR
Loader expands a valid
@loader.argsfile, then rejects it because the original process argument count is less than three. The parser now relies on the required mapping option and existing validators, accepting response files and minimal commands using defaults while invalid inputs still fail. Related to the acceptance discussion.Main Changes
Remove the raw argument-count check. Add separate-process regressions for response files, spaced filenames, defaults, and invalid inputs. Document argument-file syntax and the writable mapping directory needed for progress output in Kubernetes.
Verifying these changes
Does this PR potentially affect the following parts?
Documentation Status
Doc - Done: Loader README updated.Summary by CodeRabbit
@loader.args从参数文件读取启动选项及其值。文件中的路径相对于工作目录解析;含凭据的文件应限制为仅所有者可读写,映射目录则需可写。Paired website documentation: ASF #518. The same code branch is submitted in ASF toolchain #808. Coordinate the code and website merges.