-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix: validation fails causing etcd events not to be handled correctly #11268
Conversation
## } | ||
## } | ||
## After check, it only appears when watch recovers and returns events in bulk. | ||
cat logs/error.log | grep "}, {" || (echo "failed: Log case 2 unexpected"; exit 1) |
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.
assert failed to check item data
in error log too.
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.
test needs to fail if expectations are not met ||
gives a exit code 0 which is not detected as a failure by the cli testing suite.
EDIT: my bad, didn't notice the exit 1
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.
@shreemaan-abhishek Actually, the error doesn't cause the test suite to exit either, I'm not sure what's happening. But I've checked the log manually and it has no errors.
I.e. even if it exits with exit 1, the CLI test doesn't fail, which is too strange and should be checked and fixed. But not in this PR.
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.
@nic-6443 Good catch! Updated.
t/cli/test_etcd_sync_event_handle.sh
Outdated
cat logs/error.log | grep "}, {" || (echo "failed: Log case 2 unexpected"; exit 1) | ||
|
||
# Clean up | ||
make stop |
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.
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.
@shreemaan-abhishek Fixed, that because I add the first line . ./ci/common.sh
finally.
Description
Fixes #11267
Ensure that all etcd events are handled, rather than jumping out of the execution flow when a checking error is encountered.
Current wrong behavior will cause changes in etcd to no longer take effect on the started data plane.
The issue has existed since at least APISIX 2.0, which was long, 4-5 years ago.
Checklist