Support modern Grafana binary name and new default homebrew location#142
Support modern Grafana binary name and new default homebrew location#142trondn wants to merge 1 commit into
Conversation
Modern Grafana (v9+) renamed grafana-server to grafana with server as a subcommand. Also update the default darwin grafana-home path to detect /opt/homebrew where it is installed by defult these days, falling back to /usr/local
There was a problem hiding this comment.
Pull request overview
Updates Promtimer to support modern Grafana (v9+) which renamed the grafana-server binary to grafana with a server subcommand, and updates the macOS default grafana-home to detect Homebrew's new /opt/homebrew location with fallback to /usr/local.
Changes:
start_grafana()now appendsserversubcommand unless the binary is the legacygrafana-server.--grafana-install-pathprefersbin/grafanawith fallback to legacybin/grafana-server; default PATH binary is nowgrafana.- macOS default Grafana home prefers
/opt/homebrew/share/grafanawhen present, falling back to/usr/local/share/grafana; help text updated.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dave-finlay
left a comment
There was a problem hiding this comment.
Thanks for the contribution. Just a couple of minor comments.
| @@ -198,9 +198,13 @@ | |||
| :return: a Process instance wrapping the underlying process handle | |||
| """ | |||
| name = 'grafana-server' | |||
There was a problem hiding this comment.
Can you change this "name" variable too to be "grafana server". It's just used for logging as as the name for the started Process so we could leave it be. But if we're making this change to move to start a "grafana server" (as it were) rather than a "grafana-server", then I think it makes sense to change this name too.
|
|
||
| def start_grafana(grafana_bin, grafana_home_path, grafana_port): | ||
| """ | ||
| Starts grafana-server wthe the specified home path listening to the specfied |
There was a problem hiding this comment.
Can you also change this comment too?
Modern Grafana (v9+) renamed grafana-server to grafana with server as a subcommand. Also update the default darwin grafana-home path to detect /opt/homebrew where it is installed by defult these days, falling back to /usr/local