Skip to content

Add bundle bitmap for per-field telemetry - #6104

Draft
denik wants to merge 8 commits into
mainfrom
denik/bundle-bitmap
Draft

Add bundle bitmap for per-field telemetry#6104
denik wants to merge 8 commits into
mainfrom
denik/bundle-bitmap

Conversation

@denik

@denik denik commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Why

Today each tracked DABs feature needs custom code (a key constant plus a SetBoolValue call from a mutator), so only hand-picked features are tracked. The bundle bitmap encodes the presence of every bundle config field as one bit, derived by reflecting over config.Root, so all current and future fields are covered for free (http://go/dabs-telemetry).

Changes

  • New hidden databricks bundle bitmap group: schema, bitmap-text, bitmap (compressed + base64), and update-schema [--validate]. The schema is recorded in bundle/bitmap/schema.txt, embedded into the binary, and append-only so bit positions stay stable across releases.
  • Move the existing boolean telemetry into a typed bundle.Telemetry struct so it becomes part of the bitmap. Value-bearing flags are stored as True/False pairs so the bitmap can distinguish measured-false from not-measured; BoolValues() collapses each pair back to its single wire key. libs/cache gets a concrete Metrics struct embedded into Telemetry.
  • generate-bitmap-schema wired into task generate/generate-check, and the encoded bitmap is exercised over every no_drift invariant config.

The deploy telemetry wire is unchanged except that redundant false entries of one-hot groups (state_path_, dms_undeclared_) are no longer emitted; their true member is preserved.

denik added 6 commits July 30, 2026 11:57
Co-authored-by: Isaac
Encode presence of every bundle config field as one bit. The schema is
derived by reflecting over config.Root, recorded in bundle/bitmap/schema.txt,
and embedded into the binary. Append-only so bit positions stay stable.

Adds hidden `databricks bundle bitmap` group: schema, update-schema
[--validate], bitmap-text, bitmap. Wires generate-bitmap-schema into the
Taskfile and runs the encoder over all no_drift invariant configs.

Co-authored-by: Isaac
Kept in PR history for context; not landed.

Co-authored-by: Isaac
- Every bool/*bool field now gets a "#true" value bit in addition to its
  presence bit, so a *bool encodes unset/false/true as 00/10/11.
- decode_bitmap.py decodes the base64 bitmap against the schema; the dedicated
  acceptance test asserts it round-trips to bitmap-text.
- Record the encoded bitmap and set-bit list for the default-python template.

Co-authored-by: Isaac
Replace the string-keyed BoolValues map with a typed bundle.Telemetry struct
whose fields feed both the deploy telemetry wire (via BoolValues()) and the
bundle bitmap (namespaced under telemetry.*).

Value-bearing flags whose false is meaningful are stored as True/False pairs so
the bitmap can represent both outcomes; BoolValues() collapses each pair back to
its single wire key. libs/cache gets a concrete Metrics struct (embedded into
Telemetry) instead of the old interface.

The wire is unchanged except that redundant false entries of one-hot groups
(state_path_*, dms_undeclared_*) are no longer emitted; their true member is
preserved.

Co-authored-by: Isaac
@denik
denik force-pushed the denik/bundle-bitmap branch from 221d417 to 39faace Compare July 30, 2026 10:11
denik added 2 commits July 30, 2026 12:31
decode_bitmap.py was committed without the executable bit, so the round-trip
step failed with "permission denied" (exit code differed across OSes, breaking
the golden). Mark it executable.

bitmap-text and bitmap are separate invocations sharing a cache dir, so the
second recorded a cache hit instead of a miss and the round-trip check
diverged. Give each its own cache dir so both observe a cold miss.

Co-authored-by: Isaac
On a CRLF checkout (Windows) the embedded schema.txt lines kept a trailing \r,
so they never matched the clean paths from WalkType. Merge's dedup then failed
and the schema doubled, breaking bundle bitmap schema/bitmap-text on Windows.
splitLines now normalizes CRLF.

Co-authored-by: Isaac
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: a81474e

Run: 30536988319

Env 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
💚​ aws linux 5 3 398 1067 18:39
🔄​ aws windows 2 5 3 398 1065 27:57
💚​ azure linux 5 3 398 1066 14:23
💚​ azure windows 5 3 400 1064 30:42
💚​ gcp linux 2 4 397 1068 25:48
💚​ gcp windows 2 4 399 1066 32:12
10 interesting tests: 5 RECOVERED, 3 SKIP, 2 flaky
Test Name aws linux aws windows azure linux azure windows gcp linux gcp windows
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/invariant/no_drift 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🔄​ TestFsCpDirToDirWithOverwriteFlag ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p
🔄​ TestFsCpDirToDirWithOverwriteFlag/uc-volumes_to_uc-volumes ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p
💚​ TestFetchRepositoryInfoAPI_FromRepo 💚​R 💚​R 💚​R 💚​R 🙈​S 🙈​S
💚​ TestFetchRepositoryInfoAPI_FromRepo/root 💚​R 💚​R 💚​R 💚​R
💚​ TestFetchRepositoryInfoAPI_FromRepo/subdir 💚​R 💚​R 💚​R 💚​R
Top 49 slowest tests (at least 2 minutes):
duration env testname
4:49 gcp windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=1
4:33 gcp linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=1
3:57 gcp linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=1
3:54 gcp windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=app.yml.tmpl/READPLAN=1
3:49 gcp linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=
3:48 aws windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=1
3:48 aws windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=1
3:47 gcp linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=
3:42 gcp linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=job_run.yml.tmpl/READPLAN=1
3:36 azure windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=1
3:36 aws windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=
3:32 gcp windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=1
3:25 aws windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=experiment.yml.tmpl/READPLAN=1
3:17 azure windows TestAccept
3:11 gcp windows TestAccept
3:07 gcp windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=job_pydabs_1000_tasks.yml.tmpl/READPLAN=
3:04 azure windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=job_pydabs_1000_tasks.yml.tmpl/READPLAN=1
3:02 aws windows TestAccept
2:50 aws windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=job_run.yml.tmpl/READPLAN=1
2:42 gcp windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=
2:40 azure windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=job.yml.tmpl/READPLAN=1
2:39 azure windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=dashboard.yml.tmpl/READPLAN=
2:35 aws linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=1
2:34 gcp windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=
2:32 azure windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=pipeline_config_dots.yml.tmpl/READPLAN=1
2:32 aws linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=
2:31 azure linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=
2:31 aws linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=1
2:30 gcp windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=instance_pool.yml.tmpl/READPLAN=
2:28 azure windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=app.yml.tmpl/READPLAN=1
2:27 azure windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=
2:27 aws windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=
2:25 azure linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=
2:23 gcp linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=catalog.yml.tmpl/READPLAN=
2:23 gcp windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=vector_search_endpoint.yml.tmpl/READPLAN=
2:21 gcp linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=job_pydabs_1000_tasks.yml.tmpl/READPLAN=1
2:21 gcp windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=instance_pool.yml.tmpl/READPLAN=1
2:20 aws windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=job_pydabs_1000_tasks.yml.tmpl/READPLAN=
2:20 azure windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=registered_model.yml.tmpl/READPLAN=
2:18 azure windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=1
2:14 gcp linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=job_apply_policy_default_values_task_cluster.yml.tmpl/READPLAN=1
2:11 gcp windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=job_pydabs_1000_tasks.yml.tmpl/READPLAN=1
2:11 aws linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=app.yml.tmpl/READPLAN=1
2:08 gcp windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=job.yml.tmpl/READPLAN=
2:05 azure windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=job_pydabs_1000_tasks.yml.tmpl/READPLAN=
2:04 gcp windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=secret_scope_default_backend_type.yml.tmpl/READPLAN=1
2:02 aws linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=
2:00 azure windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=
2:00 azure linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=job_pydabs_1000_tasks.yml.tmpl/READPLAN=1

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