Skip to content

Add bundle bitmap for per-field telemetry - #6104

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

Add bundle bitmap for per-field telemetry#6104
denik wants to merge 11 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
denik force-pushed the denik/bundle-bitmap branch from 221d417 to 39faace Compare July 30, 2026 10:11
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 125b797

Run: 30641030144

Env 🟨​KNOWN 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
🟨​ aws linux 2 1 2 3 389 1068 21:53
🟨​ aws windows 3 2 3 391 1066 32:29
🟨​ azure linux 3 2 3 389 1067 24:58
🟨​ azure windows 3 2 3 391 1065 27:28
💚​ gcp linux 2 4 389 1068 20:57
💚​ gcp windows 2 4 391 1066 24:16
8 interesting tests: 3 SKIP, 3 KNOWN, 2 RECOVERED
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
🟨​ TestFetchRepositoryInfoAPI_FromRepo 🟨​K 🟨​K 🟨​K 🟨​K 🙈​S 🙈​S
🟨​ TestFetchRepositoryInfoAPI_FromRepo/root 🟨​K 🟨​K 🟨​K 🟨​K
🟨​ TestFetchRepositoryInfoAPI_FromRepo/subdir 🔄​f 🟨​K 🟨​K 🟨​K
Top 35 slowest tests (at least 2 minutes):
duration env testname
7:53 aws windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=1
7:21 aws windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=1
7:11 aws windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=
3:41 gcp windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=1
3:26 gcp windows TestAccept
3:22 aws linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=1
3:22 aws linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=
3:16 azure linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=
3:16 azure windows TestAccept
3:05 gcp linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=1
3:03 aws windows TestAccept
2:58 azure linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=1
2:55 gcp windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=volume_uppercase_name.yml.tmpl/READPLAN=1
2:53 gcp windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=1
2:49 gcp linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=
2:43 gcp linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=1
2:37 azure windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=1
2:32 azure windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=
2:31 aws windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=
2:24 gcp linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=
2:23 gcp windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=
2:21 aws linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=1
2:19 gcp windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=
2:19 gcp linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=app.yml.tmpl/READPLAN=1
2:17 aws linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=
2:15 azure windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=app.yml.tmpl/READPLAN=
2:15 azure windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=1
2:10 azure windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=job_pydabs_1000_tasks.yml.tmpl/READPLAN=1
2:07 aws linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=job_permission_ref.yml.tmpl/READPLAN=
2:05 azure linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=schema_uppercase_name.yml.tmpl/READPLAN=1
2:05 aws windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=job_pydabs_1000_tasks.yml.tmpl/READPLAN=1
2:05 azure linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=1
2:04 aws windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=schema_uppercase_name.yml.tmpl/READPLAN=1
2:01 azure linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=
2:00 aws windows TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=job_apply_policy_default_values_task_cluster.yml.tmpl/READPLAN=1

denik added 11 commits July 31, 2026 15:24
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
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
The schema had telemetry fields appended at the tail (from append-only merges
across a rebase). Since the PR has not landed, bit positions need not be
stable yet, so regenerate from scratch to put telemetry fields in natural walk
order.

generate-bitmap-schema now also regenerates the bitmap acceptance goldens
(out.schema.txt, out.bitmap-text.txt, encoded bitmap), which embed the schema
and depend on bit positions; otherwise they go stale when the schema changes.

Co-authored-by: Isaac
Existing telemetry (bundle/metrics AddBoolValue/SetBoolValue and the wire) is
unchanged. Add a Telemetry struct on Bundle with a field per bool flag; each
metrics call site additionally sets the matching field so the same signal
reaches the bitmap. Value-bearing flags use True/False pairs so the
presence-only bitmap can distinguish measured-false from not-measured. Fields
have no json tags, so they are invisible to the config schema and walked into
the bitmap under their Go field names (telemetry.*).

Verified the telemetry and resource_deps goldens are byte-identical to main:
the change is strictly additive to the existing wire.

Co-authored-by: Isaac
The four dms_undeclared_* flags are independent booleans recorded with
their real value on every deploy, so a measured false is meaningful (it
is the common "no undeclared writers" case). As single presence bits a
false collapsed to 0, indistinguishable from "not measured", losing the
signal. Store each as a True/False pair like the other value-bearing
flags. The telemetry wire (BoolValues) is unchanged.

Co-authored-by: Isaac
@denik
denik force-pushed the denik/bundle-bitmap branch from 095720d to 125b797 Compare July 31, 2026 14:59
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