Skip to content

Conversation

@asnare
Copy link
Contributor

@asnare asnare commented Nov 18, 2025

This PR updates the logging set up during handoff from the Databricks CLI so that TRACE-level logging doesn't trigger a crash. Because Python doesn't support TRACE as a logging level we map this to DEBUG.

In addition, rather than crash when an unknown log-level is encountered we now log a warning and proceed with INFO instead.

Resolves #317.

This has been tested manually with lakebridge.

@asnare asnare self-assigned this Nov 18, 2025
@asnare asnare added this to UCX Nov 18, 2025
@asnare asnare added the bug Something isn't working label Nov 18, 2025
@codecov
Copy link

codecov bot commented Nov 18, 2025

Codecov Report

❌ Patch coverage is 60.00000% with 6 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@ac509c1). Learn more about missing BASE report.
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/databricks/labs/blueprint/cli.py 60.00% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #318   +/-   ##
=======================================
  Coverage        ?   80.05%           
=======================================
  Files           ?       17           
  Lines           ?     2396           
  Branches        ?      516           
=======================================
  Hits            ?     1918           
  Misses          ?      354           
  Partials        ?      124           

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

@asnare asnare moved this to Ready for Review in UCX Nov 18, 2025
@asnare asnare marked this pull request as ready for review November 18, 2025 16:14
@asnare asnare requested a review from nfx as a code owner November 18, 2025 16:14
@github-actions
Copy link

✅ 40/40 passed, 2 skipped, 1m44s total

Running from acceptance #369

Copy link

@m-abulazm m-abulazm left a comment

Choose a reason for hiding this comment

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

LGTM

@asnare asnare merged commit 7ebe9a3 into main Nov 25, 2025
15 checks passed
@asnare asnare deleted the fix/trace-logging branch November 25, 2025 14:47
@github-project-automation github-project-automation bot moved this from Ready for Review to Done in UCX Nov 25, 2025
gueniai added a commit that referenced this pull request Dec 30, 2025
- **TRACE-level logging support** [#318](#318)
    Added support for `TRACE`-level logs by mapping them to `DEBUG`, since Python lacks native `TRACE` support. Introduced a new method to translate Databricks CLI log levels to Python levels, defaulting to `INFO` when unknown. Improved error logging for better debugging and reporting.

- **Python 3.14 compatibility** [#315](#315)
    The project now supports Python 3.10–3.14. CI tests have been updated accordingly, and project metadata now reflects Python 3.14 and beta development status. Minimum requirements remain: Python 3.10+ and `databricks-sdk` 0.16.0+.

- **Line-based subprocess streaming** [#320](#320)
    Added real-time, line-based reading of subprocess output via a new `readlines` function. It decodes UTF-8 safely, manages memory efficiently, and handles very long lines without blocking. Also added `pytest-asyncio` to improve async code testing.

- **Hatch upgrade** [#311](#311)
    Upgraded Hatch from 1.9.4 → 1.14.2 to fix compatibility issues (notably with Click 8.3.0) and improve build performance. Removed the old Click version constraint so newer versions can be installed.
@gueniai gueniai mentioned this pull request Dec 30, 2025
gueniai added a commit that referenced this pull request Dec 30, 2025
# Release Notes 

- **TRACE-level logging support**
[#318](#318)
Added support for `TRACE`-level logs by mapping them to `DEBUG`, since
Python lacks native `TRACE` support. Introduced a new method to
translate Databricks CLI log levels to Python levels, defaulting to
`INFO` when unknown. Improved error logging for better debugging and
reporting.
    
- **Python 3.14 compatibility**
[#315](#315)
The project now supports Python 3.10–3.14. CI tests have been updated
accordingly, and project metadata now reflects Python 3.14 and beta
development status. Minimum requirements remain: Python 3.10+ and
`databricks-sdk` 0.16.0+.
    
- **Line-based subprocess streaming**
[#320](#320)
Added real-time, line-based reading of subprocess output via a new
`readlines` function. It decodes UTF-8 safely, manages memory
efficiently, and handles very long lines without blocking. Also added
`pytest-asyncio` to improve async code testing.
    
- **Hatch upgrade**
[#311](#311)
Upgraded Hatch from 1.9.4 → 1.14.2 to fix compatibility issues (notably
with Click 8.3.0) and improve build performance. Removed the old Click
version constraint so newer versions can be installed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Databricks CLI integration fails with --log-level=trace

3 participants