voonhous commented on code in PR #18816:
URL: https://github.com/apache/hudi/pull/18816#discussion_r3887609503


##########
hudi-cli/src/test/java/org/apache/hudi/cli/commands/TestArchivedCommitsCommand.java:
##########
@@ -168,6 +159,7 @@ public void testShowArchivedCommits() {
   /**
    * Test for command: show archived commits.
    */
+  @Disabled("TODO: HUDI-7614 - ArchivedCommitsCommand reads old 
HoodieLogFormat but v9 tables use LSMTimelineWriter")

Review Comment:
   All five HUDI-7614 disables are gone now, leaving only the pre-existing 
`HUDI-9700`. hudi-cli suite: 113 tests, 0 failures, 0 errors, 1 skipped.
   
   **One that needs your call.** `trigger archival` spawns `SparkMain` in a 
separate spark-submit via `SparkLauncher`, so it needs `SPARK_HOME` and the 
jars under `target/lib` from `mvn package` -- neither exists in the functional 
suite or in the new `test-hudi-cli` job, so the test could not pass there in 
any form. I changed it to call `SparkMain.archive(jsc(), 2, 3, 1, false, 
tablePath)` directly, matching what `TestCleansCommand`, `TestRepairsCommand` 
and `TestUpgradeDowngradeCommand` already do, and made `SparkMain.archive` 
`protected` like its neighbours `clean`, `deleteMarker` and 
`upgradeOrDowngradeTable`.
   
   That covers the archival logic but not the shell wiring (`@ShellMethod`, 
`SparkUtil.initLauncher`, `addAppArgs`), which is now untested, as it was while 
disabled. Covering it honestly needs an `ITTest` run after `mvn package`. Happy 
to drop that commit and leave the test disabled with an accurate reason 
instead, if you would rather not narrow it.
   
   The other four turned out not to be table-version-9 problems:
   
   - `TestRestoresCommand` (2): already passing. The v9 setup rework earlier in 
this branch fixed them and the `@Disabled` was added in the same commit, never 
lifted. Removing the annotation is the entire change.
   - `TestRepairsCommand` (2): #13229 (HUDI-8470) removed auto-commit from 
`WriteClient`, and these tests never added an explicit `client.commit(...)`, so 
writes stayed inflight and the first snapshot read returned 0 rows -- before 
either repair command ran. Three `client.commit` calls, no production change. 
`SparkMain.repairDeprecatedPartition` and `renamePartition` were correct on v9 
all along.
   
   Also in the archive test: the archived-instant count goes 12 -> 4, since the 
LSM timeline holds one entry per instant where the legacy format archived 
requested, inflight and completed separately.
   



-- 
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]

Reply via email to