Skip to content

Addition of a Shadow Go Static Check which is 75% faster than the existing Check Saving 35mins per run - #5799

Open
RishabhAgarwal-2001 wants to merge 19 commits into
mainfrom
rishabh/exp-speed-up-static-check
Open

Addition of a Shadow Go Static Check which is 75% faster than the existing Check Saving 35mins per run#5799
RishabhAgarwal-2001 wants to merge 19 commits into
mainfrom
rishabh/exp-speed-up-static-check

Conversation

@RishabhAgarwal-2001

@RishabhAgarwal-2001 RishabhAgarwal-2001 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

We are adding a new check that does the exact same thing as the Go check but faster. Currently running it as a shadow with the original check for few weeks before maturing it to replace the existing check.

image

@RishabhAgarwal-2001
RishabhAgarwal-2001 requested review from a team as code owners July 29, 2026 16:06
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 refines the ZRP laser bias current test suite by improving validation logic, correcting logging and error messages, and replacing non-deterministic sleep intervals with robust telemetry-based waiting mechanisms. These changes ensure more reliable test execution and better diagnostic information during failures.

Highlights

  • Logic Correction: Updated the laser bias validation logic to correctly check for values outside the 0-131 range and fixed an incorrect error message.
  • Telemetry Synchronization: Replaced a static sleep timer with a deterministic gnmi.Await call to wait for the laser bias current to reach 0.0, improving test reliability and speed.
  • Logging and Type Fixes: Corrected a logging typo where the minimum value was being logged instead of the average, and fixed an incorrect error message regarding the expected float64 type.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/go.yml
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 the 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 counterproductive. 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.

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

OpenConfigBot commented Jul 29, 2026

Copy link
Copy Markdown

Pull Request Functional Test Report for #5799 / 69c8bfe

No tests identified for validation.

Help

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

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.

Code Review

This pull request fixes several bugs in the laser bias current test, including correcting an impossible range check condition, fixing incorrect log messages, and replacing a static sleep with a gNMI await. The feedback suggests using gnmi.Watch with a predicate instead of gnmi.Await with an exact float value of 0.0 to prevent potential test flakiness and adhere to the style guide.

Comment thread .github/workflows/go.yml Fixed
@RishabhAgarwal-2001 RishabhAgarwal-2001 changed the title [Do Not Review] Rishabh/exp speed up static check Addition of a Shadow Go Static Check which is 75% faster than the existing Check Saving 35mins per run Jul 31, 2026
Comment thread .github/workflows/go-experimental-arm.yml
Comment thread .github/workflows/go-experimental-arm.yml
@RishabhAgarwal-2001
RishabhAgarwal-2001 requested review from kapilrajput-g and navaneethyv and removed request for a team August 3, 2026 09:34
run: go install honnef.co/go/tools/cmd/staticcheck@latest
- name: Cache staticcheck
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:

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.

GitHub Actions shares a cache storage limit (typically 10GB) across the entire repository. If this experimental workflow uploads a new, heavy staticcheck cache archive on every single commit, it will rapidly fill up that 10GB quota. GitHub will respond by aggressively evicting older caches. This means your experimental workflow could actively delete the caches used by your required workflows (like go.yml), slowing down CI for the whole team.

Possible Fix: Change the key to use something stable, like a hash of your go.mod file, so it only uploads a new cache when dependencies change.

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.

To Monitor during experimental phase: Since you removed GOGC=30, watch the GitHub Actions logs for OOM (Out of Memory) kills. If the runner crashes silently or the static analysis steps fail randomly, memory spikes are the likely culprit.

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