Fix DBConfig not initialize issue in pfcwd#2238
Fix DBConfig not initialize issue in pfcwd#2238qiluo-msft merged 14 commits intosonic-net:masterfrom
Conversation
pfcwd/main.py
Outdated
| def initialize_db_config(): | ||
| # Initialize db config here for UT coverage | ||
| load_db_config() | ||
| return |
There was a problem hiding this comment.
Our code coverage requirement is 80%, so need return here to pass coverage check.
There was a problem hiding this comment.
Prefer keep code cleaner, and fix the test infra.
There was a problem hiding this comment.
I am okay to override coverage check force merge and suppress coverage checker in of this PR as long as there is an issue tracking the coverage issue.
There was a problem hiding this comment.
Will improve code and try fix test infra later.
There was a problem hiding this comment.
This seems a known issue in click: pallets/click#267
Will try use subprocess.check_output to cover code in cli().
There was a problem hiding this comment.
I try different solution but all failed, so change code coverage threshold to 50%.
There was a problem hiding this comment.
Revert the code coverage threshold change for force merge.
|
@qiluo-msft , @SuvarnaMeenakshi - does this one need to be in 202205 branch? |
Not required in 202205 because the change that caused this issue #2183 is not there in 202205 branch |
Just clarify, we ran into this issue with 202205 image. We filed sonic-net/sonic-buildimage#12062 to track. |
|
This PR need cherry pick to 202205 branch to fix sonic-net/sonic-buildimage#12062 |
|
@gechiang check if this can cherry picked into 20205 branch |
#### What I did Fix pfcwd connect DB with exception issue: sonic-net/sonic-buildimage#11269 pfcwd implicit depends on InterfaceAliasConverter() to initialize DB config, however following PR change InterfaceAliasConverter() behavior to lazy initialize, then pfcwd failed when try connect to DB without initialize DB config: sonic-net#2183 #### How I did it Load DB config in pfcwd. #### How to verify it Pass all UT.
#### What I did Fix pfcwd connect DB with exception issue: sonic-net/sonic-buildimage#11269 pfcwd implicit depends on InterfaceAliasConverter() to initialize DB config, however following PR change InterfaceAliasConverter() behavior to lazy initialize, then pfcwd failed when try connect to DB without initialize DB config: #2183 #### How I did it Load DB config in pfcwd. #### How to verify it Pass all UT. Co-authored-by: Hua Liu <58683130+liuh-80@users.noreply.github.com>
|
I removed the label request for 20205 branch because I manually created a PR to pick up this same change in 202205 here: |

What I did
Fix pfcwd connect DB with exception issue: sonic-net/sonic-buildimage#11269
pfcwd implicit depends on InterfaceAliasConverter() to initialize DB config, however following PR change InterfaceAliasConverter() behavior to lazy initialize, then pfcwd failed when try connect to DB without initialize DB config:
#2183
How I did it
Load DB config in pfcwd.
How to verify it
Pass all UT.
Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)