Uh oh!
There was an error while loading. Please reload this page.
Fix segfault in bundle summary command - #1937
Conversation
pietern
commented
Nov 27, 2024
This happens because of the |
andrewnester
commented
Nov 27, 2024
@pietern yes, strictly speaking it's correct because such jobs are marked as deleted, but it is also useful if someone defines just a job key and no other job settings which makes job to be nil in the config |
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
eng-dev-ecosystem-bot
commented
Nov 27, 2024
Test Details: go/deco-tests/12051882555 |
| "job3": { | ||
| ID: "3", | ||
| URL: "https://url3", // This emulates deleted job | ||
| }, |
There was a problem hiding this comment.
If I understand correctly, this PR would allow such config to be loaded and deployed but will skip over this particular job.
Why don't we reject such jobs at validation stage instead?
There was a problem hiding this comment.
Not exactly. This is a "bundle summary" command which essentially shows the current state of your bundle configuration. #1123
It is used in VS Code for rendering the state of resources in the side panel as well as directly by customers to see the state of the bundle.
There was a problem hiding this comment.
For validation stage we have a mutator which does check that all resources are defined correctly https://github.com/databricks/cli/blob/main/bundle/config/validate/all_resources_have_values.go#L14
**New features for Databricks Asset Bundles:** This release adds support for managing Unity Catalog volumes as part of your bundle configuration. Bundles: * Add DABs support for Unity Catalog volumes ([#1762](#1762)). * Support lookup by name of notification destinations ([#1922](#1922)). * Extend "notebook not found" error to warn about missing extension ([#1920](#1920)). * Skip sync warning if no sync paths are defined ([#1926](#1926)). * Add validation for single node clusters ([#1909](#1909)). * Fix segfault in bundle summary command ([#1937](#1937)). * Add the `bundle_uuid` helper function for templates ([#1947](#1947)). * Add default value for `volume_type` for DABs ([#1952](#1952)). * Properly read Git metadata when running inside workspace ([#1945](#1945)). * Upgrade TF provider to 1.59.0 ([#1960](#1960)). Internal: * Breakout variable lookup into separate files and tests ([#1921](#1921)). * Add golangci-lint v1.62.2 ([#1953](#1953)). Dependency updates: * Bump golang.org/x/term from 0.25.0 to 0.26.0 ([#1907](#1907)). * Bump github.com/Masterminds/semver/v3 from 3.3.0 to 3.3.1 ([#1930](#1930)). * Bump github.com/stretchr/testify from 1.9.0 to 1.10.0 ([#1932](#1932)). * Bump github.com/databricks/databricks-sdk-go from 0.51.0 to 0.52.0 ([#1931](#1931)).
**New features for Databricks Asset Bundles:** This release adds support for managing Unity Catalog volumes as part of your bundle configuration. Bundles: * Add DABs support for Unity Catalog volumes ([#1762](#1762)). * Support lookup by name of notification destinations ([#1922](#1922)). * Extend "notebook not found" error to warn about missing extension ([#1920](#1920)). * Skip sync warning if no sync paths are defined ([#1926](#1926)). * Add validation for single node clusters ([#1909](#1909)). * Fix segfault in bundle summary command ([#1937](#1937)). * Add the `bundle_uuid` helper function for templates ([#1947](#1947)). * Add default value for `volume_type` for DABs ([#1952](#1952)). * Properly read Git metadata when running inside workspace ([#1945](#1945)). * Upgrade TF provider to 1.59.0 ([#1960](#1960)). Internal: * Breakout variable lookup into separate files and tests ([#1921](#1921)). * Add golangci-lint v1.62.2 ([#1953](#1953)). Dependency updates: * Bump golang.org/x/term from 0.25.0 to 0.26.0 ([#1907](#1907)). * Bump github.com/Masterminds/semver/v3 from 3.3.0 to 3.3.1 ([#1930](#1930)). * Bump github.com/stretchr/testify from 1.9.0 to 1.10.0 ([#1932](#1932)). * Bump github.com/databricks/databricks-sdk-go from 0.51.0 to 0.52.0 ([#1931](#1931)).
## Changes - Embed struct by value not by pointer in all the resources. - Remove IsNil method from the resource interface and implementations (it's never true). ## Why - Prevents a class of crashes related to nil pointer, like #2776 and #1937 - Simplify user code, no need to check nilness as much. ## Tests Existing tests.
## Changes This PR introduces use of new `isNil` method. It allows to ensure we filter out all improperly defined resources in `bundle summary` command. This includes deleted resources or resources with incorrect configuration such as only defining key of the resource and nothing else. Fixes#1919, #1913 ## Tests Added regression unit test case
**New features for Databricks Asset Bundles:** This release adds support for managing Unity Catalog volumes as part of your bundle configuration. Bundles: * Add DABs support for Unity Catalog volumes ([#1762](#1762)). * Support lookup by name of notification destinations ([#1922](#1922)). * Extend "notebook not found" error to warn about missing extension ([#1920](#1920)). * Skip sync warning if no sync paths are defined ([#1926](#1926)). * Add validation for single node clusters ([#1909](#1909)). * Fix segfault in bundle summary command ([#1937](#1937)). * Add the `bundle_uuid` helper function for templates ([#1947](#1947)). * Add default value for `volume_type` for DABs ([#1952](#1952)). * Properly read Git metadata when running inside workspace ([#1945](#1945)). * Upgrade TF provider to 1.59.0 ([#1960](#1960)). Internal: * Breakout variable lookup into separate files and tests ([#1921](#1921)). * Add golangci-lint v1.62.2 ([#1953](#1953)). Dependency updates: * Bump golang.org/x/term from 0.25.0 to 0.26.0 ([#1907](#1907)). * Bump github.com/Masterminds/semver/v3 from 3.3.0 to 3.3.1 ([#1930](#1930)). * Bump github.com/stretchr/testify from 1.9.0 to 1.10.0 ([#1932](#1932)). * Bump github.com/databricks/databricks-sdk-go from 0.51.0 to 0.52.0 ([#1931](#1931)).
## Changes - Embed struct by value not by pointer in all the resources. - Remove IsNil method from the resource interface and implementations (it's never true). ## Why - Prevents a class of crashes related to nil pointer, like #2776 and #1937 - Simplify user code, no need to check nilness as much. ## Tests Existing tests.
Changes
This PR introduces use of new
isNilmethod. It allows to ensure we filter out all improperly defined resources inbundle summarycommand. This includes deleted resources or resources with incorrect configuration such as only defining key of the resource and nothing else.Fixes#1919, #1913
Tests
Added regression unit test case