agroal / pgagroal

High-performance connection pool for PostgreSQL
https://agroal.github.io/pgagroal/
BSD 3-Clause "New" or "Revised" License
667 stars 59 forks source link

Deprecated `pgagroal-cli` commands `config-get` and `config-set` do not work as expected #410

Closed decarv closed 4 months ago

decarv commented 4 months ago

Describe the bug

Deprecated pgagroal-cli commands should still execute the corresponding new commands, but this is not true for config-get and config-set.

To Reproduce

Run in the terminal the commands and get the error message unknown command config-get.

$ ./pgagroal-cli -v config-get port
pgagroal-cli: command <config-get> has been deprecated by <conf get> since version 1.6
2024-03-07 22:38:59 TRACE cli.c:459 Command: <conf get> [(null)]
pgagroal-cli: unknown command config-get
$ ./pgagroal-cli -v config-set port 2346
pgagroal-cli: command <config-set> has been deprecated by <conf set> since version 1.6
2024-03-07 22:41:56 TRACE cli.c:466 Command: <conf set> [(null)] = [(null)]
pgagroal-cli: unknown command config-set

Version

pgagroal-cli 1.7.0

Diagnosis

Neither config_key or config_value are ever passed to parse_deprecated_command, thus being impossible to parse these values. This function needs to be modified.

jesperpedersen commented 4 months ago

@decarv Can you work on this ?

decarv commented 4 months ago

Sure! I plan to open a PR soon that should close #403 and this issue. But this issue should be a quick fix and thus quicker to review. I will work on it.

jesperpedersen commented 4 months ago

See if it worth to split the patch into the separate issue.

Otherwise, just reference both issues in the commit message

decarv commented 4 months ago

@jesperpedersen Splitting the patch was impractical.

I just referenced both issues.

jesperpedersen commented 4 months ago

That is quite ok

fluca1978 commented 4 months ago

Close via 11a1f47