Re: [PATCH 0/6] Lua variable handling

2020-05-25 Thread Christopher Faulet
Le 19/05/2020 à 13:49, Tim Duesterhus a écrit : Christopher, Thierry, this patch series implements the solution discussed in GitHub issue #624: https://github.com/haproxy/haproxy/issues/624#issuecomment-630590470 I felt pretty dirty having to copy and paste my changes to all three versions of

Re: [PATCH 0/6] Lua variable handling

2020-05-20 Thread Willy Tarreau
On Tue, May 19, 2020 at 05:39:25PM +0200, Christopher Faulet wrote: > Le 19/05/2020 à 16:06, Tim Düsterhus a écrit : > > > > > > Now back on topic. Instead of adding more parameters to set_var(), I'd > > > prefer a warning instead. > > > > > > If someone is using set_var() from Lua, and that

Re: [PATCH 0/6] Lua variable handling

2020-05-19 Thread Christopher Faulet
Le 19/05/2020 à 16:06, Tim Düsterhus a écrit : Now back on topic. Instead of adding more parameters to set_var(), I'd prefer a warning instead. If someone is using set_var() from Lua, and that variable is never used or set in the rest of the config, we would know that. Additionally, one can

Re: [PATCH 0/6] Lua variable handling

2020-05-19 Thread Christopher Faulet
Le 19/05/2020 à 13:49, Tim Duesterhus a écrit : Christopher, Thierry, this patch series implements the solution discussed in GitHub issue #624: https://github.com/haproxy/haproxy/issues/624#issuecomment-630590470 I felt pretty dirty having to copy and paste my changes to all three versions of

Re: [PATCH 0/6] Lua variable handling

2020-05-19 Thread Tim Düsterhus
Adis, Am 19.05.20 um 15:57 schrieb Adis Nezirovic: > However, nothing in the code checks that variable name is formed > correctly (with correct prefix, such as "txn."), or that the rest of the > variable name is correct. > > Lua code using set_var() with wrong name silently fails, the variable

Re: [PATCH 0/6] Lua variable handling

2020-05-19 Thread Adis Nezirovic
Tim, First, not a a direct comment on your patches, but before I forget, I'd like to point out that there is one more thing which need fixing in regard to Lua variables: TXN.set_var(TXN, var, value) where "var" is noted as: The var name according with the HAProxy syntax

[PATCH 0/6] Lua variable handling

2020-05-19 Thread Tim Duesterhus
Christopher, Thierry, this patch series implements the solution discussed in GitHub issue #624: https://github.com/haproxy/haproxy/issues/624#issuecomment-630590470 I felt pretty dirty having to copy and paste my changes to all three versions of `set_var` and `unset_var`. This should be