Closed GeigerJ2 closed 1 day ago
Along these lines, I just realized that the options for the database hostname, port, username, and password for verdi presto --use-postgres
are called:
--postgres-hostname
--postgres-port
--postgres-username
--postgres-password
(which makes sense as --use-postgres
is explicitly specified, I guess).
While for verdi profile setup core.psql_dos
they are called:
--database-hostname
--database-port
--database-username
--database-password
Any reason to keep them general in the second case (apart from backwards compatibility?). Are we planning to add another service-based database? Again, might be nice to have the options named consistently, so that people can switch seamlessly between writing a verdi presto
and a verdi profile setup
command (which is how I noticed now).
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 77.77%. Comparing base (
ef60b66
) to head (fa3a47a
). Report is 53 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Checking the status of the AMD runners, will restart actions after.'
EDIT: Seems to be a more substantial issue.. @unkcpz any ideas?
I am onboard with creating consistency, but is --profile-name
not clearer? I would personally vote for that. We can add a short version -p
to counter-act the increased length, which anyway would be a good idea.
I am onboard with creating consistency, but is
--profile-name
not clearer? I would personally vote for that. We can add a short version-p
to counter-act the increased length, which anyway would be a good idea.
Alright, that's fine for me, as long as there's also the short option ^^ I added another commit to revert the changes (rather than soft-resetting and force-pushing; to preserve the history), and reverted the files to their previous versions via git checkout <SHA> -- </path/to/file.py>
in the first commit. Then, the second commit defines the new SETUP_PROFILE_NAME
option. I didn't clone the previous SETUP_PROFILE
, as that is only used in the deprecated verdi setup
command, so can be removed once we remove that command, as well. I considered using this global SETUP_PROFILE_NAME
in the verdi presto
command, as well, rather than having it as a local @click.option
as it is now, but that slightly changes the behavior, so I wouldn't do that. I assume there was a reason you added it as a local @click.option
.
As such, the behavior of both commands stays the same, with verdi profile setup
still being an InteractiveOption
, while verdi presto
still being a normal @click.option
. The former now also uses --profile-name
, and both allow -p
as a shortcut.
Pinging @mbercx as the extra picky devil's advocate on CLI-related topics <3
I am onboard with creating consistency, but is --profile-name not clearer? I would personally vote for that. We can add a short version -p to counter-act the increased length, which anyway would be a good idea.
Though, now that I'm changing the command in a bunch of places, I'm also thinking... this is backwards-incompatible with the previous version of verdi profile setup
that uses --profile
. It's a recent feature that was just introduced in v2.5, so it might be acceptable, but still something to consider? That being said, I'm also very much in favor of using --profile-name
rather than --profile
, because --profile
is also used when running verdi
commands for a different profile than the default one via verdi --profile
. So good to have it distinctly different from that.
Though, now that I'm changing the command in a bunch of places, I'm also thinking... this is backwards-incompatible with the previous version of verdi profile setup that uses --profile. It's a recent feature that was just introduced in v2.5, so it might be acceptable, but still something to consider?
I think that is acceptable for now. Better to bite the bullet now while it hasn't really been adopted yet then having to struggle with it later on.
I think that is acceptable for now. Better to bite the bullet now while it hasn't really been adopted yet then having to struggle with it later on.
I'm fine with that. @mbercx also mentioned we could deprecate --profile
and hide it from being shown from --help
(if that's possible), but not sure if it's even necessary (we can discuss quickly later). Apart from that, this should be ready for merge now.
Thanks @GeigerJ2
Currently,
verdi presto
uses the--profile-name
option, whileverdi profile setup
uses--profile
. I'd vouch for consistency.