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

Generate zplugin.go correctly with third-party plugins #6692

Merged

Conversation

gcs278
Copy link
Contributor

@gcs278 gcs278 commented May 20, 2024

1. Why is this pull request needed and what does it do?

Previously, the generation of zplugin.go would 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 to be in a separate import block.

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.

2. Which issues (if any) are related?

Fixes #6691

3. Which documentation changes (if any) need to be made?

None

4. Does this introduce a backward incompatible change or deprecation?

No

Previously, the generation of zplugin.go would 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 to be
in a separate import block.

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.

Signed-off-by: Grant Spence <gspence@redhat.com>
@gcs278 gcs278 force-pushed the zplugin-third-party-plugin-generation branch from d291494 to 0c8e1fa Compare May 20, 2024 19:09
Copy link

codecov bot commented May 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.19%. Comparing base (93c57b6) to head (0c8e1fa).
Report is 1196 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6692      +/-   ##
==========================================
+ Coverage   55.70%   59.19%   +3.49%     
==========================================
  Files         224      252      +28     
  Lines       10016    13471    +3455     
==========================================
+ Hits         5579     7974    +2395     
- Misses       3978     4905     +927     
- Partials      459      592     +133     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gcs278
Copy link
Contributor Author

gcs278 commented May 29, 2024

@chrisohaver or whoever appropriate, could I get a quick review? Should be low-risk as it doesn't impact this CoreDNS repo, but allows for forks to pass unit tests if they are adding 3rd party plugins.

@chrisohaver chrisohaver merged commit 0ed689e into coredns:master May 29, 2024
13 checks passed
gcs278 added a commit to gcs278/coredns that referenced this pull request May 29, 2024
Generate zplugin.go correctly with third-party plugins (coredns#6692)

Previously, the generation of zplugin.go would 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 to be
in a separate import block.

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.

Signed-off-by: Grant Spence <gspence@redhat.com>
gcs278 added a commit to gcs278/coredns that referenced this pull request Jun 10, 2024
Generate zplugin.go correctly with third-party plugins (coredns#6692)

Previously, the generation of zplugin.go would 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 to be
in a separate import block.

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.

Signed-off-by: Grant Spence <gspence@redhat.com>
openshift-cherrypick-robot pushed a commit to openshift-cherrypick-robot/coredns that referenced this pull request Jun 11, 2024
Generate zplugin.go correctly with third-party plugins (coredns#6692)

Previously, the generation of zplugin.go would 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 to be
in a separate import block.

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.

Signed-off-by: Grant Spence <gspence@redhat.com>
gcs278 added a commit to gcs278/coredns that referenced this pull request Jun 11, 2024
Generate zplugin.go correctly with third-party plugins (coredns#6692)

Previously, the generation of zplugin.go would 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 to be
in a separate import block.

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.

Signed-off-by: Grant Spence <gspence@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

zplugin.go isn't generated correctly with third-party plugins
2 participants