-
Notifications
You must be signed in to change notification settings - Fork 1.8k
sonic-buildimage: ignore missing hwsku dict intfs #20618
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
Merged
kperumalbfn
merged 2 commits into
sonic-net:master
from
ccroy-arista:continue-on-missing-hwsku-dict-interface
Feb 12, 2025
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
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.
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.
hi Chris, do you mind to help fix the platform.json instead of hack it here? If the interface doesn't exist, it is reasonable to throw, because things doesn't look right.
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.
Hi @r12f, this change is related to the platform.json complications with unused interfaces, from this discussion here: #20107 (comment)
The platform.json file is common to all hwskus under the same platform folder, so updating platform.json to work with C256S2 would for example break other hwskus such as O128S2.
Atlernatively, if we add the unused interfaces back to the hwsku then we would not need to touch platform.json, but then the unused interfaces would show up in the output of
show interface status.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.
I see. how about reverse the logic? In my understanding, platform.json is more complete and more recent design than port_config.ini, so if a port exists in the hwsku, it should exist in the platform.json as long as the platform.json file exists.
what do you think?
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.
@r12f that sounds like a reasonable alternative, I will test the change and post the update once verified.
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.
hi Chris, how things go with the reversed check? : D
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.
Hi Riff, interestingly, reversing the logic causes at least one unit test to fail, meaning there is likely a fix to be had in the unit tests as well. I'll take a closer look to see what can be done there.
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.
@r12f @ccroy-arista can we introduce dummy entry in hwsku json file :-