Certz4-modified timeout value in trust_bundle.go #5452
Conversation
Summary of ChangesHello, 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
Using Gemini Code AssistThe 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
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 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
|
Pull Request Functional Test Report for #5452 / d561294Virtual Devices
Hardware Devices
|
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
| timeOutVar time.Duration = 180 * time.Minute | |
| timeOutVar time.Duration = 180 * time.Second |
There was a problem hiding this comment.
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.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
modified timeout value in trust_bundle.go to wait for the mk_cas.sh to complete.