update github.com/coredns/corefile-migration v1.0.20

- Minor change: Don't return Unsupported/Deprecated plugins for non-migration cases, i.e. when the start version is the same as the end version.
This commit is contained in:
Paco Xu
2023-02-25 21:36:32 +08:00
parent 7efa62dfdf
commit 744d9bfda3
5 changed files with 16 additions and 4 deletions

View File

@@ -20,12 +20,18 @@ import (
// any deprecated, removed, or ignored plugins/directives present in the Corefile. Notifications are also returned for
// any new default plugins that would be added in a migration.
func Deprecated(fromCoreDNSVersion, toCoreDNSVersion, corefileStr string) ([]Notice, error) {
if fromCoreDNSVersion == toCoreDNSVersion {
return nil, nil
}
return getStatus(fromCoreDNSVersion, toCoreDNSVersion, corefileStr, SevAll)
}
// Unsupported returns a list notifications of plugins/options that are not handled supported by this migration tool,
// but may still be valid in CoreDNS.
func Unsupported(fromCoreDNSVersion, toCoreDNSVersion, corefileStr string) ([]Notice, error) {
if fromCoreDNSVersion == toCoreDNSVersion {
return nil, nil
}
return getStatus(fromCoreDNSVersion, toCoreDNSVersion, corefileStr, SevUnsupported)
}

View File

@@ -30,7 +30,13 @@ type release struct {
// Versions holds a map of plugin/option migrations per CoreDNS release (since 1.1.4)
var Versions = map[string]release{
"1.10.1": {
priorVersion: "1.10.0",
dockerImageSHA: "a0ead06651cf580044aeb0a0feba63591858fb2e43ade8c9dea45a6a89ae7e5e",
plugins: plugins_1_9_3,
},
"1.10.0": {
nextVersion: "1.10.1",
priorVersion: "1.9.4",
dockerImageSHA: "017727efcfeb7d053af68e51436ce8e65edbc6ca573720afb4f79c8594036955",
plugins: plugins_1_9_3,