Skip to content

refactor(importer): migrate log:: to tracing:: in git walker#2489

Merged
ctron merged 1 commit into
guacsec:mainfrom
mrrajan:TC-5175
Jul 10, 2026
Merged

refactor(importer): migrate log:: to tracing:: in git walker#2489
ctron merged 1 commit into
guacsec:mainfrom
mrrajan:TC-5175

Conversation

@mrrajan

@mrrajan mrrajan commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace all 17 log::debug!, log::info!, and log::trace! calls with tracing:: equivalents in modules/importer/src/runner/common/walker/git.rs
  • Pure logging framework migration — no behavioral changes
  • Per CONVENTIONS.md: "Use tracing:: for all new code; migrate log:: when touching a file"

Context

This was originally bundled with the proxy fix in PR #2488 (TC-5174) but the maintainer requested it be in a dedicated commit/PR since the tracing migration is unrelated to the proxy bug fix.

Test plan

  • test_walker passes
  • test_walker_fail_escape passes
  • cargo xtask precommit passes (clippy, fmt, check)

Implements TC-5175

Summary by Sourcery

Enhancements:

  • Replace existing log::info!/debug!/trace! calls in the git walker with tracing::info!/debug!/trace! to align with project logging conventions.

Replace all log::debug!, log::info!, and log::trace! calls with their
tracing:: equivalents in the git walker module. The tracing crate is
already imported for #[instrument] and info_span! usage.

Per CONVENTIONS.md: "Use tracing:: for all new code; migrate log:: when
touching a file."

Implements TC-5175

Assisted-by: Claude Code
@sourcery-ai

sourcery-ai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Refactors the git walker to use the tracing logging framework instead of log by mechanically replacing all existing log macros with their tracing equivalents, without altering control flow or behavior.

File-Level Changes

Change Details Files
Migrate git walker logging from log macros to tracing macros.
  • Replaced all log::debug! calls with tracing::debug! using the same message strings and interpolation.
  • Replaced all log::info! calls with tracing::info! preserving existing contextual data, including commit IDs and error codes.
  • Replaced all log::trace! calls with tracing::trace! for progress and file-iteration logging.
  • Ensured existing #[instrument] usage remains unchanged so new tracing logs integrate with spans.
modules/importer/src/runner/common/walker/git.rs

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

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.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.67%. Comparing base (1deda46) to head (3d3c7d8).
⚠️ Report is 101 commits behind head on main.

Files with missing lines Patch % Lines
modules/importer/src/runner/common/walker/git.rs 60.00% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2489      +/-   ##
==========================================
+ Coverage   71.38%   71.67%   +0.28%     
==========================================
  Files         441      453      +12     
  Lines       26740    27517     +777     
  Branches    26740    27517     +777     
==========================================
+ Hits        19089    19722     +633     
- Misses       6538     6658     +120     
- Partials     1113     1137      +24     

☔ View full report in Codecov by Harness.
📢 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.

@ctron ctron added this pull request to the merge queue Jul 10, 2026
Merged via the queue into guacsec:main with commit 3eba74d Jul 10, 2026
10 of 11 checks passed
@github-project-automation github-project-automation Bot moved this to Done in Trustify Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants