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

   ### Apache Hop version?
   
   2.20.0-SNAPSHOT
   
   ### Java version?
   
   openjdk 21
   
   ### Operating system
   
   Windows
   
   ### What happened?
   
   ## Summary
   When URL or HTTP method is taken from an input field and the field name is 
correctly specified, pipeline **Check** in Hop GUI shows a success message 
(e.g. "URL field is specified.") but marks the remark as **ERROR**.
   This is a copy-paste bug in `check()`: the success branch uses 
`ICheckResult.TYPE_RESULT_ERROR` instead of `TYPE_RESULT_OK`.
   
   <img width="640" height="410" alt="Image" 
src="https://github.com/user-attachments/assets/44fe9982-ede8-4594-94a5-e12aae42b722";
 />
   
   ## Affected code
   | Transform | Class | Success message key | Bug |
   |-----------|--------|---------------------|-----|
   | HTTP | `HttpMeta` | `HTTPMeta.CheckResult.UrlfieldOk` | 
`TYPE_RESULT_ERROR` instead of `OK` |
   | HTTP Post | `HttpPostMeta` | `HTTPPOSTMeta.CheckResult.UrlfieldOk` | same |
   | REST | `RestMeta` | `RestMeta.CheckResult.MethodFieldOk` | same |
   > Note: `RestMeta` URL-field success path already uses `TYPE_RESULT_OK` 
correctly; only the dynamic method-field success path is wrong.
   ### Relevant snippets
   **HTTP** (`HttpMeta.java`):
   ```java
   } else {
     cr =
         new CheckResult(
             ICheckResult.TYPE_RESULT_ERROR, // should be TYPE_RESULT_OK
             BaseMessages.getString(PKG, "HTTPMeta.CheckResult.UrlfieldOk"),
             transformMeta);
   }
   ```
   **HTTP Post** (`HttpPostMeta.java`): same pattern for 
`HTTPPOSTMeta.CheckResult.UrlfieldOk`.
   **REST** (`RestMeta.java`): same pattern for 
`RestMeta.CheckResult.MethodFieldOk`.
   ## Steps to reproduce
   1. Create a pipeline with a Row Generator that outputs fields `url` and 
`http_method`.
   2. Add an **HTTP** transform with "URL in field" enabled and URL field = 
`url`.
   3. Add an **HTTP Post** transform with the same URL-in-field settings.
   4. Add a **REST** transform with dynamic method enabled and method field = 
`http_method`.
   5. Connect the generator to all three transforms.
   6. Run **Check** (pipeline verification) in Hop GUI.
   ## Expected behavior
   Remarks for a specified URL/method field should be type **OK**, matching the 
message text.
   ## Actual behavior
   Remarks use message keys `*UrlfieldOk` / `*MethodFieldOk` but type 
**ERROR**, so Check incorrectly reports failures.
   
   
   ### Issue Priority
   
   Priority: 3
   
   ### Issue Component
   
   Component: Hop Gui


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