Conversation
`glog` was deprecated in v24 and scheduled for removal in v25. Keeping both logging backends leaves legacy flags, startup shims such as `TrickGlog`, glog log-file purging, and the `log.V` and `log.Flush` compatibility APIs in the codebase. This removes the `glog` dependency and its compatibility paths, leaving `slog` as the only logging backend. Former V-level messages use `log.Debug`, and gRPC and Azure verbosity checks use `log.Enabled`. The `--log-structured`, `--log-rotate-max-size`, `--logtostderr`, `--alsologtostderr`, `--stderrthreshold`, `--log_dir`, `--log_link`, `--log_backtrace_at`, `--v`, `--vmodule`, `--logbuflevel`, `--keep-logs`, `--keep-logs-by-mtime`, and `--purge-logs-interval` flags are removed from binaries, examples, and flag snapshots, and the v25 release notes document the breaking change. Signed-off-by: Mohamed Hamza <mhamza@fastmail.com>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
|
Thanks for the review. Updated |
Signed-off-by: Mohamed Hamza <mhamza@fastmail.com>
# Conflicts: # go/vt/vttablet/tabletmanager/vreplication/vplayer_flaky_test.go
mattlord
left a comment
There was a problem hiding this comment.
Blocking: I think we should fix the reference-MySQL setup before adopting the tester pin in .github/workflows/vitess_tester_vtgate.yml:108. At c19060c, setupExternalMySQL calls utils.NewMySQL on every keyspace iteration and returns the last server’s connection, so the databases no longer share one reference server. The current tester job confirms this: four queries in two_sharded_keyspaces/queries.test fail with Unknown database '\''customer'\'' on MySQL. The previous pin created both databases on one server. Fixing that setup in vitessio/vt, adding multi-keyspace coverage, and updating the pin should address the remaining failure.
Non-blocking: I also agree with Arthur’s misleading underscore-normalization hint concern; handling unknown flags consistently in a follow-up seems reasonable.
The pinned Vitess tester starts vtctld with `--log_dir`. vitessio/vt#100 upgrades its Vitess dependency and starts one reference MySQL server for all keyspaces. This installs the tester from the merge commit of that pull request. Signed-off-by: Mohamed Hamza <mhamza@fastmail.com>
|
Thanks, good catch. vitessio/vt#100 now starts one reference server for all keyspaces and adds a two-keyspace test. It has merged, and the tester pin here points at the merge commit (e13ac21). |
v24 did not show a deprecation warning for `--log-structured`, `--log-rotate-max-size`, `--keep-logs`, `--keep-logs-by-mtime`, and `--purge-logs-interval`, or for `--logtostderr` and `--alsologtostderr` on `vtctldclient` and `vtctlclient`. Removing them in v25 stops a binary from starting with startup arguments that showed no warning. This keeps these flags as hidden no-ops that show a deprecation warning until v26. `Init` fails on `--log-structured=false`, because that value asks for `glog` log files. Signed-off-by: Mohamed Hamza <mhamza@fastmail.com>
v24 did not show a deprecation warning for the `/debug/flushlogs` HTTP endpoint. Removing it in v25 makes scripts that call it fail with a 404. This keeps the endpoint until v26. It responds with `flushed` and logs a deprecation warning. Signed-off-by: Mohamed Hamza <mhamza@fastmail.com>
No binary writes the glog `vtcombo.INFO` file. `TestCanGetKeyspaces` prints only the MySQL error log on failure. Signed-off-by: Mohamed Hamza <mhamza@fastmail.com>
The release notes cover the command-line and HTTP interfaces. Vitess makes no compatibility promise for its Go packages. Signed-off-by: Mohamed Hamza <mhamza@fastmail.com>
`vtctldclient` adds the standard library `flag.CommandLine` to its flags, and `_flag.Lookup` reads it. `glog` was the only package that registered flags there, and no caller of `_flag.Lookup` remains. This removes both. Signed-off-by: Mohamed Hamza <mhamza@fastmail.com>
Steps 5 and 6 both read the `*-stderr.txt` files. One step covers startup and runtime errors. Signed-off-by: Mohamed Hamza <mhamza@fastmail.com>
Signed-off-by: Mohamed Hamza <mhamza@fastmail.com>
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
The broad removal changes startup compatibility and logging behavior across many binaries, tests, examples, and an external workflow pin, warranting final human validation.
Review effort: Balanced
Findings: None
Signed-off-by: Mohamed Hamza <mhamza@fastmail.com> # Conflicts: # go.sum
Description
Removes
gloglogging support, which was deprecated in v24.slogis the only logging backend.This PR removes the following.
github.com/golang/glogdependencyglogflags from binaries, examples, and flag snapshotsTrickGlogstartup shim and the-vshorthand workaround. Invtctldclient,-vis the shorthand for--version, the same as the other binaries.gloglog-file purginglog.V,log.Level,log.Verbose, andlog.Flush. Former V-level messages uselog.Debug.logutil.Flushandlogutil.OnFlush*pflag.FlagSetparameter oflog.Initv24 did not show a deprecation warning for some logging flags and for the
/debug/flushlogsendpoint. This PR keeps them as no-ops that show a deprecation warning until v26.--log-structured,--log-rotate-max-size,--keep-logs,--keep-logs-by-mtime, and--purge-logs-interval--logtostderrand--alsologtostderronvtctldclientandvtctlclient/debug/flushlogsA binary fails to start with
--log-structured=false, because that value asks forgloglog files.The Vitess tester workflow installs the tester from vitessio/vt#100. The earlier tester version starts
vtctldwith--log_dir.The v25 release notes list every removed and deprecated flag.
Related Issue(s)
Closes #21310
Checklist
Deployment Notes
Binaries fail to start when passed a removed logging flag or
--log-structured=false. Remove these flags from startup arguments before upgrading. The v25 release notes list them.AI Disclosure
This PR was written by Claude with user direction.