Skip to content
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

Use ASICx suffix in DB target path only if the device is multi-asic #184

Merged
merged 4 commits into from
Jan 24, 2024

Conversation

abdosi
Copy link
Contributor

@abdosi abdosi commented Jan 20, 2024

What I did:
For supporting multi-asic as described here: sonic-net/sonic-telemetry#77 we added support to handle ASICx suffix in the target DB path. We should only use that suffix if the device is multi-asic else we can ignore it. This PR handle this case.

ADO: 27085442

Why I did:
Telemetry Client can pass ASICx even for single asic device. To protect from that condition this change has been added.

How I verify:
Manually Verified . Before the fix client was getting error. After change it is getting data as expected.

Signed-off-by: Abhishek Dosi <[email protected]>
Signed-off-by: Abhishek Dosi <[email protected]>
Signed-off-by: Abhishek Dosi <[email protected]>
Copy link

@judyjoseph judyjoseph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, any unit tests needs a fix to cover this change ?

@judyjoseph @zbud-msft will add sonic-mgmt test case for this. It will be hard to cover this via UT.


if len(targetname) > 1 {
// ASIC Suffix is only used in case if device is multi-asic/namespace
if isMultiNamespace && len(targetname) > 1 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Before the fix client was getting error. After change it is getting data as expected." Can we get UT for this case?

@rlhui rlhui merged commit 2c862b8 into sonic-net:master Jan 24, 2024
5 checks passed
@yxieca
Copy link

yxieca commented Feb 16, 2024

@zbud-msft please add ADO number to this PR. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants