-
Notifications
You must be signed in to change notification settings - Fork 96
CLI: fix defaults; make consistent with admin cli #246
Conversation
We probably should just deprecate these commands, which are duplicates from cherami-cli. I don't see the value of having the same commands in two tools, and they're causing code duplicates like this. Or as @thuningxu has mentioned before, we can fold these two tools into a single binary, and only expose the 'admin' functionalities to admins. Although I personally slightly prefer the current solution. |
cmd/tools/admin/main.go
Outdated
|
||
"github.com/codegangsta/cli" | ||
"github.com/uber/cherami-server/common" | ||
"github.com/uber/cherami-server/tools/admin" | ||
com "github.com/uber/cherami-server/tools/common" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to toolscommon for better readability
cmd/tools/cli/main.go
Outdated
@@ -123,7 +122,7 @@ func main() { | |||
}, | |||
cli.StringSliceFlag{ | |||
Name: "zone_config, zc", | |||
Usage: "Zone configs for multi_zone destinations. Format for each zone should be \"ZoneName,AllowPublish,AllowConsume,ReplicaCount\". For example: \"zone1,true,true,3\"", | |||
Usage: "Zone configs for multi_zone destinations. Format for each zone should be \"Zone,AllowPublish,AllowConsume,ReplicaCount\". Ex: \"sjc1a,true,true,3\"", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't want to use 'sjc1' in the open source repo
cmd/tools/cli/main.go
Outdated
usageCGSkipOlderMessagesInSeconds = `Skip messages older than this duration, in seconds ('0' to skip none)` | ||
usageCGDelaySeconds = `Delay, in seconds, to defer all messages by` | ||
usageCGOwnerEmail = "Owner email" | ||
usageCGZoneConfig = "Zone configs for multi-zone CG. For each zone, specify \"Zone,PreferedActiveZone\"; ex: \"dca1a,false\"" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no 'dca1' or 'sjc1' in the open source repo
cmd/tools/admin/main.go
Outdated
usageCGSkipOlderMessagesInSeconds = `Skip messages older than this duration, in seconds ('0' to skip none)` | ||
usageCGDelaySeconds = `Delay, in seconds, to defer all messages by` | ||
usageCGOwnerEmail = "Owner email" | ||
usageCGZoneConfig = "Zone configs for multi-zone CG. For each zone, specify \"Zone,PreferedActiveZone\"; ex: \"dca1a,false\"" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no dca1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still has dca1 here
tools/common/lib.go
Outdated
// DefaultUnconsumedMessagesRetention is the default value for unconsumed messages retention | ||
DefaultUnconsumedMessagesRetention = 7200 | ||
// DefaultConsumedMessagesRetention is the default value for consumed messages retention | ||
DefaultConsumedMessagesRetention = 3600 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these values are too low IMO. I suggest to change to 1d and 3d
About admin vs cli . I think Kobe is working on something to that effect. So not dealing with it in this diff. |
Yes, I'm working on refactoring the cherami-cli and cherami-admin code. Will send out a PR later. |
* CLI: fix defaults * fix admin cli * fix owner email * cr feedback * fix zone
No description provided.