Skip to content

fix: also wrap logging for sub apps#11

Merged
EspenAlbert merged 2 commits intomainfrom
task/t08-23-nested-typer-logging
Mar 23, 2026
Merged

fix: also wrap logging for sub apps#11
EspenAlbert merged 2 commits intomainfrom
task/t08-23-nested-typer-logging

Conversation

@EspenAlbert
Copy link
Copy Markdown
Owner

ask-shell configure_logging now walks the full Typer tree (registered_groups / typer_instance) and applies the same progress and run-log wrapping to subcommands as to top-level commands. tfdo keeps a single root configure_logging(app) in cli.py (no per-subapp calls).

Reviewer notes

  • Run log layout change: Nested commands use {root}/{group}/…/{command} (e.g. tfdo/schema/diff) instead of {root}/{command}. Anything that assumed a flat prefix under the root app name should be updated.
  • Typer internals: The walk uses registered_commands and registered_groups; if Typer changes these attributes, this needs a follow-up.
  • Breaking change: Only for consumers that parse or depend on the old flat run-log path for nested CLIs; API of configure_logging is unchanged.

Risks

  • Deep or dynamic trees: Same recursion depth as the Typer graph; unusual plugins with cycles would not be expected but are not guarded.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.68%. Comparing base (1dcc52a) to head (d6185ea).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #11      +/-   ##
==========================================
- Coverage   82.70%   82.68%   -0.03%     
==========================================
  Files          20       20              
  Lines        1833     1842       +9     
==========================================
+ Hits         1516     1523       +7     
- Misses        317      319       +2     

☔ 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.

@EspenAlbert EspenAlbert enabled auto-merge (squash) March 23, 2026 21:42
@EspenAlbert EspenAlbert merged commit 1cabd5f into main Mar 23, 2026
16 checks passed
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.

2 participants