Skip to content

Add null-in-targets telemetry#5838

Open
denik wants to merge 6 commits into
mainfrom
denik/nil-merge
Open

Add null-in-targets telemetry#5838
denik wants to merge 6 commits into
mainfrom
denik/nil-merge

Conversation

@denik

@denik denik commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Record whether the bundle config has any null value under the targets section, surfaced as a bool telemetry metric null-in-targets.

The check runs on the raw (pre-normalization) YAML, so it also catches scalar-typed nulls (e.g. workspace.host:) that normalization would otherwise drop silently. The signal is accumulated across all included files via Root.Merge.

Add acceptance tests in acceptance/bundle/null/ that capture current merge behavior via bundle validate -o json; these will change when null-removes-value merge semantics are introduced in a follow-up PR.


This PR was created with GitHub MCP.

denik added 2 commits July 6, 2026 11:17
Record whether the bundle config has any null value under the targets
section, collected before target overrides are merged.

Co-authored-by: Isaac
Move the null-under-targets check from the CollectNullTelemetry mutator
into LoadFromBytes, so it runs on the raw (pre-normalization) YAML and
captures scalar-typed nulls (like workspace.host:) that normalization
would otherwise drop.

The mutator now just surfaces the flag. The Root.Merge method carries
the flag forward when included files are merged, so a null in any
included file is also counted.

Add acceptance tests in acceptance/bundle/null/ that capture the current
merge behavior via bundle validate -o json; these will change when the
null-removes-value semantics are introduced in a follow-up PR.

Co-authored-by: Isaac
@denik denik temporarily deployed to test-trigger-is July 6, 2026 11:11 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is July 6, 2026 11:11 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Approval status: pending

/acceptance/bundle/ - needs approval

21 files changed
Suggested: @pietern
Also eligible: @janniklasrose, @shreyas-goenka, @andrewnester, @lennartkats-db, @anton-107

/bundle/ - needs approval

4 files changed
Suggested: @pietern
Also eligible: @janniklasrose, @shreyas-goenka, @andrewnester, @lennartkats-db, @anton-107

Any maintainer (@andrewnester, @anton-107, @pietern, @shreyas-goenka, @simonfaltum, @renaudhartert-db, @janniklasrose) can approve all areas.
See OWNERS for ownership rules.

Add a dev-job-field target that nullifies resources.jobs.my_job.description,
alongside dev-run-as which nullifies the run_as struct, to cover both
struct-level and scalar field nulls under resources.

Add bundle deploy + print_telemetry_bool_values to each test so the
null-in-targets signal is asserted end-to-end.

Add a dev-empty case to scalar-field that uses an explicit empty string
rather than YAML null, documenting that both currently leave the base
value in place (via different code paths).

Co-authored-by: Isaac
@denik denik temporarily deployed to test-trigger-is July 6, 2026 11:22 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is July 6, 2026 11:22 — with GitHub Actions Inactive
@eng-dev-ecosystem-bot

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

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 42842b4

Run: 28807599433

Env 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
💚​ aws linux 4 4 230 1059 4:54
💚​ aws windows 4 4 232 1057 6:00
💚​ aws-ucws linux 4 4 314 977 5:23
💚​ aws-ucws windows 4 4 316 975 5:49
💚​ azure linux 4 4 230 1058 4:54
💚​ azure windows 4 4 232 1056 5:50
💚​ azure-ucws linux 4 4 316 974 5:59
💚​ azure-ucws windows 4 4 318 972 6:16
💚​ gcp linux 4 4 229 1060 4:41
💚​ gcp windows 4 4 231 1058 6:19
8 interesting tests: 4 RECOVERED, 4 SKIP
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp windows
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestFetchRepositoryInfoAPI_FromRepo 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
💚​ TestFetchRepositoryInfoAPI_FromRepo/root 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
💚​ TestFetchRepositoryInfoAPI_FromRepo/subdir 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 10 slowest tests (at least 2 minutes):
duration env testname
5:26 gcp windows TestAccept
5:07 azure-ucws windows TestAccept
5:00 aws windows TestAccept
4:59 azure windows TestAccept
4:57 aws-ucws windows TestAccept
2:55 azure-ucws linux TestAccept
2:54 gcp linux TestAccept
2:53 aws linux TestAccept
2:52 azure linux TestAccept
2:52 aws-ucws linux TestAccept

Replace the single null-in-targets bool with five granular signals:

- null-in-targets.scalar: null on a scalar field (string/int/bool);
  normalization drops it and emits a warning
- null-in-targets.complex: null on a struct-typed field at the top level
  of a target override (e.g. run_as:)
- null-in-targets.map-key: null as a value in a user-keyed map field
  (e.g. variables.foo:, or a field inside a resource entry)
- null-in-targets.array-index: null at a sequence index
- null-in-targets.resource: null on an entire resource entry
  (targets.<T>.resources.<type>.<name>)

The top-level null-in-targets flag is retained as the OR of all categories.

The classification is based on path structure and normalization survival:
scalars are dropped by normalization, all others survive. A two-pass walk
(raw tree + normalized tree) distinguishes scalar from complex nulls.

Add MapKey and Resource acceptance test cases to acceptance/bundle/null/map-key.

Co-authored-by: Isaac
@denik denik temporarily deployed to test-trigger-is July 6, 2026 13:42 — with GitHub Actions Inactive
@denik denik had a problem deploying to test-trigger-is July 6, 2026 13:42 — with GitHub Actions Failure
Replace dots with dashes in sub-key names to avoid ambiguity with the
dyn path separator. Also shorten map-key → key and array-index → index.

Co-authored-by: Isaac
@denik denik temporarily deployed to test-trigger-is July 6, 2026 16:33 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is July 6, 2026 16:33 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is July 6, 2026 16:40 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is July 6, 2026 16:40 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants