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

DEFAULT CHANGE: --cmode now defaults to concurrent #3238

Merged
merged 3 commits into from
Dec 12, 2024
Merged
Changes from 1 commit
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
21 changes: 10 additions & 11 deletions commands/ppreviewPush.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,17 @@ type zoneCache struct {
sync.Mutex
}

const cmodewarn = `WARN: In v4.15 --cmode will default to "concurrent".` +
` Please test and report any bugs ASAP.` +
` In v4.16 or later, "legacy" will go away.` +
` See https://docs.dnscontrol.org/commands/preview-push` +
const legacywarn = `WARNING: --cmode=legacy will go away in v4.16 or later.` +
` Please test --cmode=concurrent and report any bugs ASAP.` +
` See https://docs.dnscontrol.org/commands/preview-push#cmode` +
"\n"

const ppreviewwarn = `WARN: ppreview is going away in v4.16 or later.` +
` Use "preview --cmode=concurrent" instead.` +
const ppreviewwarn = `WARNING: ppreview is going away in v4.16 or later.` +
` Use "preview" instead.` +
"\n"

const ppushwarn = `WARN: ppush is going away in v4.16 or later.` +
` Use "push --cmode=concurrent" instead.` +
const ppushwarn = `WARNING: ppush is going away in v4.16 or later.` +
` Use "push" instead.` +
"\n"

var _ = cmd(catMain, func() *cli.Command {
Expand All @@ -49,7 +48,7 @@ var _ = cmd(catMain, func() *cli.Command {
Usage: "read live configuration and identify changes to be made, without applying them",
Action: func(ctx *cli.Context) error {
if args.ConcurMode == "legacy" {
fmt.Fprint(os.Stderr, cmodewarn)
fmt.Fprint(os.Stderr, legacywarn)
return exit(Preview(args))
}
return exit(PPreview(args))
Expand Down Expand Up @@ -113,7 +112,7 @@ func (args *PPreviewArgs) flags() []cli.Flag {
flags = append(flags, &cli.StringFlag{
Name: "cmode",
Destination: &args.ConcurMode,
Value: "legacy",
Value: "concurrent",
Usage: `Which providers to run concurrently: legacy, concurrent, none, all`,
Action: func(c *cli.Context, s string) error {
if !slices.Contains([]string{"legacy", "concurrent", "none", "all"}, s) {
Expand Down Expand Up @@ -166,7 +165,7 @@ var _ = cmd(catMain, func() *cli.Command {
Usage: "identify changes to be made, and perform them",
Action: func(ctx *cli.Context) error {
if args.ConcurMode == "legacy" {
fmt.Fprint(os.Stderr, cmodewarn)
fmt.Fprint(os.Stderr, legacywarn)
return exit(Push(args))
}
return exit(PPush(args))
Expand Down
Loading