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

Trouble filtering plugins by tags parameter #13207

Closed
1 task done
ansakoy opened this issue Jun 13, 2024 · 5 comments
Closed
1 task done

Trouble filtering plugins by tags parameter #13207

ansakoy opened this issue Jun 13, 2024 · 5 comments
Labels
pending author feedback Waiting for the issue author to get back to a maintainer with findings, more details, etc... stale

Comments

@ansakoy
Copy link

ansakoy commented Jun 13, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Kong version ($ kong version)

3.6.1

Current Behavior

Plugins are not filtered by tags. In response to /plugins?tags=foo query all existing plugins are returned.

Expected Behavior

The API only returns the records having the provided tag in their tags field.

Steps To Reproduce

  1. Create a plugin with a tag:
curl --request POST \
  --url http://localhost:8001/plugins \
  --header 'Content-Type: application/json' \
  --header 'accept: application/json' \
  --data '{"name":"rate-limiting","config":{"hour":500,"minute":500},"tags":["foo"]}'
  1. Create a plugin without a tag:
curl --request POST \
  --url http://localhost:8001/plugins \
  --header 'Content-Type: application/json' \
  --header 'accept: application/json' \
  --data '{"name":"acl","config":{"allow":["hello"]}}'
  1. Send a request to get only the plugin with the foo tag:
curl --request GET \
  --url 'http://localhost:8001/plugins?tags=foo' \
  --header 'accept: application/json'

Anything else?

The instance is running on Debian 12.

@StarlightIbuki
Copy link
Contributor

It does not reproduce in my environment. Could you share the logs when the issue occurs?

@StarlightIbuki StarlightIbuki added the pending author feedback Waiting for the issue author to get back to a maintainer with findings, more details, etc... label Jun 17, 2024
@ansakoy
Copy link
Author

ansakoy commented Jun 19, 2024

It does not reproduce in my environment. Could you share the logs when the issue occurs?

I'm not sure which logs to look at. Right now the only place I know of is /usr/local/kong/logs, which in turn contains the following files:

access.log  admin_access.log  admin_gui_access.log  admin_gui_error.log  error.log  status_error.log

I suppose, I don't need the gui files, nor the access.log. Which leaves me with admin_access.log, error.log, and status_error.log. The latter is empty, error.log only shows some irrelevant entries (much earlier than the time of the request). And tail for admin_access.log looks like everything is fine:

127.0.0.1 - - [20/Jun/2024:00:21:53 +0300] "GET /plugins HTTP/1.0" 200 16842 "-" "curl/7.64.1"

Am I looking at a wrong file?

@StarlightIbuki
Copy link
Contributor

Hmmm maybe we can try to take a look into admin_access.log to see what URL Kong thinks it receives

Copy link
Contributor

github-actions bot commented Jul 5, 2024

This issue is marked as stale because it has been open for 14 days with no activity.

@github-actions github-actions bot added the stale label Jul 5, 2024
Copy link
Contributor

Dear contributor,

We are automatically closing this issue because it has not seen any activity for three weeks.
We're sorry that your issue could not be resolved. If any new information comes up that could
help resolving it, please feel free to reopen it.

Your contribution is greatly appreciated!

Please have a look
our pledge to the community
for more information.

Sincerely,
Your Kong Gateway team

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending author feedback Waiting for the issue author to get back to a maintainer with findings, more details, etc... stale
Projects
None yet
Development

No branches or pull requests

2 participants