Skip to content

Certz4-modified timeout value in trust_bundle.go #5452

Open
priyacj wants to merge 162 commits into
openconfig:mainfrom
priyacj:certz4
Open

Certz4-modified timeout value in trust_bundle.go #5452
priyacj wants to merge 162 commits into
openconfig:mainfrom
priyacj:certz4

Conversation

@priyacj
Copy link
Copy Markdown
Contributor

@priyacj priyacj commented May 13, 2026

modified timeout value in trust_bundle.go to wait for the mk_cas.sh to complete.

@priyacj priyacj requested a review from a team as a code owner May 13, 2026 01:49
@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 updates the testing infrastructure for gNSI Certz to improve reliability during large-scale certificate operations. By significantly increasing the timeout for test data generation and introducing a dedicated wait period for certificate propagation, the changes ensure that tests do not fail prematurely when handling high volumes of certificates. Additionally, logging has been modernized to provide real-time status updates.

Highlights

  • Timeout Adjustment: Increased the timeout duration for trust bundle operations from 2 minutes to 180 minutes to accommodate longer execution times for certificate generation scripts.
  • Scale Testing Support: Added a conditional 180-second sleep period in the Certz rotation logic to allow sufficient time for large-scale certificate propagation.
  • Logging Improvements: Replaced static log time variables with dynamic timestamps using time.Now().String() throughout the test suite to improve log accuracy and debugging.
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
Copy link
Copy Markdown

OpenConfigBot commented May 13, 2026

Pull Request Functional Test Report for #5452 / d561294

Virtual Devices

Device Test Test Documentation Job Raw Log
Arista cEOS status
Certz-4: Trust Bundle
Cisco 8000E status
Certz-4: Trust Bundle
Cisco XRd status
Certz-4: Trust Bundle
Juniper ncPTX status
Certz-4: Trust Bundle
Nokia SR Linux status
Certz-4: Trust Bundle
Openconfig Lemming status
Certz-4: Trust Bundle

Hardware Devices

Device Test Test Documentation Raw Log
Arista 7808 status
Certz-4: Trust Bundle
Cisco 8808 status
Certz-4: Trust Bundle
Juniper PTX10008 status
Certz-4: Trust Bundle
Nokia 7250 IXR-10e status
Certz-4: Trust Bundle

Help

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 adds a conditional 180-second delay for large-scale certificate propagation and updates trust bundle tests by increasing the script timeout and switching to dynamic log timestamps. Review feedback identifies that the 180-minute timeout is likely a mistake and should be 180 seconds to avoid CI hangs. Further improvements are requested regarding encoding errors, inconsistent indentation, and the removal of redundant manual timestamps and unused variables in test logs.

const (
dirPath = "../../test_data/"
timeOutVar time.Duration = 2 * time.Minute
timeOutVar time.Duration = 180 * time.Minute
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

The timeout timeOutVar is set to 180 minutes (3 hours). This is extremely long for a script that generates certificates (mk_cas.sh). Given that the corresponding sleep in setup_service.go is 180 seconds, it is highly likely that 180 seconds (or a few minutes) was intended here. A 3-hour timeout can cause CI jobs to hang for a very long time if the script fails or deadlocks.

Suggested change
timeOutVar time.Duration = 180 * time.Minute
timeOutVar time.Duration = 180 * time.Second

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.

The value is intentional because the script invokes mk_cas.sh to create 20k certs. This generation of certs takes significant amount of time, close to 3 hours.

Comment thread feature/gnsi/certz/tests/internal/setup_service/setup_service.go Outdated
Comment thread feature/gnsi/certz/tests/trust_bundle/trustbundle_test.go Outdated
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