-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[eventd] eventd unit test is not stable #21140
Comments
We have also observed this error intermittently recently causing multiple build failures. It works with retyr most of the time but sometime requires multiple retires. @abdosi , @yejianquan , for you viz |
PR fix: #21200, ETA for merge: 12/20 |
Hi @Junchao-Mellanox, is it possible for you take changes in #21200 and see if there is any flakiness in eventd builds on your side? I have ran ~25 image builds and have not seen any flakiness with these changes. |
sure, will try |
@Junchao-Mellanox Any update on testing? |
Why I did it Fixes #21140 In #20024 and sonic-net/sonic-swss-common#906, we made the change that when a control character is read, zmq_message_read will return with rc 0, which will create an empty internal event. As part of eventd design, empty structured events are dropped, which leads to control characters being a no-op which is the expected behavior. In UT, we are still always expecting a control character to be the first message to be read by zmq which is not the case as described in #20024. We are also not ignoring empty events that are read which is being done by eventd. With this change, control characters are properly ignored if it does after the first test event. How I did it Ignore empty structured events and not expect first zmq_message_read to be control character. How to verify it Manual test/pipeline
i ran a few times, looks good |
Why I did it Fixes sonic-net#21140 In sonic-net#20024 and sonic-net/sonic-swss-common#906, we made the change that when a control character is read, zmq_message_read will return with rc 0, which will create an empty internal event. As part of eventd design, empty structured events are dropped, which leads to control characters being a no-op which is the expected behavior. In UT, we are still always expecting a control character to be the first message to be read by zmq which is not the case as described in sonic-net#20024. We are also not ignoring empty events that are read which is being done by eventd. With this change, control characters are properly ignored if it does after the first test event. How I did it Ignore empty structured events and not expect first zmq_message_read to be control character. How to verify it Manual test/pipeline
Why I did it Fixes #21140 In #20024 and sonic-net/sonic-swss-common#906, we made the change that when a control character is read, zmq_message_read will return with rc 0, which will create an empty internal event. As part of eventd design, empty structured events are dropped, which leads to control characters being a no-op which is the expected behavior. In UT, we are still always expecting a control character to be the first message to be read by zmq which is not the case as described in #20024. We are also not ignoring empty events that are read which is being done by eventd. With this change, control characters are properly ignored if it does after the first test event. How I did it Ignore empty structured events and not expect first zmq_message_read to be control character. How to verify it Manual test/pipeline
Why I did it Fixes sonic-net#21140 In sonic-net#20024 and sonic-net/sonic-swss-common#906, we made the change that when a control character is read, zmq_message_read will return with rc 0, which will create an empty internal event. As part of eventd design, empty structured events are dropped, which leads to control characters being a no-op which is the expected behavior. In UT, we are still always expecting a control character to be the first message to be read by zmq which is not the case as described in sonic-net#20024. We are also not ignoring empty events that are read which is being done by eventd. With this change, control characters are properly ignored if it does after the first test event. How I did it Ignore empty structured events and not expect first zmq_message_read to be control character. How to verify it Manual test/pipeline
Why I did it Fixes sonic-net#21140 In sonic-net#20024 and sonic-net/sonic-swss-common#906, we made the change that when a control character is read, zmq_message_read will return with rc 0, which will create an empty internal event. As part of eventd design, empty structured events are dropped, which leads to control characters being a no-op which is the expected behavior. In UT, we are still always expecting a control character to be the first message to be read by zmq which is not the case as described in sonic-net#20024. We are also not ignoring empty events that are read which is being done by eventd. With this change, control characters are properly ignored if it does after the first test event. How I did it Ignore empty structured events and not expect first zmq_message_read to be control character. How to verify it Manual test/pipeline
Why I did it Fixes sonic-net#21140 In sonic-net#20024 and sonic-net/sonic-swss-common#906, we made the change that when a control character is read, zmq_message_read will return with rc 0, which will create an empty internal event. As part of eventd design, empty structured events are dropped, which leads to control characters being a no-op which is the expected behavior. In UT, we are still always expecting a control character to be the first message to be read by zmq which is not the case as described in sonic-net#20024. We are also not ignoring empty events that are read which is being done by eventd. With this change, control characters are properly ignored if it does after the first test event. How I did it Ignore empty structured events and not expect first zmq_message_read to be control character. How to verify it Manual test/pipeline
Why I did it Fixes sonic-net#21140 In sonic-net#20024 and sonic-net/sonic-swss-common#906, we made the change that when a control character is read, zmq_message_read will return with rc 0, which will create an empty internal event. As part of eventd design, empty structured events are dropped, which leads to control characters being a no-op which is the expected behavior. In UT, we are still always expecting a control character to be the first message to be read by zmq which is not the case as described in sonic-net#20024. We are also not ignoring empty events that are read which is being done by eventd. With this change, control characters are properly ignored if it does after the first test event. How I did it Ignore empty structured events and not expect first zmq_message_read to be control character. How to verify it Manual test/pipeline
<!-- Please make sure you've read and understood our contributing guidelines: https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md ** Make sure all your commits include a signature generated with `git commit -s` ** If this is a bug fix, make sure your description includes "fixes #xxxx", or "closes #xxxx" or "resolves #xxxx" Please provide the following information: --> #### Why I did it Fixes sonic-net#21140 In sonic-net#20024 and sonic-net/sonic-swss-common#906, we made the change that when a control character is read, zmq_message_read will return with rc 0, which will create an empty internal event. As part of eventd design, empty structured events are dropped, which leads to control characters being a no-op which is the expected behavior. In UT, we are still always expecting a control character to be the first message to be read by zmq which is not the case as described in sonic-net#20024. We are also not ignoring empty events that are read which is being done by eventd. With this change, control characters are properly ignored if it does after the first test event. ##### Work item tracking - Microsoft ADO **(number only)**:28728116 #### How I did it Ignore empty structured events and not expect first zmq_message_read to be control character. #### How to verify it Manual test/pipeline <!-- If PR needs to be backported, then the PR must be tested against the base branch and the earliest backport release branch and provide tested image version on these two branches. For example, if the PR is requested for master, 202211 and 202012, then the requester needs to provide test results on master and 202012. --> #### Which release branch to backport (provide reason below if selected) <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 - [ ] 202111 - [ ] 202205 - [ ] 202211 - [ ] 202305 #### Tested branch (Please provide the tested image version) <!-- - Please provide tested image version - e.g. - [x] 20201231.100 --> - [ ] <!-- image version 1 --> - [ ] <!-- image version 2 --> #### Description for the changelog <!-- Write a short (one line) summary that describes the changes in this pull request for inclusion in the changelog: --> <!-- Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU. --> #### Link to config_db schema for YANG module changes <!-- Provide a link to config_db schema for the table for which YANG model is defined Link should point to correct section on https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md --> #### A picture of a cute animal (not mandatory but encouraged)
Description
There is statistical failure in eventd unit test:
Steps to reproduce the issue:
Describe the results you received:
eventd.proxy failed
Describe the results you expected:
no faillure
Output of
show version
:Output of
show techsupport
:Additional information you deem important (e.g. issue happens only occasionally):
The text was updated successfully, but these errors were encountered: