Uh oh!
There was an error while loading. Please reload this page.
Raise an error when there are multiple local libraries with the same basename used - #2382
Conversation
| var err error | ||
| for _, pattern := range patterns { | ||
| v, err = dyn.MapByPattern(v, pattern, func(p dyn.Path, lv dyn.Value) (dyn.Value, error) { | ||
| libPath, ok := lv.AsString() |
There was a problem hiding this comment.
Changed from MustString to AsString to avoid potential panic which led to the breakage before
| v, err = dyn.MapByPattern(v, pattern, func(p dyn.Path, lv dyn.Value) (dyn.Value, error) { | ||
| libPath, ok := lv.AsString() | ||
| if !ok { | ||
| return lv, nil |
There was a problem hiding this comment.
return correct map here (lv instead of v) which lead to the issue before
## Changes Added PyPi and Maven libraries tests Needed for this PR since we don't currently have any coverage for PyPi or Maven libraries #2382
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| type checkForSameNameLibraries struct{} | ||
| var patterns = []dyn.Pattern{ |
There was a problem hiding this comment.
We can inline this since it's only used in one location?
| return libraryValue, nil | ||
| } | ||
| lib := filepath.Base(libPath) |
There was a problem hiding this comment.
nit:
| lib:=filepath.Base(libPath) | |
| name:=filepath.Base(libPath) |
| var patterns = []dyn.Pattern{ | ||
| taskLibrariesPattern.Append(dyn.AnyIndex(), dyn.AnyKey()), | ||
| forEachTaskLibrariesPattern.Append(dyn.AnyIndex(), dyn.AnyKey()), | ||
| envDepsPattern.Append(dyn.AnyIndex()), |
There was a problem hiding this comment.
Q: this matches on any key, but we know it only works for "whl" and "jar" (and maybe more).
Could the pattern be more specific to reflect this?
) ## Changes Added PyPi and Maven libraries tests Needed for this PR since we don't currently have any coverage for PyPi or Maven libraries databricks#2382
…basename used (databricks#2382) ## Changes It could happen that there are multiple artifacts defined in the bundle which build and therefore deploy wheel packages with the same name. This leads to conflict between these packages, they will overwrite each other and therefore they should have different names instead Fixesdatabricks#1674 Previous attempt (databricks#2297 + databricks#2341) led to the breakage, this PR fixes both issues. ## Tests Added acceptance test
CLI: * Upgrade Go SDK to 0.59.0 ([#2425](#2425)). Bundles: * Added a warning when `config` section is used in apps ([#2416](#2416)). * Switch to use GET workspaces-files/{name} instead of workspace/export for state files to avoid 10MB limit ([#2423](#2423)). * Use schema field for pipeline in builtin template ([#2347](#2347)). * Add warning when variable interpolation is used for auth fields ([#2399](#2399)). * Add warning when include is used in config files other than databricks.yml ([#2389](#2389)). * Add support for schemas in deployment bind/unbind commands ([#2406](#2406)). * Do not modify/create .gitignore in bundle root ([#2429](#2429)). * Raise an error when there are multiple local libraries with the same basename used ([#2382](#2382)). * Upgrade TF provider to 1.68.0 ([#2426](#2426)). API Changes: * Changed `databricks experiments log-inputs` command with new required argument order. * Added `databricks genie get-space` command. * Added `databricks providers list-provider-share-assets` command. * Changed `databricks shares update-permissions` command return type to become non-empty. OpenAPI commit e5c870006a536121442cfd2441bdc8a5fb76ae1e (2025-03-03)
CLI: * Upgrade Go SDK to 0.59.0 ([#2425](#2425)). Bundles: * Added a warning when `config` section is used in apps ([#2416](#2416)). * Switch to use GET workspaces-files/{name} instead of workspace/export for state files to avoid 10MB limit ([#2423](#2423)). * Use schema field for pipeline in builtin template ([#2347](#2347)). * Add warning when variable interpolation is used for auth fields ([#2399](#2399)). * Add warning when include is used in config files other than databricks.yml ([#2389](#2389)). * Add support for schemas in deployment bind/unbind commands ([#2406](#2406)). * Do not modify/create .gitignore in bundle root ([#2429](#2429)). * Raise an error when there are multiple local libraries with the same basename used ([#2382](#2382)). * Upgrade TF provider to 1.68.0 ([#2426](#2426)). API Changes: * Changed `databricks experiments log-inputs` command with new required argument order. * Added `databricks genie get-space` command. * Added `databricks providers list-provider-share-assets` command. * Changed `databricks shares update-permissions` command return type to become non-empty. OpenAPI commit e5c870006a536121442cfd2441bdc8a5fb76ae1e (2025-03-03)
## Changes Added PyPi and Maven libraries tests Needed for this PR since we don't currently have any coverage for PyPi or Maven libraries #2382
…basename used (#2382) ## Changes It could happen that there are multiple artifacts defined in the bundle which build and therefore deploy wheel packages with the same name. This leads to conflict between these packages, they will overwrite each other and therefore they should have different names instead Fixes#1674 Previous attempt (#2297 + #2341) led to the breakage, this PR fixes both issues. ## Tests Added acceptance test
CLI: * Upgrade Go SDK to 0.59.0 ([#2425](#2425)). Bundles: * Added a warning when `config` section is used in apps ([#2416](#2416)). * Switch to use GET workspaces-files/{name} instead of workspace/export for state files to avoid 10MB limit ([#2423](#2423)). * Use schema field for pipeline in builtin template ([#2347](#2347)). * Add warning when variable interpolation is used for auth fields ([#2399](#2399)). * Add warning when include is used in config files other than databricks.yml ([#2389](#2389)). * Add support for schemas in deployment bind/unbind commands ([#2406](#2406)). * Do not modify/create .gitignore in bundle root ([#2429](#2429)). * Raise an error when there are multiple local libraries with the same basename used ([#2382](#2382)). * Upgrade TF provider to 1.68.0 ([#2426](#2426)). API Changes: * Changed `databricks experiments log-inputs` command with new required argument order. * Added `databricks genie get-space` command. * Added `databricks providers list-provider-share-assets` command. * Changed `databricks shares update-permissions` command return type to become non-empty. OpenAPI commit e5c870006a536121442cfd2441bdc8a5fb76ae1e (2025-03-03)
Changes
It could happen that there are multiple artifacts defined in the bundle which build and therefore deploy wheel packages with the same name. This leads to conflict between these packages, they will overwrite each other and therefore they should have different names instead
Fixes#1674
Previous attempt (#2297 + #2341) led to the breakage, this PR fixes both issues.
Tests
Added acceptance test