Skip to content

Commit 1886abc

Browse files
authored
Merge branch 'main' into run-events-2
2 parents c160636 + 5fe0428 commit 1886abc

File tree

60 files changed

+888
-188
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+888
-188
lines changed

.github/workflows/push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
- name: Install uv
7070
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
7171
with:
72-
version: "0.6.5"
72+
version: "0.8.9"
7373

7474
- name: Pull external libraries
7575
run: |

.release_metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"timestamp": "2025-08-06 13:16:04+0000"
2+
"timestamp": "2025-08-13 13:52:17+0000"
33
}

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Version changelog
22

3+
## Release v0.264.0
4+
5+
### Dependency updates
6+
* Upgrade TF provider to 1.86.0 ([#3374](https://github.com/databricks/cli/pull/3374))
7+
* Update Go SDK to 0.79.0 ([#3376](https://github.com/databricks/cli/pull/3376))
8+
9+
### CLI
10+
* Fixed panic when providing a CLI command with an incorrect JSON input ([#3398](https://github.com/databricks/cli/pull/3398))
11+
12+
### Bundles
13+
* Changed logic for resolving `${resources...}` references. Previously this would be done by terraform at deploy time. Now if it references a field that is present in the config, it will be done by DABs during bundle loading ([#3370](https://github.com/databricks/cli/pull/3370))
14+
* Add support for tagging pipelines ([#3086](https://github.com/databricks/cli/pull/3086))
15+
* Add warning for when an invalid value is specified for an enum field ([#3050](https://github.com/databricks/cli/pull/3050))
16+
* Add support for running specified job tasks instead of all job tasks ([#3388](https://github.com/databricks/cli/pull/3388))
17+
18+
319
## Release v0.263.0
420

521
### CLI

NEXT_CHANGELOG.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
# NEXT CHANGELOG
22

3-
## Release v0.264.0
3+
## Release v0.265.0
44

55
### Notable Changes
66

77
### Dependency updates
8-
* Upgrade TF provider to 1.86.0 ([#3374](https://github.com/databricks/cli/pull/3374))
9-
* Update Go SDK to 0.79.0 ([#3376](https://github.com/databricks/cli/pull/3376))
108

119
### CLI
1210

1311
### Bundles
14-
* Changed logic for resolving `${resources...}` references. Previously this would be done by terraform at deploy time. Now if it references a field that is present in the config, it will be done by DABs during bundle loading ([#3370](https://github.com/databricks/cli/pull/3370))
15-
* Add support for tagging pipelines ([#3086](https://github.com/databricks/cli/pull/3086))
16-
* Add warning for when an invalid value is specified for an enum field ([#3050](https://github.com/databricks/cli/pull/3050))
1712

1813
### API Changes

acceptance/acceptance_test.go

Lines changed: 93 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package acceptance_test
22

33
import (
4+
"archive/zip"
45
"bufio"
56
"context"
67
"encoding/base32"
@@ -44,6 +45,7 @@ var (
4445
LogRequests bool
4546
LogConfig bool
4647
SkipLocal bool
48+
UseVersion string
4749
)
4850

4951
// In order to debug CLI running under acceptance test, search for TestInprocessMode and update
@@ -64,6 +66,7 @@ func init() {
6466
flag.BoolVar(&LogRequests, "logrequests", false, "Log request and responses from testserver")
6567
flag.BoolVar(&LogConfig, "logconfig", false, "Log merged for each test case")
6668
flag.BoolVar(&SkipLocal, "skiplocal", false, "Skip tests that are enabled to run on Local")
69+
flag.StringVar(&UseVersion, "useversion", "", "Download previously released version of CLI and use it to run the tests")
6770
}
6871

6972
const (
@@ -166,7 +169,11 @@ func testAccept(t *testing.T, inprocessMode bool, singleTest string) int {
166169
t.Setenv("CMD_SERVER_URL", cmdServer.URL)
167170
execPath = filepath.Join(cwd, "bin", "callserver.py")
168171
} else {
169-
execPath = BuildCLI(t, buildDir, coverDir)
172+
if UseVersion != "" {
173+
execPath = DownloadCLI(t, buildDir, UseVersion)
174+
} else {
175+
execPath = BuildCLI(t, buildDir, coverDir)
176+
}
170177
}
171178

172179
BuildYamlfmt(t)
@@ -270,6 +277,14 @@ func testAccept(t *testing.T, inprocessMode bool, singleTest string) int {
270277
config, configPath := internal.LoadConfig(t, dir)
271278
skipReason := getSkipReason(&config, configPath)
272279

280+
if testdiff.OverwriteMode {
281+
// Generate materialized config for this test
282+
// We do this before skipping the test, so the configs are generated for all tests.
283+
materializedConfig, err := internal.GenerateMaterializedConfig(config)
284+
require.NoError(t, err)
285+
testutil.WriteFile(t, filepath.Join(dir, internal.MaterializedConfigFile), materializedConfig)
286+
}
287+
273288
if skipReason != "" {
274289
skippedDirs += 1
275290
t.Skip(skipReason)
@@ -819,6 +834,83 @@ func BuildCLI(t *testing.T, buildDir, coverDir string) string {
819834
return execPath
820835
}
821836

837+
// DownloadCLI downloads a released CLI binary archive for the given version,
838+
// extracts the executable, and returns its path.
839+
func DownloadCLI(t *testing.T, buildDir, version string) string {
840+
// Prepare target directory for this version
841+
versionDir := filepath.Join(buildDir, version)
842+
require.NoError(t, os.MkdirAll(versionDir, 0o755))
843+
844+
execName := "databricks"
845+
if runtime.GOOS == "windows" {
846+
execName += ".exe"
847+
}
848+
execPath := filepath.Join(versionDir, execName)
849+
850+
// If already downloaded, reuse
851+
if _, err := os.Stat(execPath); err == nil {
852+
return execPath
853+
}
854+
855+
osName := runtime.GOOS
856+
archName := runtime.GOARCH
857+
858+
// Compose archive name per release naming scheme
859+
archiveName := fmt.Sprintf("databricks_cli_%s_%s_%s.zip", version, osName, archName)
860+
url := fmt.Sprintf("https://github.com/databricks/cli/releases/download/v%s/%s", version, archiveName)
861+
zipPath := filepath.Join(versionDir, archiveName)
862+
863+
downloadToFile(t, url, zipPath)
864+
extractFileFromZip(t, zipPath, execName, versionDir)
865+
866+
return execPath
867+
}
868+
869+
// downloadToFile downloads contents from url into the given destination path
870+
func downloadToFile(t *testing.T, url, destPath string) {
871+
require.NoError(t, os.MkdirAll(filepath.Dir(destPath), 0o755))
872+
out, err := os.Create(destPath)
873+
require.NoError(t, err)
874+
defer out.Close()
875+
876+
resp, err := http.Get(url)
877+
require.NoError(t, err)
878+
defer resp.Body.Close()
879+
require.Equal(t, http.StatusOK, resp.StatusCode, "failed to download %s: %s", url, resp.Status)
880+
881+
_, err = io.Copy(out, resp.Body)
882+
require.NoError(t, err)
883+
}
884+
885+
// extractFileFromZip finds a file by name inside a zip archive and writes it
886+
// into destDir using the file's base name. Fails the test if not found.
887+
func extractFileFromZip(t *testing.T, zipPath, fileName, destDir string) {
888+
r, err := zip.OpenReader(zipPath)
889+
require.NoError(t, err)
890+
defer r.Close()
891+
892+
targetBase := filepath.Base(fileName)
893+
destPath := filepath.Join(destDir, targetBase)
894+
var found bool
895+
for _, f := range r.File {
896+
if filepath.Base(f.Name) != targetBase {
897+
continue
898+
}
899+
rc, err := f.Open()
900+
require.NoError(t, err)
901+
defer rc.Close()
902+
903+
out, err := os.OpenFile(destPath, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0o755)
904+
require.NoError(t, err)
905+
_, err = io.Copy(out, rc)
906+
_ = out.Close()
907+
require.NoError(t, err)
908+
found = true
909+
break
910+
}
911+
require.True(t, found, "file %s not found in archive %s", targetBase, zipPath)
912+
}
913+
822914
func copyFile(src, dst string) error {
823915
in, err := os.Open(src)
824916
if err != nil {

acceptance/bundle/help/bundle-run/output.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Usage:
3838
databricks bundle run [flags] [KEY]
3939

4040
Job Flags:
41+
--only strings comma separated list of task keys to run
4142
--params stringToString comma separated k=v pairs for job parameters (default [])
4243

4344
Job Task Flags:

acceptance/bundle/integration_whl/custom_params/out.test.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ Cloud = true
33
CloudSlow = true
44

55
[EnvMatrix]
6-
DATABRICKS_CLI_DEPLOYMENT = ["terraform"]
6+
DATABRICKS_CLI_DEPLOYMENT = ["terraform", "direct-exp"]

acceptance/bundle/integration_whl/custom_params/test.toml

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
EnvMatrix.DATABRICKS_CLI_DEPLOYMENT = ["terraform"] # Error: deploying jobs.some_other_job: creating: Method=Jobs.Create *retries.Err *apierr.APIError StatusCode=400 ErrorCode="INVALID_PARAMETER_VALUE" Message="The field 'node_type_id' cannot be supplied when an instance pool ID is provided."
1+
EnvMatrix.DATABRICKS_CLI_DEPLOYMENT = ["terraform"] # clusters resource
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
EnvMatrix.DATABRICKS_CLI_DEPLOYMENT = ["terraform"] # clusters resource; Message="The field 'node_type_id' cannot be supplied when an instance pool ID is provided."
1+
EnvMatrix.DATABRICKS_CLI_DEPLOYMENT = ["terraform"] # clusters resource

0 commit comments

Comments
 (0)