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

return an error for multiple use of some plugins #1559

Merged
merged 2 commits into from Mar 1, 2018
Merged

return an error for multiple use of some plugins #1559

merged 2 commits into from Mar 1, 2018

Conversation

miekg
Copy link
Member

@miekg miekg commented Feb 23, 2018

Return plugin.ErrOnce when a plugin that doesn't support it, is called
mutliple times.

WIP: because I need to go through all of the plugins

@chrisohaver
Copy link
Member

Code would be shorter/cleaner with for i := 1; c.Next(); i++ {...

@codecov-io
Copy link

codecov-io commented Feb 23, 2018

Codecov Report

Merging #1559 into master will decrease coverage by 0.03%.
The diff coverage is 95.34%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1559      +/-   ##
==========================================
- Coverage   53.05%   53.02%   -0.04%     
==========================================
  Files         185      185              
  Lines        9309     9466     +157     
==========================================
+ Hits         4939     5019      +80     
- Misses       3990     4068      +78     
+ Partials      380      379       -1
Impacted Files Coverage Δ
plugin/plugin.go 0% <ø> (ø) ⬆️
plugin/pprof/setup.go 92.59% <100%> (ø) ⬆️
plugin/cache/setup.go 47.45% <100%> (+2.24%) ⬆️
plugin/errors/setup.go 69.69% <100%> (+4.17%) ⬆️
plugin/nsid/setup.go 61.53% <100%> (+7.37%) ⬆️
plugin/hosts/setup.go 61.84% <100%> (+2.11%) ⬆️
plugin/forward/setup.go 40.68% <100%> (+1.68%) ⬆️
plugin/kubernetes/setup.go 65.45% <100%> (+0.85%) ⬆️
plugin/dnssec/setup.go 62.92% <71.42%> (+0.27%) ⬆️
core/dnsserver/server.go 14.65% <0%> (-0.54%) ⬇️
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 604c004...15f4206. Read the comment docs.

@miekg miekg changed the title WIP: return (useful?) error for multiple use of some plugins return an error for multiple use of some plugins Feb 24, 2018
@miekg
Copy link
Member Author

miekg commented Feb 24, 2018

This now adds it for:

  • cache
  • dnssec
  • errors
  • forward
  • hosts
  • nsid

and changes it slightly in

  • kubernetes
  • pprof
  • reload
  • root

Return plugin.ErrOnce when a plugin that doesn't support it, is called
mutliple times.

This now adds it for: cache, dnssec, errors, forward, hosts, nsid.
And changes it slightly in kubernetes, pprof, reload, root.
@miekg
Copy link
Member Author

miekg commented Mar 1, 2018

merging as is, holler when stuff breaks.

@miekg miekg merged commit f697b33 into master Mar 1, 2018
@miekg miekg deleted the once branch March 1, 2018 02:16
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.

None yet

3 participants