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

feat(api) add plugin priority to metadata #8821

Merged
merged 1 commit into from
May 19, 2022
Merged

feat(api) add plugin priority to metadata #8821

merged 1 commit into from
May 19, 2022

Conversation

Tieske
Copy link
Member

@Tieske Tieske commented May 19, 2022

besides exposing the version, the priority of a plugin is also a property that quite often is unclear to users, so dynamically getting it from the system will help answering those questions.

I didn't include it in the original PR (#8810 ), because of the upcoming dynamic priorities. But after a chat with @jschmid1 it turns out that the hard-coded priorities will remain the default, so still makes sense to expose those as well.

Also; removed the true placeholder, which doesn't make sense anymore now that the metadata is an object

@Tieske Tieske requested a review from a team as a code owner May 19, 2022 12:54
@Tieske Tieske added this to the 3.0 milestone May 19, 2022
@Tieske
Copy link
Member Author

Tieske commented May 19, 2022

CI failures seem unrelated???

@bungle bungle merged commit 40f2d00 into master May 19, 2022
@bungle bungle deleted the plugin-meta branch May 19, 2022 21:02
@StarlightIbuki
Copy link
Contributor

StarlightIbuki commented May 20, 2022

I got tests failed earlier today and tried to revert this commit, and it works. This PR seems to be the reason for CI failures?

StarlightIbuki added a commit that referenced this pull request May 20, 2022
@StarlightIbuki
Copy link
Contributor

StarlightIbuki commented May 20, 2022

I tried to dump the metadata and found this:

2022/05/20 17:22:10 [error] 14757#0: *5 [lua] kong.lua:96: fn(): {
  ["priority"] = -inf
}, client: 127.0.0.1, server: kong_admin, request: "GET / HTTP/1.1", host: "127.0.0.1:9001"

...

2022/05/20 17:22:09 [error] 14757#0: *4 [lua] api_helpers.lua:511: handle_error(): ...al/kong-dep/luarocks/share/lua/5.1/lapis/application.lua:424: ...kong-dep/luarocks/share/lua/5.1/kong/api/api_helpers.lua:285: body encoding failed while flushing response: Cannot serialise number: must not be NaN or Infinity

It seems that lapis does not support -inf and inf in the meta data.

@Tieske
Copy link
Member Author

Tieske commented May 20, 2022

@suika-kong my bad. Failures seemed non-related, but unfortunately were. Fix is here: #8833

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants