-
Notifications
You must be signed in to change notification settings - Fork 75
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
Invariant Violation: Unable to find a consumer for #141
Comments
Any update on this? |
I have the same problem running Kongfig v1.5.3 against Kong 0.12.3 - both running in Docker. After succesfull creation of a consumer specific plugin, every attempt to change the Kong configuration with Kongfig fails with the following error:
With
The issue can be recreated as follows to a clean install of Kong : Add the first API using Kongfig:
Output:
Create a consumer
Output:
Create a second API with a rate-limiting policy for consumer
Output:
Now try to add a third API:
Error:
|
Please let me know if anyone has a solution for this. |
As far as I can tell this issue happens only when there are plugins defined for a specific consumer, while having the Example is defining schema as apis:
- name: some-api
ensure: "present"
attributes:
upstream_url: http://some.upstream
uris: /some-uri Running it as is would work all the time, but if you define a consumer manually and attach any plugin to it, this is when the error happens Rerunning the above schema now fails with the error Tracing the code it seems that if the I tried to manually modify the code of @aragorn3012 afixing it in your thrid API schema would be to add the consumers as a non-empty array, this way you force Kongfig to fetch existing consumers. Not sure but I think there should be an option for it such that we force ignoreConsumers to false 🤔 since I think it is a valid use case for the consumers to not be defined in the schema always 🤔 Currently the workaround we're going to go with is add the following consumers array to our schema (since at the moment control consumers through Kongfig isn't our desired use case) consumers:
- username: _____
ensure: removed |
Hello,
I had the same problem reported in issue-118.
I tried the branch fix-118.
Now i get
Invariant Violation: Unable to find a consumer for xxxxxx
I do not have any consumer definition in the config file. Only api, plugin(acl and auth)
Thanks
The text was updated successfully, but these errors were encountered: