Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: ignore the global flag for changefeed update command (#2839) #2876

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions cmd/client_changefeed.go
Original file line number Diff line number Diff line change
Expand Up @@ -561,8 +561,17 @@ func newUpdateChangefeedCommand() *cobra.Command {
info.SyncPointEnabled = syncPointEnabled
case "sync-interval":
info.SyncPointInterval = syncPointInterval
case "pd", "tz", "start-ts", "changefeed-id", "no-confirm":
// do nothing
case "tz", "start-ts", "sort-dir":
log.Warn("this flag cannot be updated and will be ignored", zap.String("flagName", flag.Name))
case "changefeed-id", "no-confirm", "cyclic-filter-replica-ids":
// Do nothing, these are some flags from the changefeed command,
// we don't use it to update, but we do use these flags.
case "interact":
// Do nothing, this is a flags from the cli command
// we don't use it to update.
case "pd", "log-level", "key", "cert", "ca":
// Do nothing, this is a flags from the cli command
// we don't use it to update, but we do use these flags.
default:
// use this default branch to prevent new added parameter is not added
log.Warn("unsupported flag, please report a bug", zap.String("flagName", flag.Name))
Expand Down