You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d3e5dde
Browse filesBrowse the repository at this point in the historyBrowse files
bundle: read and edit the typed config in five mutators (#7145)
## Changes
Five mutators now read and edit the typed config directly instead of
going through `b.Config.Mutate`:
- `PrependWorkspacePrefix`: the `workspace.*_path` fields.
- `ApplyBundlePermissions`: the `permissions` field of each supported
resource.
- `ExpandPipelineGlobPaths`: pipeline `libraries`.
- `ProcessStaticResources`: lists resource keys from the typed
`Resources`.
- `ProcessRootIncludes`: writes the expanded include list after the
included files are merged, because merging reloads the typed config from
the dynamic tree.
Split out of #7098.
## Why
This is a step toward removing `dyn` from the mutator pipeline. Mutators
that edit typed config are simpler and don't need to convert between the
two forms.
## Intentional behavior notes
- (a) Invalid-permission-level warnings now show their source location
(`in databricks.yml:L:C`). Before, `ApplyBundlePermissions` rebuilt the
permissions without locations. One golden changed because of this.
- (b) `ApplyBundlePermissions` now walks resource names in sorted order.
This only changes the order of overlap warnings.
- (c) Expanded include items, and pipeline libraries after glob
expansion, now get the location of the original entry at the same index.
Before, they had no location.
- (d) In typed config, a library with both notebook and file and an
explicit `notebook.path: ""` looks the same as one with no notebook
path.
## Tests
- New unit tests for the edge cases: empty and unset
permissions/libraries, library order, includes of included files, and
resource keys for every resource type. They pass on both the old and the
new code.
- The full `TestAccept/bundle` suite ran locally. The only golden diff
is the one in `validate/secret_scope_invalid_permission_level`.
This pull request and its description were written by Isaac.
---------
Co-authored-by: Isaac <no-reply@databricks.com>
0 commit comments