-
Notifications
You must be signed in to change notification settings - Fork 667
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
Run yang validation in db migrator #3102
Merged
Merged
Conversation
This file contains 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
8 tasks
wangxin
pushed a commit
to sonic-net/sonic-mgmt
that referenced
this pull request
Mar 26, 2024
What is the motivation for this PR? We need a flag to mark that DUT is under end to end test. sonic-net/sonic-utilities#3102 db migrator needs to detect DUT is running in end to end test. How did you do it? Create /etc/sonic/mgmt_test_mark with fixture. How did you verify/test it? Run end to end test, and check /etc/sonic/mgmt_test_mark.
wen587
reviewed
Aug 7, 2024
except sonic_yang.SonicYangException as e: | ||
log.log_error("Yang validation failed: " + str(e)) | ||
raise | ||
if len(yang_parser.tablesWithOutYang): |
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.
We could make it 100% in our StarLab DUT.
However, I suspect if we could cover it 100% in PROD devices. It will break the PROD workflow if not fully coverred in PROD.
I prefer we make the check as log_warning and not raise exception right now.
wen587
approved these changes
Oct 11, 2024
8 tasks
wangxin
pushed a commit
to sonic-net/sonic-mgmt
that referenced
this pull request
Dec 9, 2024
…n added to yang model (#15947) What is the motivation for this PR? In sonic-net/sonic-utilities#3102, the feature comparing yang model with configDB was added to sonic-utilities submodule, but feature subnet decap haven't been added to yang model, so the PR test advancing sonic-utilities to buildimage would fail in subnet decap test. How did you do it? Created issue sonic-net/sonic-buildimage#21090 and temporary skip subnet decap test until issue resolved How did you verify/test it?
8 tasks
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.
What I did
Add unit test/runtime alert for db_migrator.py/load_minigraph: ConfigDB passing yang validation
How I did it
Use subprocess to run yang validation, and then warm-reboot performance will not change.
Check /etc/sonic/mgmt_test_mark, this mark_file means this device is under end to end test.
How to verify it
Run unit test and run end to end test
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)