Skip to content

gNMI-1.6 fix#4786

Closed
manan-patel wants to merge 5 commits intoopenconfig:mainfrom
manan-patel:gNMI-1.6_fix
Closed

gNMI-1.6 fix#4786
manan-patel wants to merge 5 commits intoopenconfig:mainfrom
manan-patel:gNMI-1.6_fix

Conversation

@manan-patel
Copy link
Copy Markdown
Contributor

No description provided.

@manan-patel manan-patel requested a review from a team as a code owner November 7, 2025 17:30
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @manan-patel, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request implements a fix for gNMI 1.6, specifically targeting compatibility and testing stability with Cisco devices within the gNMI network instance tests. The changes involve adjusting the test logic to bypass gNMI server configuration for Cisco platforms and removing a previously defined interface deviation, which collectively aim to resolve issues encountered on these devices.

Highlights

  • gNMI Server Configuration: The gNMI server configuration step in gnmi_ni_test.go is now conditionally skipped for Cisco devices to prevent potential issues.
  • Cisco Platform Deviations: A specific platform exception for Cisco, related to interface_enabled deviations, has been removed from the metadata.textproto file.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request aims to fix an issue with gNMI on Cisco devices by conditionally skipping the creation of a gNMI server on the default network instance. While the intent is clear, the implementation introduces a hardcoded vendor check. My review focuses on refactoring this logic to use the existing deviations framework in the project, which will improve maintainability and adherence to the established architecture.

Comment on lines +69 to +71
if dut.Vendor() != ondatra.CISCO {
cfgplugins.CreateGNMIServer(batch, t, dut, &dutPort1NetworkInstanceIParams)
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

This hardcoded vendor check for ondatra.CISCO should be implemented as a deviation to align with the project's established pattern for handling vendor-specific behavior. Using the deviations framework improves maintainability and makes it easier to manage exceptions for different platforms.

Please consider adding a new deviation, for example skip_gnmi_server_on_default_ni, and a corresponding function SkipGNMIServerOnDefaultNI(dut *ondatra.DUTDevice) bool in the internal/deviations package.

The code here would then become:

if !deviations.SkipGNMIServerOnDefaultNI(dut) {
    cfgplugins.CreateGNMIServer(batch, t, dut, &dutPort1NetworkInstanceIParams)
}

This would also require adding the deviation to the metadata.textproto for the CISCO platform.

@coveralls
Copy link
Copy Markdown

coveralls commented Nov 7, 2025

Pull Request Test Coverage Report for Build 19554444493

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 24 (0.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.007%) to 10.093%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/deviations/deviations.go 0 5 0.0%
proto/metadata_go_proto/metadata.pb.go 0 8 0.0%
internal/cfgplugins/system.go 0 11 0.0%
Totals Coverage Status
Change from base Build 19545469397: -0.007%
Covered Lines: 2224
Relevant Lines: 22034

💛 - Coveralls

}
deviations: {
interface_enabled: true
skip_grpc_validation_in_default_vrf: true
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Skip grpc validation in default? Seems more like we are tring to skip the configuration.

CreateGNMIServer uses batchUpdate which in OC, this should not change between old and new grpc sever syntax.

@danielbarney
Copy link
Copy Markdown
Contributor

This deviation is skipping configuring grpc server in default vrf; this should not be the case.

This should not be the case, if the grpc server is already present (under assumption bootstrap config has it pre-preconfigured) and we are are latter configuring it back, the OC config should not impact the server.

Can we include in this PR changing the base config ?

Also, Are other FNT broken when the base config is changed?

@danielbarney
Copy link
Copy Markdown
Contributor

/fptest cisco-8000e

Copy link
Copy Markdown
Contributor

@danielbarney danielbarney left a comment

Choose a reason for hiding this comment

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

Add base config changes in which grpc server is configured in default and latter with batchUpdate we add one for "customVrf"

google3/ops/netops/lab/kne/guitar/functional_tests/topologies/cisco_8000e_config.cfg

Copy link
Copy Markdown
Contributor

@danielbarney danielbarney left a comment

Choose a reason for hiding this comment

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

I will close this pull request and submit a new one with modifications based on bootstrap config test

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants