Adalennis opened a new issue, #9174:
URL: https://github.com/apache/hop/issues/9174
### Apache Hop version?
SNAPSHOT-20261021
### Java version?
Java 21
### Operating system
macOS
### What happened?
Found while documenting the result of these actions (#8970, fifth batch, PR
#9111). Reproduced with hop-run; the current behaviour is documented in a NOTE
or in the Result table of each action page, so the docs need an update when
these are fixed.
**1. Process result filenames: an invalid regular expression stops the
workflow**
`ActionCopyMoveResultFilenames.execute` compiles *Wildcard* and *Exclude
wildcard* (lines 181 and 184) before the `try` (line 195). With a wildcard like
`[`, the `PatternSyntaxException` escapes `execute()`: the workflow stops with
"A serious error occurred during workflow execution", and no hop is followed.
**2. Evaluate files metrics: an invalid regular expression stops the
workflow**
With *Source files* set to *Filenames result*,
`Pattern.compile(realPattern)` (line 269) runs outside the per-file `try`. An
invalid wildcard stops the workflow the same way.
For both, an invalid regular expression should make the action false with 1
error.
**3. XML well formed: a result row with fewer than two fields stops the
workflow**
With *Copy previous results to args*, `execute()` reads
`resultRow.getString(1, null)` (line 191) without checking the number of
fields. A row with only the path throws a NullPointerException ("Cannot invoke
... getString(Object) because meta is null") that escapes `execute()`, and the
workflow stops.
**4. XML well formed matches the wildcard against the whole path**
`processFileFolder` calls `GetFileWildcard(currentFile.toString(),
realWildcard)` (lines 404 and 410), so the regular expression is matched
against `file:///.../good.xml`. A wildcard on the file name such as `good\.xml`
matches nothing: no file is checked and the action is true with 0 errors.
`.*\.xml` works. Other actions (Files exist, Folder is empty, Check files
locked) match the base name; DOS to Unix has the same problem (#9117, point 5).
**5. Wait for file: a path that can't be read is false with 0 errors**
When checking the file throws (for example a `zip:` path into a file that is
not a zip), the exception is caught at line 279 and logged with
`logBasic("Exception while waiting for file [...] to stop growing", e)`. The
message doesn't match what happened, it is not logged as an error, and the
action is false with 0 errors. It should be logged with `logError` and count 1
error.
### Issue Priority
Priority: 3
### Issue Component
Component: Actions
--
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]