From 30f73fc9f75e0591f7535986b928f5e87dc0f826 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Tue, 17 Jun 2025 16:11:57 +0200 Subject: [PATCH 1/9] Add presets.artifacts_use_dynamic_version setting --- NEXT_CHANGELOG.md | 1 + .../databricks.yml | 12 ++++++ .../artifacts_use_dynamic_version/output.txt | 29 ++++++++++++++ .../artifacts_use_dynamic_version/script | 2 + .../artifacts_use_dynamic_version/test.toml | 1 + .../mutator/artifacts_use_dynamic_version.go | 38 +++++++++++++++++++ bundle/config/presets.go | 3 ++ bundle/internal/schema/annotations.yml | 3 ++ bundle/phases/initialize.go | 5 +++ 9 files changed, 94 insertions(+) create mode 100644 acceptance/bundle/artifacts/artifacts_use_dynamic_version/databricks.yml create mode 100644 acceptance/bundle/artifacts/artifacts_use_dynamic_version/output.txt create mode 100644 acceptance/bundle/artifacts/artifacts_use_dynamic_version/script create mode 100644 acceptance/bundle/artifacts/artifacts_use_dynamic_version/test.toml create mode 100644 bundle/config/mutator/artifacts_use_dynamic_version.go diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index c6e54dc1fe..1ccfacea01 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -13,5 +13,6 @@ * When glob for wheels is used, like "\*.whl", it will filter out different version of the same package and will only take the most recent version. ([#2982](https://github.com/databricks/cli/pull/2982)) * When building Python artifacts as part of "bundle deploy" we no longer delete `dist`, `build`, `*egg-info` and `__pycache__` directories. ([#2982](https://github.com/databricks/cli/pull/2982)) * Fix variable resolution for lookup variables with other references ([#3054](https://github.com/databricks/cli/pull/3054)) +* Added preset `presets.artifacts_use_dynamic_version` that automatically enables `dynamic_version: true` on all "whl" artifacts. ### API Changes diff --git a/acceptance/bundle/artifacts/artifacts_use_dynamic_version/databricks.yml b/acceptance/bundle/artifacts/artifacts_use_dynamic_version/databricks.yml new file mode 100644 index 0000000000..d668e2cba4 --- /dev/null +++ b/acceptance/bundle/artifacts/artifacts_use_dynamic_version/databricks.yml @@ -0,0 +1,12 @@ +bundle: + name: artifacts_use_dynamic_version_test + +presets: + artifacts_use_dynamic_version: true + +artifacts: + first_wheel: + type: whl + second_wheel: + type: jar + build: true diff --git a/acceptance/bundle/artifacts/artifacts_use_dynamic_version/output.txt b/acceptance/bundle/artifacts/artifacts_use_dynamic_version/output.txt new file mode 100644 index 0000000000..1554e79298 --- /dev/null +++ b/acceptance/bundle/artifacts/artifacts_use_dynamic_version/output.txt @@ -0,0 +1,29 @@ + +>>> [CLI] bundle validate +Name: artifacts_use_dynamic_version_test +Target: default +Workspace: + User: [USERNAME] + Path: /Workspace/Users/[USERNAME]/.bundle/artifacts_use_dynamic_version_test/default + +Validation OK! + +>>> [CLI] bundle validate -o json +{ + "first_wheel": { + "build": "python3 setup.py bdist_wheel", + "dynamic_version": true, + "files": [ + { + "source": "[TEST_TMP_DIR]/dist/*.whl" + } + ], + "path": "[TEST_TMP_DIR]", + "type": "whl" + }, + "second_wheel": { + "build": "true", + "path": "[TEST_TMP_DIR]", + "type": "jar" + } +} diff --git a/acceptance/bundle/artifacts/artifacts_use_dynamic_version/script b/acceptance/bundle/artifacts/artifacts_use_dynamic_version/script new file mode 100644 index 0000000000..de4a3edb43 --- /dev/null +++ b/acceptance/bundle/artifacts/artifacts_use_dynamic_version/script @@ -0,0 +1,2 @@ +trace $CLI bundle validate +trace $CLI bundle validate -o json | jq .artifacts diff --git a/acceptance/bundle/artifacts/artifacts_use_dynamic_version/test.toml b/acceptance/bundle/artifacts/artifacts_use_dynamic_version/test.toml new file mode 100644 index 0000000000..a030353d57 --- /dev/null +++ b/acceptance/bundle/artifacts/artifacts_use_dynamic_version/test.toml @@ -0,0 +1 @@ +RecordRequests = false diff --git a/bundle/config/mutator/artifacts_use_dynamic_version.go b/bundle/config/mutator/artifacts_use_dynamic_version.go new file mode 100644 index 0000000000..cbb99e33d2 --- /dev/null +++ b/bundle/config/mutator/artifacts_use_dynamic_version.go @@ -0,0 +1,38 @@ +package mutator + +import ( + "context" + + "github.com/databricks/cli/bundle" + "github.com/databricks/cli/libs/diag" +) + +type artifactsUseDynamicVersion struct{} + +// ApplyArtifactsUseDynamicVersion configures all artifacts to use dynamic_version when the preset is enabled. +func ApplyArtifactsUseDynamicVersion() bundle.Mutator { + return &artifactsUseDynamicVersion{} +} + +func (m *artifactsUseDynamicVersion) Name() string { + return "ApplyArtifactsUseDynamicVersion" +} + +func (m *artifactsUseDynamicVersion) Apply(ctx context.Context, b *bundle.Bundle) diag.Diagnostics { + if !b.Config.Presets.ArtifactsUseDynamicVersion { + return nil + } + + for _, a := range b.Config.Artifacts { + if a == nil { + continue + } + if a.Type != "whl" { + // This has no effect since we only apply DynamicVersion if type is "whl" but it makes output cleaner. + continue + } + a.DynamicVersion = true + } + + return nil +} diff --git a/bundle/config/presets.go b/bundle/config/presets.go index 252c5b5f74..b3e6e9eeb7 100644 --- a/bundle/config/presets.go +++ b/bundle/config/presets.go @@ -24,6 +24,9 @@ type Presets struct { // File synchronization to ${workspace.file_path} is skipped. SourceLinkedDeployment *bool `json:"source_linked_deployment,omitempty"` + // ArtifactsUseDynamicVersion enables dynamic_version on every artifact. + ArtifactsUseDynamicVersion bool `json:"artifacts_use_dynamic_version,omitempty"` + // Tags to add to all resources. Tags map[string]string `json:"tags,omitempty"` } diff --git a/bundle/internal/schema/annotations.yml b/bundle/internal/schema/annotations.yml index c68bca50f9..bba6fc8779 100644 --- a/bundle/internal/schema/annotations.yml +++ b/bundle/internal/schema/annotations.yml @@ -104,6 +104,9 @@ github.com/databricks/cli/bundle/config.Lock: "description": |- Whether to force this lock if it is enabled. github.com/databricks/cli/bundle/config.Presets: + "artifacts_use_dynamic_version": + "description": |- + Whether to enable dynamic_version on all artifacts. "jobs_max_concurrent_runs": "description": |- The maximum concurrent runs for a job. diff --git a/bundle/phases/initialize.go b/bundle/phases/initialize.go index c3d3d27656..a4c03b6234 100644 --- a/bundle/phases/initialize.go +++ b/bundle/phases/initialize.go @@ -151,6 +151,11 @@ func Initialize(ctx context.Context, b *bundle.Bundle) diag.Diagnostics { // Provides warnings when Python wheel tasks are used with DBR < 13.3 or when wheel wrapper is incompatible with source-linked deployment trampoline.WrapperWarning(), + // Reads (typed): b.Config.Presets.ArtifactsUseDynamicVersion (checks if artifacts preset is enabled) + // Updates (typed): b.Config.Artifacts[].DynamicVersion (sets to true when preset is enabled) + // Applies the artifacts_use_dynamic_version preset to enable dynamic versioning on all artifacts + mutator.ApplyArtifactsUseDynamicVersion(), + // Reads (typed): b.Config.Artifacts, b.BundleRootPath (checks artifact configurations and bundle path) // Updates (typed): b.Config.Artifacts (auto-creates Python wheel artifact if none defined but setup.py exists) // Updates (dynamic): artifacts.*.{path,build_command,files.*.source} (sets default paths, build commands, and makes relative paths absolute) From 98ac1561c2f817356ffc8aca92940537ce5d6f4e Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Tue, 17 Jun 2025 20:25:30 +0200 Subject: [PATCH 2/9] update schema and acc test --- acceptance/bundle/debug/out.stderr.txt | 1 + bundle/schema/jsonschema.json | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/acceptance/bundle/debug/out.stderr.txt b/acceptance/bundle/debug/out.stderr.txt index 9e72c92fe2..ac5fd826b7 100644 --- a/acceptance/bundle/debug/out.stderr.txt +++ b/acceptance/bundle/debug/out.stderr.txt @@ -52,6 +52,7 @@ 10:07:59 Debug: Apply pid=12345 mutator=CheckPermissions 10:07:59 Debug: Apply pid=12345 mutator=TranslatePaths 10:07:59 Debug: Apply pid=12345 mutator=PythonWrapperWarning +10:07:59 Debug: Apply pid=12345 mutator=ApplyArtifactsUseDynamicVersion 10:07:59 Debug: Apply pid=12345 mutator=artifacts.Prepare 10:07:59 Info: No local tasks in databricks.yml config, skipping auto detect pid=12345 mutator=artifacts.Prepare 10:07:59 Debug: Apply pid=12345 mutator=apps.Validate diff --git a/bundle/schema/jsonschema.json b/bundle/schema/jsonschema.json index 5b220c5c0b..e6c1db1513 100644 --- a/bundle/schema/jsonschema.json +++ b/bundle/schema/jsonschema.json @@ -1795,6 +1795,10 @@ { "type": "object", "properties": { + "artifacts_use_dynamic_version": { + "description": "Whether to enable dynamic_version on all artifacts.", + "$ref": "#/$defs/bool" + }, "jobs_max_concurrent_runs": { "description": "The maximum concurrent runs for a job.", "$ref": "#/$defs/int" From df46e7cf8091a49e180f025dd6e3cbe00a180776 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Tue, 17 Jun 2025 20:26:37 +0200 Subject: [PATCH 3/9] clean up test --- .../artifacts_use_dynamic_version/output.txt | 11 ----------- .../artifacts/artifacts_use_dynamic_version/script | 3 +-- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/acceptance/bundle/artifacts/artifacts_use_dynamic_version/output.txt b/acceptance/bundle/artifacts/artifacts_use_dynamic_version/output.txt index 1554e79298..3c0f1add81 100644 --- a/acceptance/bundle/artifacts/artifacts_use_dynamic_version/output.txt +++ b/acceptance/bundle/artifacts/artifacts_use_dynamic_version/output.txt @@ -1,14 +1,3 @@ - ->>> [CLI] bundle validate -Name: artifacts_use_dynamic_version_test -Target: default -Workspace: - User: [USERNAME] - Path: /Workspace/Users/[USERNAME]/.bundle/artifacts_use_dynamic_version_test/default - -Validation OK! - ->>> [CLI] bundle validate -o json { "first_wheel": { "build": "python3 setup.py bdist_wheel", diff --git a/acceptance/bundle/artifacts/artifacts_use_dynamic_version/script b/acceptance/bundle/artifacts/artifacts_use_dynamic_version/script index de4a3edb43..c3ba9bd25f 100644 --- a/acceptance/bundle/artifacts/artifacts_use_dynamic_version/script +++ b/acceptance/bundle/artifacts/artifacts_use_dynamic_version/script @@ -1,2 +1 @@ -trace $CLI bundle validate -trace $CLI bundle validate -o json | jq .artifacts +$CLI bundle validate -o json | jq .artifacts From 8eb6064c8a3b8548f8d59bd52be4181bf57f4c31 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Tue, 17 Jun 2025 21:56:27 +0200 Subject: [PATCH 4/9] Update bundle/config/presets.go Co-authored-by: Julia Crawford (Databricks) --- bundle/config/presets.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundle/config/presets.go b/bundle/config/presets.go index b3e6e9eeb7..d39df75cf5 100644 --- a/bundle/config/presets.go +++ b/bundle/config/presets.go @@ -25,7 +25,7 @@ type Presets struct { SourceLinkedDeployment *bool `json:"source_linked_deployment,omitempty"` // ArtifactsUseDynamicVersion enables dynamic_version on every artifact. - ArtifactsUseDynamicVersion bool `json:"artifacts_use_dynamic_version,omitempty"` + ArtifactsUseDynamicVersion bool `json:"artifacts_dynamic_version,omitempty"` // Tags to add to all resources. Tags map[string]string `json:"tags,omitempty"` From a74920b6dfb07c0644f4307ed2e3ffce6dc86a26 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Tue, 17 Jun 2025 22:46:56 +0200 Subject: [PATCH 5/9] rename everywhere --- NEXT_CHANGELOG.md | 2 +- .../artifacts_use_dynamic_version/databricks.yml | 4 ++-- acceptance/bundle/debug/out.stderr.txt | 2 +- bundle/config/mutator/artifacts_use_dynamic_version.go | 8 ++++---- bundle/config/presets.go | 4 ++-- bundle/internal/schema/annotations.yml | 2 +- bundle/phases/initialize.go | 6 +++--- bundle/schema/jsonschema.json | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index 1ccfacea01..a51678b621 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -13,6 +13,6 @@ * When glob for wheels is used, like "\*.whl", it will filter out different version of the same package and will only take the most recent version. ([#2982](https://github.com/databricks/cli/pull/2982)) * When building Python artifacts as part of "bundle deploy" we no longer delete `dist`, `build`, `*egg-info` and `__pycache__` directories. ([#2982](https://github.com/databricks/cli/pull/2982)) * Fix variable resolution for lookup variables with other references ([#3054](https://github.com/databricks/cli/pull/3054)) -* Added preset `presets.artifacts_use_dynamic_version` that automatically enables `dynamic_version: true` on all "whl" artifacts. +* Added preset `presets.artifacts_dynamic_version` that automatically enables `dynamic_version: true` on all "whl" artifacts. ### API Changes diff --git a/acceptance/bundle/artifacts/artifacts_use_dynamic_version/databricks.yml b/acceptance/bundle/artifacts/artifacts_use_dynamic_version/databricks.yml index d668e2cba4..a11dae456f 100644 --- a/acceptance/bundle/artifacts/artifacts_use_dynamic_version/databricks.yml +++ b/acceptance/bundle/artifacts/artifacts_use_dynamic_version/databricks.yml @@ -1,8 +1,8 @@ bundle: - name: artifacts_use_dynamic_version_test + name: artifacts_dynamic_version_test presets: - artifacts_use_dynamic_version: true + artifacts_dynamic_version: true artifacts: first_wheel: diff --git a/acceptance/bundle/debug/out.stderr.txt b/acceptance/bundle/debug/out.stderr.txt index ac5fd826b7..614238bf53 100644 --- a/acceptance/bundle/debug/out.stderr.txt +++ b/acceptance/bundle/debug/out.stderr.txt @@ -52,7 +52,7 @@ 10:07:59 Debug: Apply pid=12345 mutator=CheckPermissions 10:07:59 Debug: Apply pid=12345 mutator=TranslatePaths 10:07:59 Debug: Apply pid=12345 mutator=PythonWrapperWarning -10:07:59 Debug: Apply pid=12345 mutator=ApplyArtifactsUseDynamicVersion +10:07:59 Debug: Apply pid=12345 mutator=ApplyArtifactsDynamicVersion 10:07:59 Debug: Apply pid=12345 mutator=artifacts.Prepare 10:07:59 Info: No local tasks in databricks.yml config, skipping auto detect pid=12345 mutator=artifacts.Prepare 10:07:59 Debug: Apply pid=12345 mutator=apps.Validate diff --git a/bundle/config/mutator/artifacts_use_dynamic_version.go b/bundle/config/mutator/artifacts_use_dynamic_version.go index cbb99e33d2..9d66a7619b 100644 --- a/bundle/config/mutator/artifacts_use_dynamic_version.go +++ b/bundle/config/mutator/artifacts_use_dynamic_version.go @@ -9,17 +9,17 @@ import ( type artifactsUseDynamicVersion struct{} -// ApplyArtifactsUseDynamicVersion configures all artifacts to use dynamic_version when the preset is enabled. -func ApplyArtifactsUseDynamicVersion() bundle.Mutator { +// ApplyArtifactsDynamicVersion configures all artifacts to use dynamic_version when the preset is enabled. +func ApplyArtifactsDynamicVersion() bundle.Mutator { return &artifactsUseDynamicVersion{} } func (m *artifactsUseDynamicVersion) Name() string { - return "ApplyArtifactsUseDynamicVersion" + return "ApplyArtifactsDynamicVersion" } func (m *artifactsUseDynamicVersion) Apply(ctx context.Context, b *bundle.Bundle) diag.Diagnostics { - if !b.Config.Presets.ArtifactsUseDynamicVersion { + if !b.Config.Presets.ArtifactsDynamicVersion { return nil } diff --git a/bundle/config/presets.go b/bundle/config/presets.go index d39df75cf5..46562067ae 100644 --- a/bundle/config/presets.go +++ b/bundle/config/presets.go @@ -24,8 +24,8 @@ type Presets struct { // File synchronization to ${workspace.file_path} is skipped. SourceLinkedDeployment *bool `json:"source_linked_deployment,omitempty"` - // ArtifactsUseDynamicVersion enables dynamic_version on every artifact. - ArtifactsUseDynamicVersion bool `json:"artifacts_dynamic_version,omitempty"` + // ArtifactsDynamicVersion enables dynamic_version on every artifact. + ArtifactsDynamicVersion bool `json:"artifacts_dynamic_version,omitempty"` // Tags to add to all resources. Tags map[string]string `json:"tags,omitempty"` diff --git a/bundle/internal/schema/annotations.yml b/bundle/internal/schema/annotations.yml index bba6fc8779..a7ab9a8ba5 100644 --- a/bundle/internal/schema/annotations.yml +++ b/bundle/internal/schema/annotations.yml @@ -104,7 +104,7 @@ github.com/databricks/cli/bundle/config.Lock: "description": |- Whether to force this lock if it is enabled. github.com/databricks/cli/bundle/config.Presets: - "artifacts_use_dynamic_version": + "artifacts_dynamic_version": "description": |- Whether to enable dynamic_version on all artifacts. "jobs_max_concurrent_runs": diff --git a/bundle/phases/initialize.go b/bundle/phases/initialize.go index a4c03b6234..7af9d61329 100644 --- a/bundle/phases/initialize.go +++ b/bundle/phases/initialize.go @@ -151,10 +151,10 @@ func Initialize(ctx context.Context, b *bundle.Bundle) diag.Diagnostics { // Provides warnings when Python wheel tasks are used with DBR < 13.3 or when wheel wrapper is incompatible with source-linked deployment trampoline.WrapperWarning(), - // Reads (typed): b.Config.Presets.ArtifactsUseDynamicVersion (checks if artifacts preset is enabled) + // Reads (typed): b.Config.Presets.ArtifactsDynamicVersion (checks if artifacts preset is enabled) // Updates (typed): b.Config.Artifacts[].DynamicVersion (sets to true when preset is enabled) - // Applies the artifacts_use_dynamic_version preset to enable dynamic versioning on all artifacts - mutator.ApplyArtifactsUseDynamicVersion(), + // Applies the artifacts_dynamic_version preset to enable dynamic versioning on all artifacts + mutator.ApplyArtifactsDynamicVersion(), // Reads (typed): b.Config.Artifacts, b.BundleRootPath (checks artifact configurations and bundle path) // Updates (typed): b.Config.Artifacts (auto-creates Python wheel artifact if none defined but setup.py exists) diff --git a/bundle/schema/jsonschema.json b/bundle/schema/jsonschema.json index e6c1db1513..517766be58 100644 --- a/bundle/schema/jsonschema.json +++ b/bundle/schema/jsonschema.json @@ -1795,7 +1795,7 @@ { "type": "object", "properties": { - "artifacts_use_dynamic_version": { + "artifacts_dynamic_version": { "description": "Whether to enable dynamic_version on all artifacts.", "$ref": "#/$defs/bool" }, From 2604d03d5f63abf8ab7fc375d203b17a5c7aa358 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Wed, 18 Jun 2025 09:51:12 +0200 Subject: [PATCH 6/9] rename --- .../databricks.yml | 0 .../output.txt | 0 .../script | 0 .../test.toml | 0 ...ifacts_use_dynamic_version.go => artifacts_dynamic_version.go} | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename acceptance/bundle/artifacts/{artifacts_use_dynamic_version => artifacts_dynamic_version}/databricks.yml (100%) rename acceptance/bundle/artifacts/{artifacts_use_dynamic_version => artifacts_dynamic_version}/output.txt (100%) rename acceptance/bundle/artifacts/{artifacts_use_dynamic_version => artifacts_dynamic_version}/script (100%) rename acceptance/bundle/artifacts/{artifacts_use_dynamic_version => artifacts_dynamic_version}/test.toml (100%) rename bundle/config/mutator/{artifacts_use_dynamic_version.go => artifacts_dynamic_version.go} (100%) diff --git a/acceptance/bundle/artifacts/artifacts_use_dynamic_version/databricks.yml b/acceptance/bundle/artifacts/artifacts_dynamic_version/databricks.yml similarity index 100% rename from acceptance/bundle/artifacts/artifacts_use_dynamic_version/databricks.yml rename to acceptance/bundle/artifacts/artifacts_dynamic_version/databricks.yml diff --git a/acceptance/bundle/artifacts/artifacts_use_dynamic_version/output.txt b/acceptance/bundle/artifacts/artifacts_dynamic_version/output.txt similarity index 100% rename from acceptance/bundle/artifacts/artifacts_use_dynamic_version/output.txt rename to acceptance/bundle/artifacts/artifacts_dynamic_version/output.txt diff --git a/acceptance/bundle/artifacts/artifacts_use_dynamic_version/script b/acceptance/bundle/artifacts/artifacts_dynamic_version/script similarity index 100% rename from acceptance/bundle/artifacts/artifacts_use_dynamic_version/script rename to acceptance/bundle/artifacts/artifacts_dynamic_version/script diff --git a/acceptance/bundle/artifacts/artifacts_use_dynamic_version/test.toml b/acceptance/bundle/artifacts/artifacts_dynamic_version/test.toml similarity index 100% rename from acceptance/bundle/artifacts/artifacts_use_dynamic_version/test.toml rename to acceptance/bundle/artifacts/artifacts_dynamic_version/test.toml diff --git a/bundle/config/mutator/artifacts_use_dynamic_version.go b/bundle/config/mutator/artifacts_dynamic_version.go similarity index 100% rename from bundle/config/mutator/artifacts_use_dynamic_version.go rename to bundle/config/mutator/artifacts_dynamic_version.go From b0dafd7b02951d1530a3e2512d0b681f9ccbde91 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Wed, 18 Jun 2025 09:51:48 +0200 Subject: [PATCH 7/9] clean up --- .../bundle/artifacts/artifacts_dynamic_version/databricks.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/acceptance/bundle/artifacts/artifacts_dynamic_version/databricks.yml b/acceptance/bundle/artifacts/artifacts_dynamic_version/databricks.yml index a11dae456f..e4bea3e823 100644 --- a/acceptance/bundle/artifacts/artifacts_dynamic_version/databricks.yml +++ b/acceptance/bundle/artifacts/artifacts_dynamic_version/databricks.yml @@ -1,6 +1,3 @@ -bundle: - name: artifacts_dynamic_version_test - presets: artifacts_dynamic_version: true From 832995143f542c5624d57b347f589df3b1f4a3e2 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Wed, 18 Jun 2025 10:39:24 +0200 Subject: [PATCH 8/9] use uv since it's similar command; replace slashes --- .../bundle/artifacts/artifacts_dynamic_version/databricks.yml | 1 + .../bundle/artifacts/artifacts_dynamic_version/output.txt | 2 +- .../bundle/artifacts/artifacts_dynamic_version/test.toml | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/acceptance/bundle/artifacts/artifacts_dynamic_version/databricks.yml b/acceptance/bundle/artifacts/artifacts_dynamic_version/databricks.yml index e4bea3e823..c2134924c2 100644 --- a/acceptance/bundle/artifacts/artifacts_dynamic_version/databricks.yml +++ b/acceptance/bundle/artifacts/artifacts_dynamic_version/databricks.yml @@ -4,6 +4,7 @@ presets: artifacts: first_wheel: type: whl + build: uv build --wheel second_wheel: type: jar build: true diff --git a/acceptance/bundle/artifacts/artifacts_dynamic_version/output.txt b/acceptance/bundle/artifacts/artifacts_dynamic_version/output.txt index 3c0f1add81..8b4936fa85 100644 --- a/acceptance/bundle/artifacts/artifacts_dynamic_version/output.txt +++ b/acceptance/bundle/artifacts/artifacts_dynamic_version/output.txt @@ -1,6 +1,6 @@ { "first_wheel": { - "build": "python3 setup.py bdist_wheel", + "build": "uv build --wheel", "dynamic_version": true, "files": [ { diff --git a/acceptance/bundle/artifacts/artifacts_dynamic_version/test.toml b/acceptance/bundle/artifacts/artifacts_dynamic_version/test.toml index a030353d57..a17f2659f2 100644 --- a/acceptance/bundle/artifacts/artifacts_dynamic_version/test.toml +++ b/acceptance/bundle/artifacts/artifacts_dynamic_version/test.toml @@ -1 +1,5 @@ RecordRequests = false + +[[Repls]] +Old = '\\' +New = '/' From 0b8fd2f27f026f22536d83d3e846efb4faef5725 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Wed, 18 Jun 2025 11:04:32 +0200 Subject: [PATCH 9/9] slash --- acceptance/bundle/artifacts/artifacts_dynamic_version/test.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acceptance/bundle/artifacts/artifacts_dynamic_version/test.toml b/acceptance/bundle/artifacts/artifacts_dynamic_version/test.toml index a17f2659f2..93ee159927 100644 --- a/acceptance/bundle/artifacts/artifacts_dynamic_version/test.toml +++ b/acceptance/bundle/artifacts/artifacts_dynamic_version/test.toml @@ -1,5 +1,5 @@ RecordRequests = false [[Repls]] -Old = '\\' +Old = '\\\\' New = '/'