Adalennis opened a new issue, #9171:
URL: https://github.com/apache/hop/issues/9171

   ### Apache Hop version?
   
   SNAPSHOT-20261021
   
   ### Java version?
   
   Java 21
   
   ### Operating system
   
   macOS
   
   ### What happened?
   
   Found while documenting the result of these actions (#8970, eighth batch, PR 
#9139). Reproduced with hop-run against PostgreSQL 16; the current behaviour is 
documented on each action page, so the docs need an update when these are fixed.
   
   **1. Table exists: a connection that doesn't exist in the project gives 
false with 0 errors and logs nothing**
   
   `ActionTableExists.execute` checks `if (dbMeta != null)` (line 121) but has 
no `else`, so when `findDatabase()` returns null the action is false with 0 
errors and no message, exactly like a table that doesn't exist. A typo in the 
connection name looks like a missing table. An empty connection is logged and 
counts 1 error (line 147); an unknown one should do the same.
   
   **2. Wait for SQL logs a connection failure at Basic level, not as an error**
   
   When the connection can't be opened (for example connection refused), the 
exception is caught at line 355 and logged with `logBasic("Exception while 
waiting for SQL data: " + ...)`. The action is false with 1 error, but the log 
shows no ERROR line, so the cause is easy to miss and is not shown in red in 
Hop Gui. It should be `logError`.
   
   **3. Truncate tables logs an empty table name as an error but doesn't count 
it**
   
   - With *Get arguments from previous*, a result row with an empty table name 
logs "ERROR: This row is empty (no table name specified)..we will skip." (line 
190).
   - In the table list of the dialog, a row with an empty table name logs 
"ERROR: This argument is empty!" (line 216).
   
   Neither calls `updateErrors()`, so the action is true with 0 errors (tested: 
an empty first row followed by a valid table truncates the table and gives 
result=[true], errors=0). Either the empty name should count as an error, or it 
should be logged as a warning/detail and skipped without an ERROR line. #8777 
fixed the missing-connection and execution-failure cases of this action, not 
this one.
   
   ### Issue Priority
   
   Priority: 3
   
   ### Issue Component
   
   Component: Hop Gui, 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]

Reply via email to