-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Open
Description
Bug report criteria
- This bug report is not security related, security issues should be disclosed privately via security@etcd.io.
- This is not a support request or question, support requests or questions should be raised in the etcd discussion forums.
- You have read the etcd bug reporting guidelines.
- Existing open issues along with etcd frequently asked questions have been checked and this is not a duplicate.
What happened?
I got this error from etcd when setting "watch-progress-notify-interval": "1m", in a JSON config. I assume that passing it as a flag from the commandline does work.
[etcdmain/etcd.go:66] failed to verify flags
error unmarshaling JSON: while decoding JSON: json: cannot unmarshal string into Go struct field configYAML.watch-progress-notify-interval of type time.Duration
I suspect this is because time.Duration doesn't have an UnmarshalJSON method, so there's nothing doing the duration parsing. It can be given as an integer, but then it's interpreted as nanoseconds.
Both watch-progress-notify-interval and experimental-watch-progress-notify-interval exhibit this behavior.
What did you expect to happen?
It to work the same as passing --watch-progress-notify-interval=1m.
How can we reproduce it (as minimally and precisely as possible)?
Add "experimental-watch-progress-notify-interval": "1m", to JSON.
Etcd version (please run commands below)
Details
etcd Version: 3.6.1
Git SHA: a4708be
Go Version: go1.23.10
Go OS/Arch: linux/amd64Reactions are currently unavailable