Skip to content

Validate paths for Get Requests for mixed_db_client.go#653

Merged
zbud-msft merged 2 commits intosonic-net:masterfrom
zbud-msft:fix_get_mixed_db_client
Apr 21, 2026
Merged

Validate paths for Get Requests for mixed_db_client.go#653
zbud-msft merged 2 commits intosonic-net:masterfrom
zbud-msft:fix_get_mixed_db_client

Conversation

@zbud-msft
Copy link
Copy Markdown
Contributor

Why I did it

#639 did not validate paths for mixed db clients, only for db clients.

How I did it

Validate GET paths exist for mixed_db_client

How to verify it

UT/CI

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

Signed-off-by: Zain Budhwani <zainbudhwani@microsoft.com>
Copilot AI review requested due to automatic review settings April 21, 2026 00:36
@mssonicbld
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends gNMI Get path validation to MixedDbClient so native-origin (“sonic-db”) Get requests return NOT_FOUND semantics for non-existent data, aligning behavior with the earlier DbClient path validation changes from #639.

Changes:

  • Added validateTablePathsExist to verify resolved Redis entities exist before serving MixedDbClient.Get.
  • Wired validation into MixedDbClient.Get prior to reading data from Redis.

Comment thread sonic_data_client/mixed_db_client.go
Comment thread sonic_data_client/mixed_db_client.go Outdated
@mssonicbld
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@hdwhdw hdwhdw self-requested a review April 21, 2026 14:45
@zbud-msft zbud-msft merged commit 14aa47e into sonic-net:master Apr 21, 2026
10 of 11 checks passed
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.

4 participants