Copilot commented on code in PR #2881:
URL: https://github.com/apache/tika/pull/2881#discussion_r3369989895
##########
tika-eval/tika-eval-app/src/main/java/org/apache/tika/eval/app/ExtractComparerRunner.java:
##########
@@ -131,12 +132,16 @@ public static void main(String[] args) throws Exception {
ResultsReporter.main(new String[]{"-d", dbPath, "-rd",
reportsDir});
Path reportsDirPath = Paths.get(reportsDir);
if (Files.isDirectory(reportsDirPath)) {
- Path tgzPath = reportsDirPath.resolveSibling(reportsDir +
".tar.gz");
+ Path tgzPath =
reportsDirPath.resolveSibling(reportsDirPath.getFileName() + ".tgz");
Review Comment:
When `-d` is provided as a full JDBC URL (supported by
`getJdbcConnectionString`), the auto-report path still invokes
`ResultsReporter` with `-d <dbPath>`. `ResultsReporter` treats `-d` as an H2
database name/path and will fail for JDBC URLs; it expects `-jdbc` for that
case. This makes `-r` unusable with JDBC URLs even though Compare itself
supports them.
##########
docs/modules/ROOT/pages/advanced/integration-testing/tika-eval-regression.adoc:
##########
@@ -203,9 +204,13 @@ Options:
tika-eval will create `\{label}.mv.db` and a `\{label}-reports/` dir
alongside. Persist the db if you want to re-run Report later.
* `-r` / `--report` — automatically run the Report step after Compare,
- and zip the reports directory.
+ and tgz the reports directory to `<reportsDir>.tgz`.
* `-rd` / `--reportsDir` — explicit reports directory (overrides the
default derived from `-d`).
+* `-z` / `--gzip` — gzip the H2 db file to `<db>.mv.db.gz` after Compare
+ so it can be transferred. Requires `-d` (no-op with a warning for a
+ temp db or a jdbc connection string). Combine with `-r` to package
+ both the reports and the db.
Review Comment:
The `-z/--gzip` flag is documented as a no-op for "a jdbc connection
string", but the implementation actually supports `jdbc:h2:file:` URLs (it
extracts the file path and gzips the resulting `.mv.db`). The docs should
narrow this to *non-file* JDBC connections (e.g., `jdbc:h2:mem:` / tcp) to
avoid misleading users.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]