Skip to content

Test semantic validation#5086

Open
chitadi wants to merge 3 commits intomainfrom
test-semantic-validation
Open

Test semantic validation#5086
chitadi wants to merge 3 commits intomainfrom
test-semantic-validation

Conversation

@chitadi
Copy link
Contributor

@chitadi chitadi commented Feb 13, 2026

Two test files were modified to ensure that the OC paths which were supposed to be covered by the test, as specified by the ReadME, are actually covered. Essentially a semantic check has been performed.

In optics_power_and_bias_current_test.go, the following paths were semantically validated through the changes:
/component/transceiver/thresholds/threshold/state/laser-bias-current-lower
/component/transceiver/thresholds/threshold/state/laser-bias-current-upper

In telemetry_interface_packet_counter_test.go, the following paths were semantically validated through the changes:
/interfaces/interface/state/cpu
/interfaces/interface/state/management

semantic validation for the following paths is being covered:
/component/transceiver/thresholds/threshold/state/laser-bias-current-lower
/component/transceiver/thresholds/threshold/state/laser-bias-current-upper
TODOs listed stated that checks should be added once bugs were fixed. Have added those semantic checks for vendors for which these paths are valid
@chitadi chitadi requested review from a team as code owners February 13, 2026 09:48
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @chitadi, 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 enhances the robustness and accuracy of network telemetry tests by implementing vendor-specific skips for unsupported OpenConfig paths and expanding validation coverage for optical transceiver metrics. These changes ensure that tests are executed only on compatible devices and that critical optical parameters are properly monitored.

Highlights

  • Interface CPU Telemetry Test: The TestInterfaceCPU function was updated to conditionally skip execution if the DUT vendor is not Cisco, ensuring the test only runs on supported platforms.
  • Interface Management Telemetry Test: The TestInterfaceMgmt function was updated to conditionally skip execution if the DUT vendor is neither Cisco nor Arista, preventing failures on unsupported devices.
  • Optics Laser Bias Current Validation: A new threshold check for laser-bias-current was added to the validateThresholds function, enhancing the coverage of optics power and bias current tests.
Changelog
  • feature/interface/otg_tests/telemetry_interface_packet_counters_test/telemetry_interface_packet_counters_test.go
    • Modified TestInterfaceCPU to introduce a vendor-specific skip for non-Cisco devices when checking the /interfaces/interface/state/cpu telemetry path.
    • Modified TestInterfaceMgmt to introduce a vendor-specific skip for non-Cisco and non-Arista devices when checking the /interfaces/interface/state/management telemetry path.
  • feature/platform/tests/optics_power_and_bias_current_test/optics_power_and_bias_current_test.go
    • Added a checkThreshold call to validate the laser-bias-current within the validateThresholds function.
Activity
  • The pull request author, chitadi, modified two test files to perform semantic validation, ensuring specified OpenConfig paths are covered as per the README.
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.

@OpenConfigBot
Copy link

OpenConfigBot commented Feb 13, 2026

Pull Request Functional Test Report for #5086 / 95241de

Virtual Devices

Device Test Test Documentation Job Raw Log
Arista cEOS status
status
gNMI-1.11: Telemetry: Interface Packet Counters
gNMI-1.13: Optics Telemetry, Instant, threshold, and miscellaneous static info
e847fcb0 Log
Cisco 8000E status
status
gNMI-1.11: Telemetry: Interface Packet Counters
gNMI-1.13: Optics Telemetry, Instant, threshold, and miscellaneous static info
757ad4e2 Log
Cisco XRd status
status
gNMI-1.11: Telemetry: Interface Packet Counters
gNMI-1.13: Optics Telemetry, Instant, threshold, and miscellaneous static info
35912422 Log
Juniper ncPTX status
status
gNMI-1.11: Telemetry: Interface Packet Counters
gNMI-1.13: Optics Telemetry, Instant, threshold, and miscellaneous static info
629b2abf Log
Nokia SR Linux status
status
gNMI-1.11: Telemetry: Interface Packet Counters
gNMI-1.13: Optics Telemetry, Instant, threshold, and miscellaneous static info
e4b6af22 Log
Openconfig Lemming status
status
gNMI-1.11: Telemetry: Interface Packet Counters
gNMI-1.13: Optics Telemetry, Instant, threshold, and miscellaneous static info
163826cd Log

Hardware Devices

Device Test Test Documentation Raw Log
Arista 7808 status
status
gNMI-1.11: Telemetry: Interface Packet Counters
gNMI-1.13: Optics Telemetry, Instant, threshold, and miscellaneous static info
Cisco 8808 status
status
gNMI-1.11: Telemetry: Interface Packet Counters
gNMI-1.13: Optics Telemetry, Instant, threshold, and miscellaneous static info
Juniper PTX10008 status
status
gNMI-1.11: Telemetry: Interface Packet Counters
gNMI-1.13: Optics Telemetry, Instant, threshold, and miscellaneous static info
Nokia 7250 IXR-10e status
status
gNMI-1.11: Telemetry: Interface Packet Counters
gNMI-1.13: Optics Telemetry, Instant, threshold, and miscellaneous static info

Help

Copy link
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 enhances test coverage by enabling previously skipped tests for specific vendors and adding a missing semantic check for laser bias current thresholds. The changes are logical and well-aligned with the goal of improving test validation.

Copy link
Contributor

@AmrNJ AmrNJ left a comment

Choose a reason for hiding this comment

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

LGTM.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 21982290685

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 10.114%

Totals Coverage Status
Change from base Build 21975005626: 0.0%
Covered Lines: 2300
Relevant Lines: 22741

💛 - Coveralls

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.

5 participants