fix: etcd sync data checker should work#11457
Merged
Merged
Conversation
Signed-off-by: ashing <[email protected]>
Signed-off-by: ashing <[email protected]>
Contributor
|
I am confused about one thing, in this line: apisix/apisix/core/config_etcd.lua Line 532 in 507df12
Then why do you say this:
|
Contributor
Author
@shreemaan-abhishek What I mean is that the execution of the ref: apisix/apisix/core/config_etcd.lua Lines 540 to 541 in 507df12 |
Member
|
@ronething I rerun test cases and passed. |
moonming
approved these changes
Aug 2, 2024
nic-6443
approved these changes
Aug 2, 2024
Contributor
Author
|
@moonming can you merge it, thanks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: ashing [email protected]
Description
Fixes #11216
fix part 2 of this issue
Background
the
load_full_datafunction in the fileconfig_etcd.lua(load all exist data from etcd when apisix start),checkerdoes not depend onitem_schemato have a valueapisix/apisix/core/config_etcd.lua
Lines 540 to 546 in 507df12
But in the
sync_datafunction (watch new events from etcd when apisix running),checkerrelies onitem_schemashould have value.apisix/apisix/core/config_etcd.lua
Line 668 in 507df12
As a result, the plugin metadata resource cannot reach the checker logic when etcd watch.
apisix/apisix/plugin.lua
Lines 816 to 821 in 507df12
So we need to fix it.
about the test case:
The admin api is not used for the operation, because the admin api will directly fail to verify the schema and cannot go to the etcd checker logic.
error-log-logger-clickhouse.t: The request header sent to clickhouse should be decrypted to be correct.
There was a problem with the previous modification of this PR
https://github.com/apache/apisix/pull/11076/files#diff-2974594095136be865db5d415f3da92d2a435211e30f93f693f1ed46a4a90037
PS: This PR is a partial fork of #11430.
about failed CI
My PR changes have nothing to do with this CI error. The reason for the error is a problem with the image version used by the github runner.
ref: https://github.com/apache/apisix/actions/runs/10193727573/job/28202213850?pr=11457
ref: https://github.com/apache/apisix/actions/runs/10193727573/job/28202215238?pr=11457
Checklist