Skip to content

[generic-config-updater] Cropping current/target config before sorting#1831

Merged
ghooo merged 1 commit intosonic-net:masterfrom
ghooo:dev/mghoneim/yang_mgmt_side_effect_issue
Oct 8, 2021
Merged

[generic-config-updater] Cropping current/target config before sorting#1831
ghooo merged 1 commit intosonic-net:masterfrom
ghooo:dev/mghoneim/yang_mgmt_side_effect_issue

Conversation

@ghooo
Copy link
Contributor

@ghooo ghooo commented Sep 18, 2021

What I did

Fixing issue #1830

How I did it

Problem we consume the function loadData from sonic-yang-mgmt pkg that always crops tables without YANG models from configdb json object. It does it as a side-effect and is not an expected outcome of the function.

The fix here is to crop the current/target tables before doing any sorting, this way gurantee we avoid this bug. I think the better soln is to fix sonic-yang-mgmt pkg. Will look into this more next week.

How to verify it

Run the command in the issue, it will result in the expected outcome

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)

TODO: add unit-tests

@qiluo-msft
Copy link
Contributor

You mentioned "TODO: add unit-tests". Will it happen in this PR?

@ghooo ghooo merged commit 9232c54 into sonic-net:master Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants