You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running make gen or go generate coredns.go with a third-party external CoreDNS plugin enabled, the zplugin.go will cause the TestImportOrdering unit test to fail. This is because the logic in directives_generate.go does not separate third-party external plugins from CoreDNS plugins in the go import block. This leads to the TestImportOrdering unit test failing, as it requires that third-party imports paths should be in a separate import block.
What you expected to happen:
go generate coredns.go should generate zplugin.go according to the standards enforced in TestImportOrdering.
How to reproduce it (as minimally and precisely as possible):
Add an external plugin to CoreDNS by adding it to plugin.cfg, e.g. add ocp_dnsnameresolver:github.com/openshift/coredns-ocp-dnsnameresolver anywhere in plugin.cfg.
Run TestImportOrdering unit test:
=== RUN TestImportOrdering
presubmit_test.go:195: import path for "github.com/openshift/coredns-ocp-dnsnameresolver" is not of the same type
"coredns" in "/home/gspence/src/github.com/coredns/coredns/core/plugin/zplugin.go"
--- FAIL: TestImportOrdering (0.13s)
Anything else we need to know?:
While this issue does not affect the main CoreDNS repo, it can cause unit test failures in forks of CoreDNS that include external third-party plugins. So I understand it's a low priority.
Environment:
the version of CoreDNS: 1.11.3
Corefile: N/A
logs, if applicable: N/A
OS (e.g: cat /etc/os-release): N/A
Others: N/A
The text was updated successfully, but these errors were encountered:
What happened:
When running
make gen
orgo generate coredns.go
with a third-party external CoreDNS plugin enabled, thezplugin.go
will cause theTestImportOrdering
unit test to fail. This is because the logic indirectives_generate.go
does not separate third-party external plugins from CoreDNS plugins in the go import block. This leads to theTestImportOrdering
unit test failing, as it requires that third-party imports paths should be in a separate import block.What you expected to happen:
go generate coredns.go
should generatezplugin.go
according to the standards enforced inTestImportOrdering
.How to reproduce it (as minimally and precisely as possible):
plugin.cfg
, e.g. addocp_dnsnameresolver:github.com/openshift/coredns-ocp-dnsnameresolver
anywhere inplugin.cfg
.TestImportOrdering
unit test:Anything else we need to know?:
While this issue does not affect the main CoreDNS repo, it can cause unit test failures in forks of CoreDNS that include external third-party plugins. So I understand it's a low priority.
Environment:
cat /etc/os-release
): N/AThe text was updated successfully, but these errors were encountered: