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
Ignore ErrKeyNotFound error for the KV provider #10082
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Hello, your PR doesn't target the right branch, can you rebase your PR on the branch v2.10? can you also remove all the unrelated changes? |
Okay, I will remove the second change. However, for the first one, I moved the setupStore function to SetUpSuite and the cleanup action to TearDownSuite, which is executed by the go-checker. This means we don't need to care about setting and cleaning some common things in every testcase. Are you sure I should remove it? |
yes |
2c6624c
to
92ffb74
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
92ffb74
to
aae182a
Compare
What does this PR do?
Fixes #8092
Motivation
When the root key does not exist, listing the kv store will result in an 'ErrKeyNotFound' error. In this case, the kv provider will not send a dynamic.Message to the configurationChan for updating the configuration. So when we delete the root key in the kv store to clear all traefik configurations, traefik will always retain the last configuration.
More
[ ] Added/updated documentationAdditional Notes
While fixing this bug, I encountered another potential bug caused by the kvtools/redis library when using Redis as the kv store. The kv provider utilizes the WatchTree interface to monitor events of key changes in the kv store. However, when we delete the root key in Redis, the WatchTree fails to notify the kv provider about the modification of certain keys. Therefore, even though I have fixed the buildConfiguration function of the kv provider, this bug may still persist when Redis is used as the kv store. About the bug of kvtools/redis , I have created an issue: kvtools/redis#4