leehaut opened a new pull request, #8867:
URL: https://github.com/apache/hop/pull/8867

   Fix https://github.com/apache/hop/issues/8866
   
   ## Summary
   
   - Fix **Evaluate files metrics** `check()` so Verify workflow validates 
`sourceFiles` / `sourceFiles[i].sourceFileFolder` instead of the obsolete 
`arguments` property.
   - Remove the `(i++)` double increment in the validation loop so every 
configured file row is checked (not only 0, 2, 4, …).
   - Enable `FileExistsValidator.putFailIfDoesNotExist(true)` for static file 
sources so missing paths appear in Problems (aligned with execute), and skip 
static path checks when source type is previous/result filenames.
   
   ## Problem
   
   After the `@HopMetadataProperty` rewrite, `check()` still looked up 
`arguments`. Verify failed immediately with:
   
   `unable to validate. Reason: arguments`
   
   Even with the property name fixed, `"arguments[" + (i++) + "]"` inside `for 
(int i = 0; i < size; i++)` would skip every other row. Separately, 
`FileExistsValidator` defaults `failIfDoesNotExist` to `false`, so missing 
files produced no ERROR remark while runtime logged that the file/folder does 
not exist.
   
   ## Changes
   
   - `ActionEvalFilesMetrics.check()`: validate `sourceFiles` and 
`sourceFiles[i].sourceFileFolder`; use method `variables`; fail when a static 
path is missing; only for `SourceFilesType.FILES`.
   - Add `ActionEvalFilesMetricsCheckTest` covering null list, missing second 
row, both rows present, and previous/filenames-result skip.
   
   ## Test plan
   
   - [x] `./mvnw -pl plugins/actions/evalfilesmetrics 
-Dtest=ActionEvalFilesMetricsCheckTest,ActionEvalFilesMetricsTest test`
   - [x] In Hop GUI: workflow with Evaluate files metrics and **two** file 
rows; second path missing → Verify reports `sourceFiles[1].sourceFileFolder 
must exist.`
   


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