Skip to content

Compress profiler extracts with zstd for easier sharing#2568

Open
dgomez04 wants to merge 8 commits into
mainfrom
feat/profiler-zstd-compress-extracts
Open

Compress profiler extracts with zstd for easier sharing#2568
dgomez04 wants to merge 8 commits into
mainfrom
feat/profiler-zstd-compress-extracts

Conversation

@dgomez04

@dgomez04 dgomez04 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

This pull request integrates inline Zstandard (zstd) compression into the extract finalization step. Upon a succesful profiler run, we now generate a compressed sibling .db.zst.

  • Compression occurs during the extract finalize phase, rather than as a separate downstream pipeline step.
  • Generates a compressed .db.zst while retaining uncompressed .db for local debugging and UI compatibility.
  • Both paths are logged upon success. If compression fails, it logs a warning but allows the overall run to succeed (non-fatal).
  • Added zstandard to the direct dependencies.

Decision

Option Pros Cons
Retain .db + write .db.zst (Selected) Easy local inspection; zero disruption to lakebridge-ui or other consumers expecting a live DuckDB path. Double the local disk footprint.
Keep .db.zst only Max disk space savings. Requires manual decompression before downstream tools can query the database.

After a successful profile run, keep the DuckDB .db for local inspection and
write a sibling .db.zst (zstd level 3). Log explicit share instructions so
customers send the compressed artifact to Databricks.
@dgomez04
dgomez04 requested a review from a team as a code owner July 14, 2026 16:52
@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown

✅ 174/174 passed, 9 flaky, 2 skipped, 1h14m8s total

Flaky tests:

  • 🤪 test_installs_and_runs_local_bladebridge (12.554s)
  • 🤪 test_installs_and_runs_pypi_bladebridge (22.656s)
  • 🤪 test_recon_for_report_type_is_data (47.769s)
  • 🤪 test_transpiles_informatica_to_sparksql_non_interactive[True] (24.182s)
  • 🤪 test_transpiles_informatica_to_sparksql_non_interactive[False] (4.018s)
  • 🤪 test_transpile_teradata_sql (26.377s)
  • 🤪 test_transpile_teradata_sql_non_interactive[False] (24.988s)
  • 🤪 test_transpile_teradata_sql_non_interactive[True] (6.193s)
  • 🤪 test_transpiles_informatica_to_sparksql (23.923s)

Running from acceptance #5058

dgomez04 added 4 commits July 14, 2026 10:54
`uv add` rewrote registry/CDN URLs to the Databricks proxy; restore the
public pypi.org / files.pythonhosted.org form expected in this repo.
Restore the lockfile from main and only declare zstandard on
databricks-labs-lakebridge, avoiding proxy URL rewrites from `uv add`.
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.53%. Comparing base (7f61051) to head (71ce89a).

Files with missing lines Patch % Lines
...databricks/labs/lakebridge/assessments/profiler.py 66.66% 4 Missing ⚠️
...databricks/labs/lakebridge/assessments/compress.py 84.61% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2568      +/-   ##
==========================================
+ Coverage   69.50%   69.53%   +0.02%     
==========================================
  Files         107      108       +1     
  Lines        9626     9650      +24     
  Branches     1065     1067       +2     
==========================================
+ Hits         6691     6710      +19     
- Misses       2734     2738       +4     
- Partials      201      202       +1     

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

dgomez04 added 2 commits July 14, 2026 11:01
Compress immediately after the DuckDB write and log both paths in the
same "extract written" message. Warn only if compression fails.
Move the round-trip check onto save_to_duckdb output, assert .zst in
profiler integration runs, and keep only the non-fatal compress failure test.
@dgomez04 dgomez04 self-assigned this Jul 14, 2026
@dgomez04 dgomez04 changed the title Compress profiler extracts with zstd for sharing Compress profiler extracts with zstd for easier sharing Jul 14, 2026
@dgomez04 dgomez04 changed the title Compress profiler extracts with zstd for easier sharing Compress profiler extracts with zstd for easier sharing Jul 14, 2026
@dgomez04
dgomez04 requested a review from m-abulazm July 14, 2026 17:27
@dgomez04 dgomez04 added the feat/profiler Issues related to profilers label Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat/profiler Issues related to profilers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant