databricks-cli/bundle/artifacts
Pieter Noordhuis d3d828d175
Fix glob expansion after running a generic build command (#1662)
## Changes

This didn't work as expected because the generic build mutator called
into the type-specific build mutator in the middle of the function. This
invalidated the `config.Artifact` pointer that was being mutated later
on, effectively hiding these mutations from its caller.

To fix this, I turned glob expansion into its own mutator. It now works
as expected, _and_ produces better errors if the glob patterns are
invalid or do not match files.

## Tests

Unit tests.

Manual verification:
```
% databricks bundle deploy
Building sbt_example...

Error: target/scala-2.12/sbt-e[xam22ple*.jar: syntax error in pattern
  at artifacts.sbt_example.files[1].source
  in databricks.yml:15:17
```
2024-08-07 14:47:03 +00:00
..
whl Fixed incorrectly cleaning up python wheel dist folder (#1656) 2024-08-06 09:54:58 +00:00
all.go Return `diag.Diagnostics` from mutators (#1305) 2024-03-25 14:18:47 +00:00
artifacts.go Split artifact cleanup into prepare step before build (#1618) 2024-07-24 09:13:49 +00:00
artifacts_test.go Allow artifacts (JARs, wheels) to be uploaded to UC Volumes (#1591) 2024-07-16 08:57:04 +00:00
autodetect.go Return `diag.Diagnostics` from mutators (#1305) 2024-03-25 14:18:47 +00:00
build.go Fix glob expansion after running a generic build command (#1662) 2024-08-07 14:47:03 +00:00
expand_globs.go Fix glob expansion after running a generic build command (#1662) 2024-08-07 14:47:03 +00:00
expand_globs_test.go Fix glob expansion after running a generic build command (#1662) 2024-08-07 14:47:03 +00:00
infer.go Return `diag.Diagnostics` from mutators (#1305) 2024-03-25 14:18:47 +00:00
prepare.go Split artifact cleanup into prepare step before build (#1618) 2024-07-24 09:13:49 +00:00
upload.go Allow artifacts (JARs, wheels) to be uploaded to UC Volumes (#1591) 2024-07-16 08:57:04 +00:00
upload_test.go Fix glob expansion after running a generic build command (#1662) 2024-08-07 14:47:03 +00:00