Skip to content

Conversation

@alpe
Copy link
Contributor

@alpe alpe commented Nov 21, 2025

Overview

Minor updates to make it easier to trace errors

Extracted from #2836

@github-actions
Copy link
Contributor

github-actions bot commented Nov 21, 2025

The latest Buf updates on your PR. Results from workflow CI / buf-check (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed⏩ skipped✅ passed✅ passedNov 21, 2025, 1:39 PM

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @alpe, 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 primarily focuses on enhancing the system's error reporting and debugging capabilities. It introduces more detailed panic logging for the node and refines the logging mechanism for commands executed within end-to-end tests. Additionally, it includes a minor adjustment to a default constant and an update to a function's parameter type for P2P key handling.

Highlights

  • Enhanced Error Tracing: Node panics now include a full stack trace in the logs, significantly improving the ability to diagnose and debug unexpected crashes.
  • Improved Test Logging: End-to-end test command execution has been refactored to allow for custom log file prefixes, making it easier to differentiate and trace logs from various test processes.
  • Dependency Update: The StartNode function signature was updated to use key.NodeKey instead of p2p.Client, reflecting a change in how P2P keys are handled.
  • Constant Value Adjustment: The DefaultMaxBlobSize constant has been updated from 2MB to 1.5MB.
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.

@claude
Copy link
Contributor

claude bot commented Nov 21, 2025

Claude Code is working…

I'll analyze this and get back to you.

View job run

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 aims to improve error outputs, and the core change to add stack traces to panic logs is a good improvement. However, I've found a few issues:

  • There's a critical compilation error due to an incomplete refactoring of P2P-related code, where a *key.NodeKey is passed to a function expecting a *p2p.Client.
  • The PR includes an unrelated functional change to DefaultMaxBlobSize, which should ideally be in its own PR.
  • The buffer for capturing stack traces is quite small and should be increased to avoid truncated stacks.

The changes in the e2e test helper for better log handling are well-implemented. I recommend addressing the critical issue and considering my other suggestions to improve the quality of this PR.

if r := recover(); r != nil {
err := fmt.Errorf("node panicked: %v", r)
logger.Error().Interface("panic", r).Msg("Recovered from panic in node")
buf := make([]byte, 1024)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The buffer size of 1024 bytes for capturing the stack trace might be too small for complex panics, potentially leading to truncated and incomplete stack traces. This would hinder debugging, which is contrary to the goal of this PR. It's recommended to use a larger buffer. For example, Go's net/http server uses a 64KB buffer for panic recovery.

Suggested change
buf := make([]byte, 1024)
buf := make([]byte, 64*1024)

@alpe alpe marked this pull request as draft November 21, 2025 13:36
@codecov
Copy link

codecov bot commented Nov 21, 2025

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.81%. Comparing base (178b4fe) to head (49f8963).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/cmd/run_node.go 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2879      +/-   ##
==========================================
+ Coverage   64.76%   64.81%   +0.05%     
==========================================
  Files          81       81              
  Lines        7328     7330       +2     
==========================================
+ Hits         4746     4751       +5     
+ Misses       2041     2038       -3     
  Partials      541      541              
Flag Coverage Δ
combined 64.81% <0.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alpe alpe marked this pull request as ready for review November 21, 2025 14:40
@julienrbrt julienrbrt added this pull request to the merge queue Nov 21, 2025
Merged via the queue into main with commit 82299ed Nov 21, 2025
29 of 31 checks passed
@julienrbrt julienrbrt deleted the alex/err_trace branch November 21, 2025 15:13
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