1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

diff2 is now the default. Users of diff1 will get a warning (#2366)

Co-authored-by: Tom Limoncelli <tal@whatexit.org>
This commit is contained in:
Tom Limoncelli
2023-05-16 13:50:31 -04:00
committed by GitHub
parent 8161e73e03
commit a597b28785
2 changed files with 3 additions and 2 deletions

View File

@ -66,6 +66,7 @@ func Run(v string) int {
Name: "diff2",
Usage: "Enable replacement diff algorithm",
Destination: &diff2.EnableDiff2,
Value: true,
},
}
sort.Sort(cli.CommandsByName(commands))

View File

@ -123,9 +123,9 @@ func run(args PreviewArgs, push bool, interactive bool, out printer.CLI) error {
printer.SkinnyReport = !args.Full
if diff2.EnableDiff2 {
printer.Println("INFO: Diff2 algorithm in use.")
printer.Println("INFO: Diff2 algorithm in use. Welcome to the future!")
} else {
printer.Println("INFO: Old diff algorithm in use. Please test `dnscontrol --diff2 preview` (or push) as it will be the default in releases after 2023-05-07. See https://github.com/StackExchange/dnscontrol/issues/2262")
printer.Println("WARNING: Diff1 algorithm in use. Please upgrade to diff2 (`dnscontrol --diff2=true preview`) as diff1 will go away after 2023-07-05. See https://github.com/StackExchange/dnscontrol/issues/2262")
}
cfg, err := GetDNSConfig(args.GetDNSConfigArgs)