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

   Fix  https://github.com/apache/hop/issues/9171
   
   ## Summary
   
   
   - **Table exists:** an unknown connection name no longer fails silently like 
a missing table. It now increments errors and logs `Database connection [name] 
could not be found.`
   - **Wait for SQL:** connection/wait failures are logged with `logError` and 
a concise root-cause message (`Const.getRootCauseMessage`), instead of 
`logBasic` with an often-empty exception message.
   - **Truncate tables:** empty table names (dialog list or previous result 
rows) still log an ERROR, but now also increment `nrErrors` without stopping 
the loop, so later valid tables are still truncated and the action ends with 
`result=false`. Missing/blank connections are validated before `new 
Database(...)` to avoid an NPE on null `DatabaseMeta`.
   - Use Lombok `@Getter` / `@Setter` on `ActionTableExists`, 
`ActionTruncateTables`, and `TruncateTableItem`.
   - Add/extend unit tests for the three actions.
   
   ## Test plan
   
   - [x] `mvn -pl 
plugins/actions/tableexists,plugins/actions/waitforsql,plugins/actions/truncatetables
 -am test`
   - [x] Table exists with a typo connection name → `result=false`, `errors=1`, 
ERROR log with connection name
   - [x] Wait for SQL against a refused host/port → `result=false`, `errors=1`, 
single ERROR line with root cause (not Basic)
   - [x] Truncate tables with an empty table name followed by a valid one (list 
or previous rows) → empty-name ERROR, valid table truncated, `result=false`, 
`errors>=1`
   - [x] Truncate tables with a missing connection name → clear 
connection-not-found ERROR (no NPE)
   


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