Skip to content

Conversation

@hanabi1224
Copy link
Contributor

@hanabi1224 hanabi1224 commented Nov 3, 2025

Summary of changes

Adjust go log levels to match Lotus

https://github.com/filecoin-project/lotus/blob/v1.34.1/lib/lotuslog/levels.go#L22

// Always mute RtRefreshManager because it breaks terminals
_ = logging.SetLogLevel("dht/RtRefreshManager", "FATAL")

Changes introduced in this pull request:

Reference issue to close (if applicable)

Closes

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation. All new code adheres to the team's documentation standards,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

Summary by CodeRabbit

  • Chores
    • Updated error logging severity for internal system components to enhance visibility of critical events. This adjustment may affect how system failures and certain error conditions are communicated in operational scenarios.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 3, 2025

Walkthrough

Single log level modification in f3-sidecar/utils.go adjusting RtRefreshManager logger severity from "warn" to "fatal" within the setLogLevels function. No functional or control flow changes.

Changes

Cohort / File(s) Change Summary
Log Level Configuration
f3-sidecar/utils.go
Updated RtRefreshManager log level from "warn" to "fatal" in setLogLevels function

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

  • Single log level constant modification with no logic or control flow impact

Suggested reviewers

  • elmattic
  • sudo-shashank

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'fix: mute go-f3 dht/RtRefreshManager log' directly corresponds to the main change in the pull request. The raw summary confirms that the log level for RtRefreshManager was changed from 'warn' to 'fatal' in the setLogLevels function, which effectively mutes the logger. The title accurately summarizes the primary change and is concise and specific.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch hm/fix-mute-go-dht-log

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d143ac5 and 7eaa245.

📒 Files selected for processing (1)
  • f3-sidecar/utils.go (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: hanabi1224
Repo: ChainSafe/forest PR: 5930
File: build.rs:64-77
Timestamp: 2025-08-13T09:43:20.301Z
Learning: hanabi1224 prefers hard compile-time errors in build scripts rather than runtime safeguards or collision detection, believing it's better to fail fast and fix root causes of issues like malformed snapshot names.
Learnt from: hanabi1224
Repo: ChainSafe/forest PR: 6057
File: src/cli/subcommands/f3_cmd.rs:0-0
Timestamp: 2025-09-09T10:37:17.947Z
Learning: hanabi1224 prefers having default timeouts (like 10m for --no-progress-timeout) to prevent commands from hanging indefinitely, even when the timeout flag isn't explicitly provided by users. This fail-fast approach is preferred over requiring explicit flag usage.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: tests
  • GitHub Check: tests-release
  • GitHub Check: Build forest binaries on Linux AMD64
  • GitHub Check: Build MacOS
  • GitHub Check: cargo-publish-dry-run
  • GitHub Check: Build Ubuntu
  • GitHub Check: All lint checks
🔇 Additional comments (1)
f3-sidecar/utils.go (1)

64-64: LGTM! Change aligns with Lotus reference implementation.

The change from "warn" to "fatal" effectively silences the RtRefreshManager logger to prevent terminal output issues. This matches the Lotus v1.34.1 behavior referenced in the PR description. The trade-off is reduced observability for DHT refresh operations, but since this aligns with the reference implementation and addresses a UX issue (broken terminals), the change is appropriate.

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.5.0)

level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain modules listed in go.work or their selected dependencies"


Comment @coderabbitai help to get the list of available commands and usage tips.

@hanabi1224 hanabi1224 marked this pull request as ready for review November 3, 2025 09:51
@hanabi1224 hanabi1224 requested a review from a team as a code owner November 3, 2025 09:51
@hanabi1224 hanabi1224 requested review from LesnyRumcajs and elmattic and removed request for a team November 3, 2025 09:51
@LesnyRumcajs LesnyRumcajs added this pull request to the merge queue Nov 3, 2025
Merged via the queue into main with commit 285647e Nov 3, 2025
45 of 46 checks passed
@LesnyRumcajs LesnyRumcajs deleted the hm/fix-mute-go-dht-log branch November 3, 2025 10:42
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.

3 participants