-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: typos in k8s discovery code #12288
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
base: master
Are you sure you want to change the base?
Conversation
Spelling error. post_List should be post_list
Hi @ChuanFF, need add test for this change. |
@Baoyuantop just a typo, is the test necessary? |
We need to verify this. |
There are two typos in the following code: apisix/apisix/discovery/kubernetes/informer_factory.lua Lines 288 to 303 in 58066ab
Function Behavior:
Issue After Fixing Typos:When the typos are corrected, a new problem emerges:
Therefore, this typos bug seems not to be fixed directly. I'm not sure whether the behavior of |
Hi @ChuanFF, I think we can optimize this by modifying the pre_list and pre_post methods:
|
@Baoyuantop if we want to removes old data that no longer exists, there is a problem that how to records existing data keys, I think we can prepare two tables, Test cases seem difficult to write, dirty data is generated only after the watch ends and before the next list call, i do not know how to verify old data that no longer exists, do you have any suggest? Or can we ignore dirty data? After all, the conditions for dirty data to be generated are harsh, and it seems to have no effect. |
Lua table cannot share data between multiple workers. |
there is a spelling error in k8s discovery module.
post_List
should bepost_list
Description
There is a spelling error in the k8s service discovery module code. As shown below, the judgment condition in the code of
apisix/discovery/kubernetes/informer_factory.lua
should beinformer.post_list
instead ofinformer.post_List
. The current bug causes thepost_list
function to not be executed.Checklist