From 8d69491fff9c7e56d90b12b2d7b6f2d49a0b3267 Mon Sep 17 00:00:00 2001 From: Tom Limoncelli Date: Thu, 12 Dec 2024 12:02:50 -0500 Subject: [PATCH 1/2] DEFAULT CHANGE: --cmode now defaults to concurrent --- commands/ppreviewPush.go | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/commands/ppreviewPush.go b/commands/ppreviewPush.go index 367da6e620..16ad5c4c46 100644 --- a/commands/ppreviewPush.go +++ b/commands/ppreviewPush.go @@ -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 { @@ -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)) @@ -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) { @@ -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)) From 9002a6992c07b8712e39f98c5066f80b61488805 Mon Sep 17 00:00:00 2001 From: Tom Limoncelli Date: Thu, 12 Dec 2024 12:05:36 -0500 Subject: [PATCH 2/2] go mod tidy --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 7639260ce6..8543839f35 100644 --- a/go.mod +++ b/go.mod @@ -59,8 +59,8 @@ require ( require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.16.0 github.com/G-Core/gcore-dns-sdk-go v0.2.9 - github.com/containrrr/shoutrrr v0.8.0 github.com/centralnicgroup-opensource/rtldev-middleware-go-sdk/v5 v5.0.3 + github.com/containrrr/shoutrrr v0.8.0 github.com/fatih/color v1.18.0 github.com/fbiville/markdown-table-formatter v0.3.0 github.com/go-acme/lego/v4 v4.20.4