Skip to content

Conversation

SteveLauC
Copy link
Member

Standards checklist:

  • The PR title is descriptive.
  • I have read CONTRIBUTING.md
  • The code compiles (cargo build)
  • The code passes rustfmt (cargo fmt)
  • The code passes clippy (cargo clippy)
  • The code passes tests (cargo test)
  • Optional: I have tested the code myself

For new steps

  • Optional: Topgrade skips this step where needed
  • Optional: The --dry-run option works with this step
  • Optional: The --yes option works with this step if it is supported by
    the underlying command

If you developed a feature or a bug fix for someone else and you do not have the
means to test it, please tag this person here.

What does this PR do

  1. Put step logs in a span so that we can clearly see which step a log entry belongs to.

Before:

DEBUG Cannot find "rpm-ostree"
DEBUG Detected "/usr/bin/dnf" as "dnf"
Dry running: /usr/bin/sudo /usr/bin/dnf upgrade -y

After:

DEBUG step{step=System key=System update}: Cannot find "rpm-ostree"
DEBUG step{step=System key=System update}: Detected "/usr/bin/dnf" as "dnf"
Dry running: /usr/bin/sudo /usr/bin/dnf upgrade -y

Copy link

codecov bot commented Mar 16, 2024

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 5.35%. Comparing base (9518f43) to head (0ffb5e5).

Files Patch % Lines
src/runner.rs 0.00% 7 Missing ⚠️
src/utils.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main    #746      +/-   ##
========================================
- Coverage   5.37%   5.35%   -0.02%     
========================================
  Files         37      37              
  Lines      12119   12149      +30     
========================================
  Hits         651     651              
- Misses     11468   11498      +30     

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

@SteveLauC SteveLauC changed the title feat: enable span for step log feat: put step logs in a span Mar 16, 2024
@SteveLauC SteveLauC merged commit 351922c into topgrade-rs:main Mar 16, 2024
@SteveLauC SteveLauC deleted the feat/enable_span_for_step_log branch March 16, 2024 06:17
InnocentZero pushed a commit to InnocentZero/topgrade that referenced this pull request May 25, 2024
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.

1 participant