Skip to content

Fix "bundle summary -o json" to render null values properly - #2990

Merged
denik merged 2 commits into
mainfrom
denik/bundle-summary-json
Jun 5, 2025
Merged

Fix "bundle summary -o json" to render null values properly#2990
denik merged 2 commits into
mainfrom
denik/bundle-summary-json

Conversation

@denik

@denikdenik commented Jun 5, 2025

Copy link
Copy Markdown
Contributor

Changes

Render "bundle summary -o json" based on dynamic representation rather than static (same as "bundle validate -o json").

This was the behavior of summary command since it was added in https://github.com/databricks/cli/pull/1123/files#r2128154132

Found via this acceptance test that shows diff between validate and summary output: https://github.com/databricks/cli/pull/2989/files#r2128150583

Why

Static representation is slightly broken because it does not set ForceSendFields properly and thus it cannot distinguish null vs zero values.

Tests

Existing tests.

@denik
deniktemporarily deployed to test-trigger-is June 5, 2025 07:42 — with GitHub Actions Inactive
@denik
deniktemporarily deployed to test-trigger-is June 5, 2025 07:43 — with GitHub Actions Inactive
@denik
denik changed the base branch from main to denik/artifacts-annotationsJune 5, 2025 07:46
Base automatically changed from denik/artifacts-annotations to mainJune 5, 2025 07:54
@denik
denikforce-pushed the denik/bundle-summary-json branch from 64c4596 to 72b80e6CompareJune 5, 2025 07:56
@denik
deniktemporarily deployed to test-trigger-is June 5, 2025 07:56 — with GitHub Actions Inactive
@denik
denik added this pull request to the merge queueJun 5, 2025
Merged via the queue into main with commit 9fda88fJun 5, 2025
@denik
denik deleted the denik/bundle-summary-json branch June 5, 2025 08:28
deco-sdk-taggingBot added a commit that referenced this pull request Jun 11, 2025
## Release v0.255.0
### Notable Changes
* Fix `databricks auth login` to tolerate URLs copied from the browser ([#3001](#3001)).
### CLI
* Use OS aware runner instead of bash for run-local command ([#2996](#2996))
### Bundles
* Fix "bundle summary -o json" to render null values properly ([#2990](#2990))
* Fix dashboard generation for already imported dashboard ([#3016](#3016))
* Fixed null pointer de-reference if artifacts missing fields ([#3022](#3022))
* Update bundle templates to also include `resources/*/*.yml` ([#3024](#3024))
* Apply YAML formatter on default-python and dbt-sql templates ([#3026](#3026))
github-merge-queueBot pushed a commit that referenced this pull request Jun 26, 2025
## Changes
- Merge rendering logic of "bundle validate" and "bundle summary" into
one function.
- Now "bundle summary" logs all warning diagnostics to stderr like
"bundle validate" does.
## Why
Not rendering warnings is a bug IMO. These are not just validation
issues but could be real issues that are only related to summary and
don't show up in "bundle validate".
This is not the first time "bundle summary" differs from "bundle
validate" (#2990) so in this PR I
go beyond fixing and merge two code paths.
denik added a commit that referenced this pull request May 20, 2026
## Changes
Render "bundle summary -o json" based on dynamic representation rather
than static (same as "bundle validate -o json").
This was the behavior of summary command since it was added in
https://github.com/databricks/cli/pull/1123/files#r2128154132
Found via this acceptance test that shows diff between validate and
summary output:
https://github.com/databricks/cli/pull/2989/files#r2128150583
## Why
Static representation is slightly broken because it does not set
ForceSendFields properly and thus it cannot distinguish null vs zero
values.
## Tests
Existing tests.
denik pushed a commit that referenced this pull request May 20, 2026
## Release v0.255.0
### Notable Changes
* Fix `databricks auth login` to tolerate URLs copied from the browser ([#3001](#3001)).
### CLI
* Use OS aware runner instead of bash for run-local command ([#2996](#2996))
### Bundles
* Fix "bundle summary -o json" to render null values properly ([#2990](#2990))
* Fix dashboard generation for already imported dashboard ([#3016](#3016))
* Fixed null pointer de-reference if artifacts missing fields ([#3022](#3022))
* Update bundle templates to also include `resources/*/*.yml` ([#3024](#3024))
* Apply YAML formatter on default-python and dbt-sql templates ([#3026](#3026))
denik added a commit that referenced this pull request May 20, 2026
## Changes
- Merge rendering logic of "bundle validate" and "bundle summary" into
one function.
- Now "bundle summary" logs all warning diagnostics to stderr like
"bundle validate" does.
## Why
Not rendering warnings is a bug IMO. These are not just validation
issues but could be real issues that are only related to summary and
don't show up in "bundle validate".
This is not the first time "bundle summary" differs from "bundle
validate" (#2990) so in this PR I
go beyond fixing and merge two code paths.
Sign up for freeto 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

@denik@pietern