Skip to content

Conversation

@RishabhAgarwal-2001
Copy link

Details

The ciscoxr-transceiver-ft functional translators test coverage is currently missing from functional tests. Changes in this PR covers 2 out of the 8 OC paths translated by this functional translator.

We only use the functional translator when DUT's version matches the versions mentioned in Functional Translator's metadata.

OC Paths Covered

  • /openconfig/components/component/transceiver/physical-channels/channel/state/input-power/instant
  • /openconfig/components/component/transceiver/physical-channels/channel/state/output-power/instant

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @RishabhAgarwal-2001, 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 of the testing framework by introducing functional test coverage for the ciscoxr-transceiver-ft functional translator. It specifically targets key OpenConfig paths related to transceiver power, ensuring that the system accurately translates and reports these values. The changes include updates to test utilities to dynamically apply functional translator options and modifications to metadata to support the new test cases.

Highlights

  • Expanded Test Coverage: This pull request significantly expands the functional test coverage for the ciscoxr-transceiver-ft functional translator, addressing a previously missing area.
  • Specific OpenConfig Paths Covered: The changes specifically add test coverage for two critical OpenConfig paths: /openconfig/components/component/transceiver/physical-channels/channel/state/input-power/instant and /openconfig/components/component/transceiver/physical-channels/channel/state/output-power/instant.
  • Dynamic Functional Translator Integration: New Go functions (getOptsForFunctionalTranslator and an overloaded gnmiOpts) have been introduced to dynamically apply functional translator options based on the device's software version, enhancing the flexibility and applicability of tests.
  • Metadata Updates: The ciscoxr_transceiver_ft deviation has been added to metadata.textproto and a corresponding field in proto/metadata.proto to properly enable and track the use of this functional translator in tests.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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
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 adds test coverage for the ciscoxr-transceiver-ft functional translator. The changes introduce logic to handle functional translators and apply it to the optics power tests. However, there are a few critical issues that will prevent the code from compiling. The gnmiOpts function is redeclared, and the deviations.CiscoxrTransceiverFt function is called but not defined because the necessary files for the new deviation were not generated or added. I've provided comments with suggestions to fix these issues. There is also a minor style suggestion to improve code readability.

@coveralls
Copy link

coveralls commented Jan 5, 2026

Pull Request Test Coverage Report for Build 20810267679

Details

  • 0 of 26 (0.0%) changed or added relevant lines in 2 files are covered.
  • 4 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.02%) to 9.983%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/deviations/deviations.go 0 3 0.0%
proto/metadata_go_proto/metadata.pb.go 0 23 0.0%
Files with Coverage Reduction New Missed Lines %
proto/metadata_go_proto/metadata.pb.go 4 0.0%
Totals Coverage Status
Change from base Build 20800861614: 0.02%
Covered Lines: 2227
Relevant Lines: 22307

💛 - Coveralls

@kapilrajput-g kapilrajput-g requested a review from rohit-rp January 7, 2026 12:31
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