bamaer commented on issue #9003:
URL: https://github.com/apache/hop/issues/9003#issuecomment-6248204969

   Thanks @Adalennis, confirmed from the code.
   
   hop-run promotes a variable to a parameter of the same name in 
`HopRunBase.configureParametersAndVariables`: any declared parameter that has a 
non-empty variable of that name (from the project, environment or hop-config) 
takes its value, before `-p` is applied. It has done this since HOP-4516 
(2022). Hop Gui only uses the values from Run Options and falls back to the 
default, which matches what #8101 does for child executions.
   
   Proposal: make hop-run follow the #8101 rule. A declared parameter gets the 
value passed with `-p`, or else its default. Hop Gui, hop-run and child 
executions would then agree, and the parameter-passing page already says what 
to do instead: if a value comes from the environment, don't declare it as a 
parameter, read `${NAME}`.
   
   This changes behaviour for top-level hop-run:
   - Jobs that rely on `-e <env>` filling a declared parameter would get the 
default instead. That needs an upgrade note, and maybe a temporary switch to 
keep the old behaviour.
   - The http and odata ITs declare `HOSTNAME` with default `localhost` and get 
the real host from the environment. They'd stop declaring it. They only break 
when run with `HOP_IT_PER_TEST_JVM=true`; the single-JVM runner passes the 
value through the Workflow Executor.
   
   @hansva, does that match what you intended with #8101, or should top-level 
runs keep "environment beats default"? Once this is decided, #9002 can document 
the final rule.
   


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