CNF-22218: Clean CI with multi level logs#199
CNF-22218: Clean CI with multi level logs#199shirmoran wants to merge 1 commit intok8snetworkplumbingwg:mainfrom
Conversation
shirmoran
commented
Mar 18, 2026
- Added date/time info to the logs.
- cleaned log info level - moved most of the logs to the debug level.
- Added relevant information with Ginkgo "By" statements.
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 significantly refines the logging output and test reporting for the CI environment. By adjusting log levels and integrating Ginkgo's 'By' statements, the changes aim to improve the clarity and signal-to-noise ratio of test execution logs. This makes it easier to understand the flow of tests and quickly pinpoint issues without being overwhelmed by excessive informational messages. 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 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 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request focuses on enhancing the clarity and reducing the verbosity of log messages within the PTP operator's conformance tests. It shifts most logrus.Infof calls to logrus.Debugf, and adds Ginkgo "By" statements to provide more context during test execution. I have reviewed the changes and provided feedback to address high and medium severity issues.
| } | ||
|
|
||
| logrus.Infof("PTP Test Config: %+v", ptpTestConfig) | ||
| logrus.Debugf("PTP Test Config: %+v", ptpTestConfig) |
| } | ||
|
|
||
| logrus.Infof("Configuring best solution= %s", BestSolution) | ||
| logrus.Debugf("Configuring best solution= %s", BestSolution) |
| // Create the third HA-specific phc2sys config if HA is enabled | ||
| if phc2SysHaEnabled { | ||
| logrus.Infof("Creating HA ptpconfig") | ||
| logrus.Debugf("Creating HA ptpconfig") |
| logrus.Errorf("error getting ptpconfig list, err=%s", err) | ||
| } | ||
| logrus.Infof("%d ptpconfig objects recovered", len(configList.Items)) | ||
| logrus.Debugf("%d ptpconfig objects recovered", len(configList.Items)) |
| var allMasterIfs []string | ||
| var allFollowerIfs []string | ||
| logrus.Infof("Number of ptpconfigs under test: %d", len(ptpConfigClockUnderTest)) | ||
| logrus.Debugf("Number of ptpconfigs under test: %d", len(ptpConfigClockUnderTest)) |
| podNames = append(podNames, aPod.Name) | ||
| } | ||
| logrus.Infof("List of pods running ptp4l: %v", podNames) | ||
| logrus.Debugf("List of pods running ptp4l: %v", podNames) |
edcdavid
left a comment
There was a problem hiding this comment.
Few comments:
- Also add timestamps on log lines generated from the run-on-vm.sh script, add color for steps.
- When building images using ptp-tools scripts, hide podman logs by default. Only display start and end of image building and pushing. Use color to highlight these steps. If any strep fails, then dump the build/push logs leading to the failure.
- Actually, reviewing the verbosity vs use of logs, most seem ok currently to me. I would revert most of the info -> debug changes and look at the few repetitive/verbose ones that repeat info (like waiting for an state, dumping non human readable info -> reformat?).
- Might be useful to clarify logs that are not clear, if needed
| logrus.Warnf("CONSUMER_IMG is not set, use default value") | ||
| } | ||
| logrus.Infof("Use CONSUMER_IMG %s", consumerImage) | ||
| logrus.Debugf("Use CONSUMER_IMG %s", consumerImage) |
- Added date/time info to the logs. - cleaned log info level - moved most of the logs to the debug level. - Added relevant information with Ginkgo "By" statements.
74c384d to
e92dd6f
Compare