gnodet opened a new pull request, #31154:
URL: https://github.com/apache/camel/pull/31154

   ## Summary
   
   Fix `camel-robotframework` to work with Robot Framework 4.1.2: six CLI 
options that were removed in RF 2.8/3.0 are no longer forwarded (they caused 
rc=252), `--monitorcolors` is remapped to the current `--consolecolors`, and 
the endpoint `variables` option is now correctly passed as `-v` arguments to RF.
   
   ## Root Cause
   
   **Bug 1 — Six removed CLI flags cause rc=252.**
   `RobotFrameworkEndpoint.onExchange()` forwarded six options that Robot 
Framework removed years ago. RF 4.1.2 rejects any unrecognised option with 
return code 252, so every run using these options (or even setting them to 
their defaults) would immediately fail:
   
   | Option | Removed in |
   |--------|-----------|
   | `--runmode` | RF 2.8 |
   | `--splitoutputs` | RF 3.0 |
   | `--summarytitle` | RF 3.0 |
   | `--monitorwidth` | RF 3.0 |
   | `--warnonskippedfiles` | RF 3.0 |
   | `--monitorcolors` | RF 2.7 (renamed `--consolecolors`) |
   
   **Bug 2 — `variables` option silently discarded.**
   `configuration.getVariables()` was never called in `onExchange()`. 
User-configured static variables (endpoint option `variables=name:value,...`) 
were therefore never forwarded as `-v` arguments.
   
   ## Fix
   
   - Remove the five fully-removed options from the generated argument list 
(`--runmode`, `--splitoutputs`, `--summarytitle`, `--monitorwidth`, 
`--warnonskippedfiles`). The corresponding configuration fields are kept for 
backward compatibility but their `@UriParam` description is updated to say they 
are ignored.
   - Remap `monitorColors` → `--consolecolors` (the RF 2.7+ flag). The 
`monitorColors` field name is preserved to avoid an API break.
   - Call `configuration.getVariables()` in `onExchange()` and pass the values 
as `-v name:value` arguments before the exchange-derived variables.
   - Update the generated `robotframework.json` catalog file (changed 
descriptions).
   
   ## Tests
   
   Two new tests in `RobotFrameworkOptionsFixTest`:
   
   1. **`testDeprecatedOptionsDoNotCauseFailure`** — sets all five deprecated 
options (`runMode`, `splitOutputs`, `summaryTitle`, `monitorWidth`, 
`warnOnSkippedFiles`) in the endpoint URI and asserts rc=0. With the old code 
this would have returned rc=252.
   
   2. **`testStaticVariablesPassedToRobotFramework`** — uses a `.robot` suite 
that asserts `${staticVar} == staticValue` and sets 
`variables=staticVar:staticValue` on the endpoint. With the old code the 
variable was never passed and the suite would have failed with an undefined 
variable error.
   
   All 16 tests in the module pass (`mvn verify`).
   
   ---
   _Hermes Agent (Claude Sonnet 4.6) on behalf of Guillaume Nodet_
   


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