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

[WIP] bugfix: check plugin schema when sync data #1875

Closed
wants to merge 18 commits into from

Conversation

wrl96
Copy link
Contributor

@wrl96 wrl96 commented Jul 21, 2020

What this PR does:

Fix #1604

Pre-submission checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible?

-- check plugins schema
local plugins_conf = item.plugins
if plugins_conf then
for name, plugin_conf in pairs(plugins_conf) do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check the plugin conf in this way, it is not a good way.

config_etcd.lua is a basic component, it should not know the plugin.

I think we can export a new option when creating new config_etcd object, then we can add more check logic in filter_func .

Example:

core.config.new("/routes", {
    automatic = true,
    item_schema = core.schema.route,
    filter_func = function ()
        -- your code
    end
    filter = filter,
})

@membphis
Copy link
Member

membphis commented Aug 9, 2020

@wrl96 please rebase your branch and fix the failed test cases.

@moonming
Copy link
Member

@wrl96 ping

@moonming moonming closed this Dec 21, 2020
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.

bug: stand alone mode proxy-rewrite headers has bug
3 participants